System Diagram
Key Components
Supervisor
The central agent built withcreate_supervisor from langgraph-supervisor. It:
- Receives all user messages
- Routes to the appropriate worker agent
- Manages task plans, memory, and state
- Has access to supervisor-only tools (todos, memory, file sending, scheduling)
Workers
Three types of worker agents:Project Workers
Project Workers
Created for each registered project. They wrap
claude -p (Claude Code CLI) for full codebase access. The supervisor delegates project-specific coding tasks to these workers.Standard Agents
Standard Agents
Built with
create_agent from LangGraph. Each gets:- Built-in tools (Read, Grep, Glob, Edit, Bash) filtered by
tools:in AGENT.md - MCP tools from all connected servers
ToolErrorMiddlewarefor graceful error handlingSummarizationMiddlewarefor context compression
Deep Research Agents
Deep Research Agents
Built with
create_deep_agent from the deepagents library. They get:- Persistent filesystem workspace at
.octo/workspace/<date>/ - TodoList middleware for planning
- Summarization middleware
- Sub-agent spawning capability
Transports
| Transport | Description |
|---|---|
| Rich Console | Primary CLI interface with styled output, spinner, tool panels |
| Telegram Bot | Bidirectional bot with voice, files, and rich formatting |
| Heartbeat | Periodic timer that invokes the graph on a schedule |
| Cron Scheduler | Job-based scheduler with at/every/cron expressions |
asyncio.Lock to prevent concurrent graph invocations.
State Persistence
- Conversation — SQLite via
langgraph-checkpoint-sqlite(.octo/octo.db) - Sessions —
.octo/sessions.json(metadata for resume) - Task plans —
.octo/plans/plan_<datetime>.json - Memory —
.octo/memory/(daily) +MEMORY.md(long-term) - Cron jobs —
.octo/cron.json
File Map
Request Flow
Supervisor routes to worker
Based on agent descriptions and conversation context. Or handles directly.
Worker executes
Uses tools (MCP + built-in), generates response. Middleware handles errors and context.

