How apra-labs/apra-agent-kit works
Apra Agent Kit is a modular toolkit for building autonomous agents on Apra Fleet. A user submits a task through the host’s chat or task interface, or invokes a tool through MCP; the host dispatches work to a leased Fleet worker and returns results. The kit also provides configurable run strategies, guardrails and budgets, asynchronous jobs, scheduling, memory, and standalone sample workflows. The README documents these capabilities, but several implementations were not sampled, so their internal links are left out or marked unverified.
Main entry points: index.mjs Host Startup · worker-dispatcher.mjs Worker Dispatch · tasks.mjs Task Execution · routes.mjs Host Routes
Components 21
Interfaces
- HTTP Adapters
comm/router.mjs - Host Routes
host/routes.mjs - Chat UI
host/chat/app.mjs - MCP Server
mcp/server.mjs
Agent Runtime
- Host Startup
host/index.mjs - Task Execution
host/tasks.mjs - Run Strategies
host/strategies/plan-execute.mjs - Tool Registry
host/tools/registry.mjs
Fleet Workers
- Worker Dispatch
pool/worker-dispatcher.mjs - Member Lifecycle
pool/member-manager.mjs - Fleet Transport
transport/stdio-fleet.mjs
State And Operations
- Job Backends
host/jobs/in-process.mjs - Workflow Scheduler
host/scheduler/in-process.mjs - Agent Memory
host/memory/index.mjs - Memory Stores
host/memory/store/sqlite.mjs - Notifications
host/notify/index.mjs
Workflows And Tools
- Sample Workflows
workflows/standalone.mjs - Example Tools
tools
Other components
- Agent User
- MCP Client
- Apra Fleet
Connections 25
- Agent User → Chat UI: uses
- Agent User → Host Routes: submits task
- MCP Client → MCP Server: invokes tools
- Host Startup → HTTP Adapters: creates adapter
host/index.mjs - Host Startup → Host Routes: builds routes
host/index.mjs - HTTP Adapters → Host Routes: routes requests
- Host Routes → Task Execution: runs task
host/index.mjs - Host Startup → Task Execution: configures execution
host/index.mjs - Task Execution → Run Strategies: runs strategy
host/tasks.mjs - Task Execution → Worker Dispatch: dispatches work
host/tasks.mjs - Host Startup → Worker Dispatch: creates dispatcher
host/index.mjs - Worker Dispatch → Member Lifecycle: provisions members
pool/index.mjs - Member Lifecycle → Apra Fleet: manages members
pool/member-manager.mjs - Worker Dispatch → Apra Fleet: leases workers
- MCP Server → Worker Dispatch: leases worker
mcp/server.mjs - MCP Server → Apra Fleet: calls Fleet API
- Host Startup → Job Backends: starts backend
host/index.mjs - Host Startup → Workflow Scheduler: starts scheduler
host/index.mjs - Host Startup → Agent Memory: initializes memory
host/index.mjs - Agent Memory → Memory Stores: configures stores
host/memory/index.mjs - Host Startup → Notifications: configures notifications
host/index.mjs - Sample Workflows → Fleet Transport: spawns Fleet
workflows/standalone.mjs - Sample Workflows → Worker Dispatch: creates dispatcher
workflows/standalone.mjs - Sample Workflows → Apra Fleet: runs workflow
- Example Tools → Apra Fleet: provides tool examples