New Tool Radar

AI Agents & Automation

How to Build a Saved Agent in LocalAI

Install a tool-capable model in LocalAI, create a saved agent with a name and instructions, and chat with it.

Schematic diagram with three steps: install the gemma-4-e2b model with tool-call parsing, create a saved agent with a name and instructions, then chat with it from the Agents page.

A saved agent is a chat with fixed instructions and a fixed set of tools and files. You pick it in a chat, schedule it, or reach it from a chat app. It ships inside LocalAI, so you need no extra install. On a server with accounts, an administrator switches saved agents on first; with authentication off, you are the administrator.

Install a model that can call tools

An agent that uses tools needs a model that can call them. The quickstart recommends gemma-4-e2b-it-qat-q4_0: its gallery entry turns on automatic tool-call parsing, so it is a good first try. Open Models, then Explore, search for gemma-4-e2b-it-qat-q4_0, and choose Install. It is a small Google Gemma 4 model that runs on a CPU and reads images. The download is 4.3 GB in total: 3.35 GB for the model and 0.99 GB for the image projector. Or install it from the command line with local-ai run gemma-4-e2b-it-qat-q4_0. Before building the agent, check that the model answers a plain chat first: open Chats at http://localhost:8080, select the model, type a message, and send it. If the agent never calls a tool, switch to a larger model.

Make the agent

Open Agents in the sidebar and choose New agent. A short wizard opens with four steps: Purpose, Abilities, Where it works, and Review. In Purpose, start from a template or write your own. Give the agent a name and the instructions it should always follow, for example: Answer in French. Cite the file you used. Only the name and the instructions are required. The model is the one you pick in each chat, unless you choose a fixed one.

In Abilities, you can pick a level — Look only, Assistant, or Full — or leave it, and the agent then starts with the default tools. Under Files, choose No files, All my files (the default), or Only these 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. In Where it works, mark the chat apps and the tools and services you want; marking an app does not connect it. In Review, check the summary and choose Create agent. If you skip every optional step, the agent is the same as one made with only a name and instructions.

Talk to it, and let it work by itself

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. To edit a saved agent later, open it and choose Edit. You can also let the agent work on its own: open Triggers and make a schedule, for example weekdays 09:00, with the agent and a prompt. Each run is a normal chat in your history, and the result shows up in Notifications. If your agent will not run, check the obvious causes first: an agent without a model needs one when you start the chat, and if a tool is missing, the chat lists what was unavailable at the start of the turn.

Try it: four checks from model to first agent reply

Check What you should see If you do not see it
Model answers a plain chat gemma-4-e2b-it-qat-q4_0 replies in Chats at http://localhost:8080 Wait for the 4.3 GB download, then check the model is installed
Agent created The agent listed on the Agents page with its name Check the name and instructions are filled in, then choose Create agent
Chat with the agent A reply that follows the instructions you gave it Check the agent has a model, and edit its instructions if needed
Trigger set A schedule such as weekdays 09:00 on the Triggers page Check the trigger names the agent and a prompt

Expected result. We checked the LocalAI first-agent guide, which gives the four wizard steps, the name and instructions requirement with the French example, the Abilities levels, the Files options with the /Projects/Acme example and the eight-folder limit, the Chat step, the weekdays 09:00 trigger example, and the troubleshooting causes, and the LocalAI quickstart, which gives the gemma-4-e2b-it-qat-q4_0 model with automatic tool-call parsing, its 4.3 GB download, the Models then Explore install steps, the local-ai run command, and the Chats steps at http://localhost:8080. We did not install LocalAI or build an agent on this machine.

Limits

This guide covers one saved agent with one tool-capable model only. Connecting the agent to a chat app such as Telegram needs the add-on installed first, and marking an app in the wizard does not connect it. A small model may never call a tool even with the right settings; the docs say to switch to a larger model in that case. If you delete something the agent uses, such as a collection, the chat still starts and tells the model what is missing. We did not test any of this ourselves.

Sources

See all