How desplega-ai/agent-swarm works
Agent Swarm is an AI-work operating system: external work arrives through channels or the API, a lead agent plans and delegates tasks, isolated workers execute them, and results return through integrations or the dashboard. Persistent memory, identity, workflows, schedules, scripts, apps, rooms, and review gates support that loop. The tree and excerpts directly support server registration, workflow execution, app persistence, GitHub authentication, memory rating, and Codex OAuth; several worker and integration paths are represented only at their existing source directory.
Components 26
Interfaces
- Operations Dashboard
apps/ui/src/app/App.tsx - UI API Client
apps/ui/src/api/client.ts - MCP Server
src/server.ts
Orchestration
- Lead Agent
src - Task Orchestrator
src - Isolated Workers
src - Review Gates
src
Persistent State
- Operational Database
src/be/db - Memory System
src/be/memory - Identity Context
src - Memory LLM Rater
src/be/memory/raters/llm-client.ts
Automation
- Workflow Engine
src/workflows/engine.ts - Scripts
src - Apps Runtime
src/http/apps.ts - Realtime Rooms
src
Integrations
- GitHub Integration
src/github/app.ts - Codex OAuth
src/providers/codex-oauth/storage.ts
Other components
- Operator
- Slack
- Repositories
- API / CLI
- Claude CLI
- GitHub
- Slack Replies
- Model Providers
Connections 30
- Operator → Operations Dashboard: uses
- Operations Dashboard → UI API Client: requests
- UI API Client → MCP Server: calls API
- API / CLI → MCP Server: submits work
- Slack → MCP Server: sends work
- Repositories → MCP Server: supplies work
- MCP Server → Lead Agent: dispatches
- Lead Agent → Task Orchestrator: delegates tasks
- Task Orchestrator → Isolated Workers: runs workers
- Isolated Workers → Identity Context: reads context
- Isolated Workers → Memory System: reads and writes
- Isolated Workers → Review Gates: requests review
- Review Gates → Task Orchestrator: returns decision
- Isolated Workers → GitHub: ships changes
- Isolated Workers → Slack Replies: sends replies
- Isolated Workers → Email: sends replies
- MCP Server → Workflow Engine: registers tools
- Workflow Engine → Operational Database: stores runs
- Workflow Engine → Workflow Engine: resolves successors
- MCP Server → Apps Runtime: registers tools
- Apps Runtime → Operational Database: stores app data
- Apps Runtime → Scripts: loads scripts
- MCP Server → Realtime Rooms: registers room tools
- MCP Server → GitHub Integration: registers reactions
- GitHub Integration → GitHub: gets tokens
- Codex OAuth → MCP Server: reads config
- Codex OAuth → Model Providers: refreshes token
- Memory LLM Rater → Claude CLI: scores memories
- Memory System → Memory LLM Rater: requests rating
- Lead Agent → Model Providers: uses models