Files
LocalAI/docs/content/getting-started/first-agent.md
T
Ettore Di Giacinto 878c9ee9d7 docs(agents): describe several folders for a saved agent
Cover the folders field, the nested-folder mode rule, the new mount
names, the shared-folder budget that no longer refuses a chat, and agent
file version 3.

Assisted-by: Claude:claude-sonnet-5-5
2026-11-03 14:11:37 +00:00

2.9 KiB

+++ disableToc = false title = "Build your first agent" weight = 7 icon = "smart_toy" +++

A saved agent is a set of instructions and exact lists of what a chat may use. It ships inside LocalAI and is on by default. If LocalAI runs and a model is installed, you have everything you need.

Before you start: install a tool-calling model

An agent that uses tools needs a model that can call them. Open Models, install a model that lists tool calling, and check that it answers a plain chat first.

Make the agent

  1. Open Agents in the sidebar.
  2. Choose New agent. Give it a name and the instructions it should always follow, for example: Answer in French. Cite the file you used.
  3. Leave the lists empty for an agent that only talks. Add an MCP server of the model, an add-on, a collection or a skill to give it more. An empty list grants nothing: an agent never has more than you put in it.
  4. Optional: in Files, choose Chosen folders and pick a folder, for example /Projects/Acme, with Can read or Can read and change. You can add up to eight folders, each with its own access. Chats with the agent then see only those folders and their own chat folder, not the rest of your files. See Folders of an agent.
  5. Save it.

Talk to it

On the Agents page, choose Chat on the agent's row and write a message. The chat uses the agent's model when it has one. If you remove something the agent lists, for example by deleting a collection, the chat still starts without it and tells the model what is missing.

Let it work by itself

Open Triggers and make a schedule, for example weekdays 09:00, with the agent and a prompt. Each run is an ordinary chat of yours, and the result arrives in your Inbox. Add a Telegram connector to talk to the agent from your phone.

If your agent will not run

  • No model. An agent without a model needs one when you start the chat. A trigger or a connector needs an agent that names a model.
  • A tool is missing. The chat lists what was unavailable at the start of the turn. Check that the MCP server is configured on the model, the add-on is enabled, and the collection or skill still exists.
  • A server of the model is unreachable. An MCP server that does not answer makes its tools time out. Open the model's mcp: configuration and test the server.
  • Folder missing. The agent's folder was deleted, or it was imported without a folder that exists here. The agent does not start until you restore the folder from the Trash or choose another one in Files.
  • A trigger did not start. Open it on the Triggers page: it shows why a run was skipped or failed.

Next steps