Agent actions

Actions are the tools an agent can call while it reasons: search the web, open a browser, read or write a GitHub repository, generate an image, remember a fact, and so on. This page lists the actions that ship with LocalAI (through the embedded LocalAGI library) and explains how to enable one on an agent.

For an end-to-end first run, see /getting-started/first-agent/. For the agent platform overview, see /features/agents/.

Enabling an action on an agent

Actions are attached per agent, not globally.

  • In the web UI: open the Agents page, edit an agent, and add actions in its configuration. Each action exposes its own configuration fields (for example an API token or a target repository) that you fill in when you add it.
  • In an agent config (JSON): an agent’s exported configuration lists its enabled actions and their settings, so an imported agent carries its actions with it.

Some actions need credentials or external configuration to work (a GitHub token, SMTP server details, a Telegram bot token). An action that is enabled but missing its required configuration will fail at call time, not when you add it. If an imported agent will not run, a missing action credential is one of the things to check (see the checklist in /getting-started/first-agent/).

Discovering the current catalog at runtime

The set of built-in actions is served by the API, so it always reflects the version you are running:

curl http://localhost:8080/api/agents/actions

This returns the list of available action names. Two related endpoints describe and run a single action:

  • POST /api/agents/actions/{name}/definition returns the action’s parameter/configuration schema (send a JSON body with an optional config object).
  • POST /api/agents/actions/{name}/run executes the action directly (JSON body with config and params), which is useful for testing an action’s configuration outside an agent conversation.

Custom actions

You can add your own actions without rebuilding LocalAI by pointing it at a directory of custom action definitions:

LOCALAI_AGENT_POOL_CUSTOM_ACTIONS_DIR=/path/to/custom-actions local-ai run

Actions found in that directory become available to agents alongside the built-in ones.

Built-in actions

The actions below ship with LocalAI. The exact catalog can change between releases, so treat GET /api/agents/actions (and the Agents UI action picker) as the source of truth for the version you are running.

Web and knowledge

ActionWhat it doesTypically requires
searchWeb search.Search provider configuration.
browseBrowse a web page (fetch and read its content).None.
scraperScrape structured content from a page.None.
wikipediaLook up an article on Wikipedia.None.

Content generation

ActionWhat it doesTypically requires
generate_imageGenerate an image (through LocalAI’s own image endpoint).An installed image-generation model.
generate_songGenerate audio/music.An installed audio-generation model.
generate_pdfProduce a PDF document.None.

Memory

ActionWhat it doesTypically requires
add_to_memoryStore a fact in the agent’s memory.Agent memory/knowledge base enabled.
list_memoryList stored memories.Agent memory enabled.
search_memorySearch stored memories.Agent memory enabled.
remove_from_memoryRemove a stored memory.Agent memory enabled.

Reminders

ActionWhat it doesTypically requires
set_reminderSet a reminder.None.
list_remindersList reminders.None.
remove_reminderRemove a reminder.None.

Messaging and notifications

ActionWhat it doesTypically requires
send-mailSend an email.SMTP server and credentials.
send-telegram-messageSend a Telegram message.A Telegram bot token.
twitter-postPost to X/Twitter.X/Twitter API credentials.
webhookCall an outbound webhook.The target webhook URL.

GitHub

All GitHub actions authenticate with a GitHub token and (for most) a target owner/repository.

ActionWhat it does
github-issue-openerOpen an issue.
github-issue-editorEdit an issue.
github-issue-closerClose an issue.
github-issue-readerRead an issue.
github-issue-commenterComment on an issue.
github-issue-searcherSearch issues.
github-issue-labelerLabel an issue.
github-pr-readerRead a pull request.
github-pr-commenterComment on a pull request.
github-pr-reviewerReview a pull request.
github-pr-creatorCreate a pull request.
github-readmeRead a repository README.
github-repository-get-contentGet a file’s content.
github-get-all-repository-contentGet all repository content.
github-repository-list-filesList files in a repository.
github-repository-search-filesSearch files in a repository.
github-repository-create-or-update-contentCreate or update a file.

Other

ActionWhat it doesTypically requires
shell-commandRun a shell command.Enable with care; grants command execution.
call_agentsDelegate to another agent.Another configured agent.
pikvm_power_controlControl power through a PiKVM device.PiKVM endpoint and credentials.
counterA simple counter (example/utility action).None.
customA user-defined custom action.See Custom actions.

See also

  • /features/agents/ for the agent platform overview.
  • /getting-started/first-agent/ for a full walkthrough, including the “will not run” checklist.
  • /features/mcp/ for attaching external MCP tool servers to an agent (an alternative to built-in actions).