aido-orchestrator · the gateway
aido-orchestrator is the conversation gateway. It speaks MCP upstream to your LLM client, MCP downstream to aido-runtime + aido-vm + aido-browser, and exposes a unified surface of 101 tools with name-prefix routing.
Plus: the agent loop itself (conversation state, LLM provider, subagent spawn), ~50 slash commands, Claude OAuth flow, HTTP/SSE serve mode, project detection, session logger. The thing that turns 4 crates into one agent experience.
aido-orchestrator does six things at once. None of them belong in aido-runtime (which stays a pure typed executor), and none belong in aido-code (which is just a TUI). The orchestrator is the glue.
Spawns and supervises aido-runtime, aido-vm-mcp and aido-browser-mcp as MCP children. Routes incoming tools/call by name prefix.
vm_* → aido-vm 29 toolsbrowser_* → aido-browser 14 toolseverything else → aido-runtime 58 toolsThe main loop: parse user turn → build system prompt → call LLM → execute tool calls → splice results → next turn. Backpressure, interrupts, cost tracking, token budget.
conversation.rsstateagent_loop.rsmain loopparser.rstool-call extractinterrupt.rsctrl-cTyped dispatcher. Not LLM calls · deterministic local actions. /goal persists intent, /auto toggles autonomous, /diff reads git, /restore rolls back via runtime.
slash.rsdispatchergoal/persistent intentpulse.rshealth signalsOne trait, five providers. Claude OAuth (anthropic.com), Anthropic API, OpenAI, Mistral, Ollama. /model hot-swaps mid-session. Per-turn cost in the sticky header.
llm_setup.rsinitclaude_oauth.rsclaude.ai flowapi.rsusage trackerIncus or Podman wrap. Detects available engines, creates the container if missing, bind-mounts the project, forwards artifact ports. The host filesystem stays unreachable.
container_runtime.rsincus · podmanartifact_expose.rsport-forwardbridge.rsruntime connThe same agent loop drives a CLI (rustyline), a TUI (ratatui with sticky header + conversation panel + sysmon), and an HTTP/SSE serve mode for web embedding.
tui.rs · app.rsratatuiterminal.rsCLIserve.rs/prompt + /events
The orchestrator boots its MCP children lazily · only what the agent actually uses pays the spawn cost. AIDO_VM_DOWNSTREAM=1 turns on the VM body; AIDO_BROWSER_DOWNSTREAM=1 turns on browser. Both are off by default to keep startup snappy.
The typed primitive surface: simulate, snapshot, safe_change, pipeline, custom functions, memory, events, desktop, artifacts, network, LLM bridge. Boots in-process via aido_runtime::execute_action or out-of-process via stdio.
* (no prefix)QEMU/KVM body for computer-use without putting the host at risk. Screenshots, OCR, snapshots in ~2 s, linked-clone pool. Lazy-spawned when the agent emits its first vm_* call.
vm_*Isolated Chromium via CDP. Allowlist + audit + rate limit + abort switch. For frontend dev loops · the agent tests your localhost without touching your real browser.
browser_*
Slash commands are the orchestrator's deterministic path · no LLM round-trip, no tool call, just typed Rust. /goal writes to persistent memory. /restore calls runtime. /auto flips a state machine. They're the keyboard shortcuts of the agentic shell.
The orchestrator's agent loop is frontend-agnostic. Three display sinks ship out of the box; the loop emits structured events, each sink renders them differently.
rustyline + colored output. Default mode. Slash commands, history, multi-line input with \. Best for headless and SSH sessions.
Full-screen TUI with sticky header (project / tokens / cost / sandbox status), conversation pane, system monitor side-panel. Launch with aido --tui.
aido --serve --port 8080 exposes /prompt (POST) + /events (SSE) for web frontends. Bearer-token-gated. Same agent loop streaming JSON.
aido-orchestrator is the only crate that talks to all of them. aido-code uses it as a library to build the TUI; external MCP clients (Claude Code, Codex, Cursor) use the aido-orchestrator --mcp binary as a single MCP server with 101 unified tools.
cargo build to first prompt.The orchestrator is what makes AIDO feel like a product. Build it, install it, point Claude Code at it · 101 unified tools, one MCP connection.