39 Commits

Author SHA1 Message Date
LocalAI [bot] dc21ee83bc feat: implement 'agent run' CLI command (#448) (#449)
* feat: implement 'agent run' CLI command (#448)

- Add 'local-agi agent run' command supporting agent name or config file
- Support 'local-agi agent run <name>' to run agent from registry (pool.json)
- Support 'local-agi agent run --config <file.json>' to run from JSON config
- Extract web server into 'local-agi serve' subcommand
- Implement agent name lookup from registry
- Add JSON config file parsing and validation
- Create standalone agent execution logic
- Add proper error handling for invalid inputs
- Reuse existing service factories (actions, connectors, filters, skills)
- Environment variable fallback for config values
- No web server - agent runs in foreground with clean SIGINT/SIGTERM handling

References: https://github.com/mudler/LocalAGI/issues/448

* refactor(cmd): use pool to start agent instead of duplicating logic

Replace ~220 lines of duplicated agent initialization code in
startStandaloneAgent() with a call to pool.StartAgentStandalone().
The new pool method delegates to the existing startAgentWithConfig(),
eliminating code duplication between the CLI and the pool.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add default help command to root

* fix: default to serve command when no subcommand provided

The e2e tests fail because when the container starts with no arguments,
the root command shows help instead of starting the web server.

Changed the root command to call serveCmd.RunE() directly when no
subcommand is provided, ensuring the web server starts by default.

This fixes the CI e2e test failure where the web server wasn't starting.

* fix: add serve subcommand to Dockerfile ENTRYPOINT

* refactor: remove unused GetRAGProvider function

* refactor: centralize env var setup in cmd/env.go

---------

Co-authored-by: localai-bot <localai-bot@noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 22:09:02 +01:00
Ettore Di Giacinto 8014d22588 fix: unify api keys for collection endpoint
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-02-21 23:39:19 +00:00
Ettore Di Giacinto 410ba7a467 feat: allow to manage external localrecall instances (#425)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-02-22 00:02:12 +01:00
Ettore Di Giacinto c56cc43552 feat(memory): add knowledgebase and memory management from LocalRecall (#424)
* feat: integrate knowledge base management

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* refactorings

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-02-21 23:17:33 +01:00
Ettore Di Giacinto bc567ef7dd feat(skills): add skills management (#423)
* feat(skills): add skills management

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* improve ui

* Update webui/skills_handlers.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update webui/skills_handlers.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update webui/skills_handlers.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update webui/skills_handlers.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Dockerfile.webui

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update go.mod

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update webui/skills_handlers.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Address feedback from review

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Fixups

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* allow to customize skill prompt

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Fixups

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-21 22:21:33 +01:00
Ettore Di Giacinto 775b1a9ab8 chore: drop agents avatars (#411)
This functionality makes LocalAGI harder to starts without no real gain.
While having agents avatars is nice, on generating a new agent is
required a new image to be created, which, on small HW could become a
huge computational strain.

It moves the agent list view to tabular, and cleanups the index page to
improve readability.

We can go back at this, but the motivations are mainly:

- Do not waste computation and be more lightweight
- Less models to download unless the user wants to download image models
- Let's not make look the application "weird" as images could be
  generated which are not good looking at all

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-02-09 18:59:52 +01:00
Ettore Di Giacinto cea3b7b111 chore: drop LocalOperator actions, we will use MCP for this (#407)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-02-06 21:51:54 +01:00
Ettore Di Giacinto b527cbc332 Revert "chore: do not wait for agents to start, add timeout on MCP connections"
This reverts commit 7cc0c3e85b.
2026-01-31 09:19:26 +01:00
Ettore Di Giacinto 7cc0c3e85b chore: do not wait for agents to start, add timeout on MCP connections
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-01-30 20:20:46 +00:00
Ettore Di Giacinto 6fa73262fc feat: switch to official MCP SDK (#318)
* feat: switch to official MCP SDK

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Drop MCP Box

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2025-10-08 17:14:03 +02:00
Ettore Di Giacinto 558fa396a8 feat: add audio support (#316)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2025-10-07 12:00:33 +02:00
Ettore Di Giacinto 848f688ae9 Scan for dynamic prompts in custom action folder (#291)
Signed-off-by: mudler <mudler@localai.io>
2025-09-10 23:45:46 +02:00
Ettore Di Giacinto 684ce43eb8 feat: preload custom actions from dir (#290)
* feat: preload custom actions from dir

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* fix(custom dir): allow to override name and description, strip package from code

Signed-off-by: mudler <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: mudler <mudler@localai.io>
2025-09-09 18:05:15 +02:00
Ettore Di Giacinto 7fe3ed2169 feat(custom actions): allow to specify a dir with all custom actions (#277)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2025-08-25 09:33:21 +02:00
Ettore Di Giacinto be336adf02 feat(dynamic-prompts): add memory tool to dynamic prompt (#256)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2025-08-04 16:58:11 +02:00
Ettore Di Giacinto 4cf52ec698 feat(memories): add action to handle simple memory as flat files (#252)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2025-07-24 23:17:05 +02:00
Alixander 6e999927ec fix: use correct env key in panic (#215) 2025-06-23 18:31:18 +02:00
Ettore Di Giacinto 4a0d3a7a94 feat(sshbox): add sshbox to run commands (#161)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2025-05-17 23:34:51 +02:00
Richard Palethorpe f2c3b9dbdb feat(filters): Add configurable filters for incoming jobs
Signed-off-by: Richard Palethorpe <io@richiejp.com>
2025-05-06 09:08:14 +01:00
Ettore Di Giacinto 29f7644577 feat: add deep research action (#91)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2025-04-29 08:46:55 +02:00
Ettore Di Giacinto eb8663ada1 feat: local MCP server support (#61)
* wip

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: mudler <mudler@localai.io>

* Add groups to mcpbox

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: mudler <mudler@localai.io>

* Add mcpbox dockerfile and entrypoint

Signed-off-by: mudler <mudler@localai.io>

* Attach mcp stdio box to agent

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: mudler <mudler@localai.io>

* Add to dockerfile

Signed-off-by: mudler <mudler@localai.io>

* Attach to config

Signed-off-by: mudler <mudler@localai.io>

* Attach to ui

Signed-off-by: mudler <mudler@localai.io>

* Revert "Attach to ui"

This reverts commit 088d0c47e87ee8f84297e47d178fb7384bbe6d45.

Signed-off-by: mudler <mudler@localai.io>

* add one-time process, attach to UI the mcp server json configuration

Signed-off-by: mudler <mudler@localai.io>

* quality of life improvements

Signed-off-by: mudler <mudler@localai.io>

* fixes

Signed-off-by: mudler <mudler@localai.io>

* Make it working, expose MCP prepare script to UI

Signed-off-by: mudler <mudler@localai.io>

* Add container image to CI builds

* Wire mcpbox to tests

* Improve setup'

* Not needed anymore, using tests

Signed-off-by: mudler <mudler@localai.io>

* fix: do not override actions

Signed-off-by: mudler <mudler@localai.io>

* chore(tests): fix env var

Signed-off-by: mudler <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: mudler <mudler@localai.io>
2025-04-24 16:39:20 +02:00
Ettore Di Giacinto 50e56fe22f feat(browseragent): add browser agent runner action (#55)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2025-04-18 22:42:17 +02:00
Ettore Di Giacinto 2f19feff5e fixups 2025-04-09 21:25:44 +02:00
Ettore Di Giacinto e7111c6554 Rename 2025-04-08 22:18:32 +02:00
Ettore Di Giacinto e90c192063 feat(call_agents): merge metadata of results (#126)
* feat(call_agents): merge metadata of results

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* chore: correct env typo

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Update services/actions/callagents.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: add icon to thinking

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-01 21:57:32 +02:00
Ettore Di Giacinto f3c06b1bfb feat(api): implement stateful responses api (#122)
* feat(api): implement stateful responses api

Signed-off-by: mudler <mudler@localai.io>

* fix(tests): align client to API changes

Signed-off-by: mudler <mudler@localai.io>

---------

Signed-off-by: mudler <mudler@localai.io>
2025-04-01 18:00:37 +02:00
Richard Palethorpe 4c40e47e8d chore(prompts): Rename Prompt blocks to Dynamic prompts 2025-04-01 14:36:33 +01:00
Ettore Di Giacinto 3a921f6241 feat(ui): generate avatars (#80)
* feat(ui): generate avatars

Signed-off-by: mudler <mudler@localai.io>

* Show a placeholder if the image is not ready

Signed-off-by: mudler <mudler@localai.io>

* feat(avatar): generate prompt first

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

---------

Signed-off-by: mudler <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2025-03-22 20:50:31 +01:00
Ettore Di Giacinto c1ac7b675a feat(api): add endpoint to create group of dedicated agents (#79)
Signed-off-by: mudler <mudler@localai.io>
2025-03-22 18:44:22 +01:00
Ettore Di Giacinto 0ad2de72e0 feat(keys): allow to set api keys to secure the instance (#39) 2025-03-11 23:14:05 +01:00
mudler 3827ebebdf feat: add capability to understand images
Signed-off-by: mudler <mudler@localai.io>
2025-03-08 17:54:35 +01:00
Ettore Di Giacinto 7492a3ab3b Change env vars to be more meaningful 2025-03-05 22:19:07 +01:00
Ettore Di Giacinto 2942668d89 Put logging of conversations behind ENABLE_CONVERSATIONS_LOGGING 2025-03-04 22:23:58 +01:00
Ettore Di Giacinto 5e52383a99 Refactorings 2025-03-02 22:44:54 +01:00
Ettore Di Giacinto f6e16be170 Allow to specify dynamic prompts 2025-03-02 22:40:37 +01:00
Ettore Di Giacinto 371ea63f5a Integrate with LocalRAG, drop RAG functionalities 2025-02-27 23:51:02 +01:00
Ettore Di Giacinto b66e698b5e Rename package 2025-02-26 22:51:29 +01:00
Ettore Di Giacinto 43c29fbdb0 Re-order main 2025-02-26 22:45:50 +01:00
Ettore Di Giacinto 0a18d8409e refactoring 2025-02-26 22:37:48 +01:00