Skip to content

Architecture Overview

Caboose is a terminal-native AI coding agent built in Rust. It ships as a single binary with no runtime dependencies beyond a working terminal and network access, and runs on Linux, macOS, and Windows.

┌─────────────────────────────────────────────┐
│ TUI Layer │
│ (widgets, input handling, layout) │
├─────────────────────────────────────────────┤
│ App State Machine │
│ (sessions, mode switching, tool approval) │
├─────────────┬───────────────┬───────────────┤
│ Agent Loop │ Tool Runner │ Provider Hub │
│ (turns, │ (file ops, │ (Anthropic, │
│ streaming, │ shell exec, │ OpenAI, │
│ compaction)│ glob/grep) │ Gemini ...) │
├─────────────┴───────────────┴───────────────┤
│ Persistence Layer │
│ (SQLite sessions, config, memory) │
└─────────────────────────────────────────────┘
SubsystemResponsibility
Agent LoopMulti-turn conversation engine, streaming, compaction, cold storage, tool dispatch
Provider HubUnified provider interface, streaming HTTP for Anthropic, OpenAI, Gemini, OpenRouter, and more
Tool RunnerTool registry and implementations: read, write, edit, glob, grep, shell, fetch
TUILayout, chat view, home screen, sidebar, dialogs, command palette, syntax highlighting, themes
ConfigTOML config parsing, auth store, key management, preferences
SessionsSQLite persistence for sessions, snapshot-based crash recovery
MemoryPersistent memory loading, full-text search index, automatic observation extraction
MCPModel Context Protocol server lifecycle management
SkillsBuilt-in skills (11 total), file-based skill loading, resolution, creation
SafetyCommand allow/deny policies, environment variable filtering

No SDK dependencies. Every LLM provider is accessed through raw HTTP requests and server-sent event parsing. This eliminates version churn from vendor SDKs, keeps the dependency tree small, and gives Caboose full control over retry logic and streaming behavior.

Raw streaming everywhere. Provider responses arrive as SSE streams and are forwarded to the TUI for token-by-token rendering with no buffering delay.

SQLite as the single persistence backend. Sessions, memory search indexes, and snapshots all live in a single SQLite database. This avoids the complexity of multiple storage formats while keeping the application portable — no external database process is needed.

Single binary distribution. One executable with all assets compiled in. Install via Homebrew on macOS or download the binary directly.