How mudler/localagi works
LocalAGI is a self-hosted platform for configuring local AI agents, interacting with them through chat and APIs, and extending them with actions, connectors, skills, scheduled work, and knowledge collections. The main user journey is: configure an agent in the web UI, persist and start it in the agent pool, send it a request, and receive streamed results. The graph preserves README-documented features whose implementation was not sampled; those links are documented or marked unverified rather than implying source inspection.
Main entry points: agent.go Agent execution · AgentsList.jsx Agent management · useChat.js Chat and stream · App.jsx UI shell
Components 23
Web interface
- UI shell
webui/react-ui/src/App.jsx - Agent management
webui/react-ui/src/pages/AgentsList.jsx - Chat and stream
webui/react-ui/src/hooks/useChat.js - Knowledge UI
webui/react-ui/src/pages/Knowledge.jsx - Skills UI
webui/react-ui/src/pages/Skills.jsx - Agent status UI
webui/react-ui/src/pages/AgentStatus.jsx
Agent runtime
- Agent pool
core/state/pool.go - Agent execution
core/agent/agent.go - LLM client
pkg/llm/client.go
Agent capabilities
- Action registry
services/actions.go - Chat connectors
services/connectors.go - Skills service
services/skills/service.go - Scheduled tasks
core/scheduler/scheduler.go
State and knowledge
- Collections API
webui/collections_handlers.go - Knowledge adapter
webui/collections/rag_provider.go - RAG HTTP client
pkg/localrag/client.go
External interfaces
- Web server
webui/app.go - HTTP routes
webui/routes.go - Responses API
webui/app.go - Event stream
core/sse/sse.go
Other components
- User
- Messaging platforms
- Model service
Connections 25
- User → UI shell: uses
- UI shell → Agent management: routes to
webui/react-ui/src/router.jsx - UI shell → Chat and stream: hosts
- Agent management → Web server: configures agents
- Chat and stream → Web server: sends chat
- Chat and stream → Event stream: opens stream
- Web server → HTTP routes: registers routes
webui/routes.go - HTTP routes → Responses API: routes requests
webui/routes.go - Responses API → Agent pool: accesses agents
webui/app.go - Agent pool → Agent execution: starts agent
core/state/pool.go - Agent execution → LLM client: calls model
core/agent/agent.go - Agent execution → Action registry: executes tools
core/agent/agent.go - Agent execution → Scheduled tasks: schedules tasks
core/agent/agent.go - Agent execution → Skills service: uses skills
services/skills/service.go - Agent execution → Knowledge adapter: queries knowledge
- Knowledge adapter → Collections API: adapts collections
- Collections API → RAG HTTP client: uses remote backend
- Agent execution → Event stream: publishes updates
- Event stream → Chat and stream: streams events
- Agent management → Knowledge UI: manages knowledge
- Agent management → Skills UI: manages skills
- Agent management → Agent status UI: views status
- Chat connectors → Agent execution: delivers messages
- Messaging platforms → Chat connectors: sends messages
- LLM client → Model service: requests inference