* 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>
* Merge origin/main and resolve conflicts: keep all features including auto-compaction and evaluation
* fix: resolve merge conflict syntax errors in config.go
* feat: wire auto-compaction options to cogito
Wire enableAutoCompaction and autoCompactionThreshold options to
cogito.WithCompactionThreshold() when starting the agent.
---------
Co-authored-by: Team Coding Agent 1 <team-coding-agent-1@local>
* feat: add scheduler task template and template-based skills prompt
- Add WithSchedulerTaskTemplate option for recurring tasks run by scheduler
- Expose scheduler_task_template in core/state/config.go for user configuration
- Add WithSkillPromptTemplate option for custom skill prompt templates
- Use {{.Skills}} slice in templates to iterate over Skill.Name, Skill.Description
- Default template mimics current XML behavior with <available_skills> format
- Rename customIntro to customTemplate in services/skills for consistency
* cleanups
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Update core/state/config.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
Co-authored-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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>
This allows to configure specifically how the Knowledge base should be
accessible to the agent.
- Auto search: When enabled, every message will trigger a search to the
knowledge base. This is useful mostly if you mean to give immediate
context to the agent. Particularly suited for search agents.
- As tools: it will inject search and add tools to the knowledge base so
the agent can handle these autonomously.
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* chore: move MCP configuration to the MCP section
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* add MCP stdio form, visually split the two
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
---------
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* WIP
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Drop old webui
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Almost there
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* It builds
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Make it build
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* fixups, still doesn't work
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* unused now
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Send result before closing
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Fix observability
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Drop MCP code and wire-up in cogito
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Drop some templates
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Keep reporting into conv
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* tests fixups
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* tests fixups
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* fixups
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Do not complete observable during thought process
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Update cogito
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Fixups
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Fixups
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Fixups
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Drop unneded option now
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Fixups
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Better handling of user tools
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* TEST
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Add flake attempts
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Revert "TEST"
This reverts commit 8b12a9fd03.
* tKeep indexing MCP actions
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Split CI jobs to improve speed
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* CI optimizations
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Bump timeout
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* Bump cogito
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* fix: always commit last progress
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* chore: better management of observables
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
---------
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
* 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>
This is useful mainly to pass-by from the web interface a generic string
that can be later re-used in the custom actions or dynamic prompt during
Init().
The Signature of the custom actions and prompts around Init has changed,
and now is Init(string), this is on the custom action duty to decide if
the string is e.g. a JSON, or a comma separated list, etc.
Signed-off-by: mudler <mudler@localai.io>
Keep some agent start across restarts, such as the SSE manager and
observer. This allows restarts to be shown on the state page and also
allows avatars to be kept when reconfiguring the agent.
Also observable updates can happen out of order because SSE manager has
multiple workers. For now handle this in the client.
Finally fix an issue with the IRC client to make it disconnect and
handle being assigned a different nickname by the server.
Signed-off-by: Richard Palethorpe <io@richiejp.com>
* refactor(ui): Make message status SSE name more specific
Signed-off-by: Richard Palethorpe <io@richiejp.com>
* feat(ui): Add structured observability events
Signed-off-by: Richard Palethorpe <io@richiejp.com>
---------
Signed-off-by: Richard Palethorpe <io@richiejp.com>