How exileline/exile-agent works
exile-agent is a FastAPI/PydanticAI runtime platform for configurable agents, governed tools, and multi-turn chat. The principal workflow is a chat request through the agent API and chat service into the runtime runner, where routing, history, skills, MCP toolsets, and approvals contribute to a response or resumable run. A parallel control-plane workflow manages model/provider, agent, MCP, and binding configuration through API services and database storage. README statements establish several runtime links; unsampled modules are represented only where their capabilities and paths are documented.
Main entry points: runner.py Run orchestrator · repository.py Config repository · config_admin_service.py Config admin · agent.py Agent endpoints
Components 21
HTTP API
- Agent endpoints
app/api/v1/endpoints/agent.py - Config endpoints
app/api/v1/endpoints/ai_config.py
Agent Runtime
- Chat service
app/ai/services/chat_service.py - Runtime manager
app/ai/runtime/manager.py - Agent registry
app/ai/runtime/registry.py - Agent router
app/ai/runtime/agent_router.py - Run orchestrator
app/ai/runtime/runner.py
Runtime Capabilities
- Session history
app/ai/runtime/history.py - Approval resume
app/ai/runtime/approvals.py - Skills injection
app/ai/skills/resolver.py - Skill catalog
app/ai/skills/registry.py - MCP manager
app/ai/mcp/manager.py - Tool governance
app/ai/toolsets
Configuration Control
- Config admin
app/ai/services/config_admin_service.py - Capability resolver
app/ai/config_store/resolver.py - Config repository
app/ai/config_store/repository.py - Config records
app/ai/config_store/models.py - Secret encryption
app/ai/config_store/encryption.py
Other components
- API caller
- Model provider
- SQL database
Connections 21
- API caller → Agent endpoints: submits chat
- Agent endpoints → Chat service: dispatches chat
app/api/v1/endpoints/agent.py - Chat service → Run orchestrator: runs request
app/ai/services/chat_service.py - Run orchestrator → Runtime manager: gets agent
- Runtime manager → Agent registry: builds agent
app/ai/runtime/manager.py - Run orchestrator → Agent router: routes request
- Run orchestrator → Session history: loads and saves
- Run orchestrator → Approval resume: pauses and resumes
- Run orchestrator → Skills injection: resolves skills
- Skills injection → Skill catalog: selects skills
- Run orchestrator → MCP manager: assembles MCP
- MCP manager → Tool governance: wraps toolsets
app/ai/mcp/manager.py - Run orchestrator → Model provider: invokes model
- API caller → Config endpoints: manages config
- Config endpoints → Config admin: delegates admin
app/api/v1/endpoints/ai_config.py - Config admin → Config repository: reads and writes
app/ai/services/config_admin_service.py - Config admin → Secret encryption: encrypts secrets
app/ai/services/config_admin_service.py - Config repository → Config records: persists records
app/ai/config_store/repository.py - Config repository → SQL database: queries database
- Capability resolver → Config repository: loads settings
- Run orchestrator → Capability resolver: resolves capabilities