Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Crate Map

The caliban workspace is organised into ~24 crates across four main layers. This page gives an operator-facing orientation — enough to know which crate to look at when reading a log line, error message, or ADR. For architecture rationale, see Architecture & ADRs.

Note

This map is for the curious. You do not need to know these crates to use caliban — they are implementation details that surface only in debug logs, error messages, and ADR references.


Layer 1 — Foundation

Shared types, abstractions, and utilities that every other layer depends on.

CratePurpose
caliban-commonProvider-neutral message IR, shared error types, and cross-crate utilities
caliban-settingsUnified settings hierarchy (managed > user > project > local); file loading, schema validation, live reload, apiKeyHelper pool

Layer 2 — Providers

One adapter per model API. Each translates caliban's message IR to the provider's wire format and back.

CratePurpose
caliban-providerProvider trait definition and shared provider types
caliban-provider-anthropicAnthropic (Claude) adapter via Anthropic Messages API
caliban-provider-openaiOpenAI adapter; also used for LM Studio, vLLM, and other OpenAI-compatible servers
caliban-provider-ollamaOllama adapter (native /api/chat endpoint, GGUF tool-call parsing)
caliban-provider-googleGoogle AI Studio / Gemini adapter
caliban-provider-bedrockAWS Bedrock adapter (ADR 0034)
caliban-provider-vertexGoogle Cloud Vertex AI adapter (ADR 0034)
caliban-model-routerPurpose-keyed routing, fallback chains, hedging, circuit breakers, capability filtering (ADR 0022, 0038)

Layer 3 — Agent Core

The runtime that drives the model → tool → model loop.

CratePurpose
caliban-agent-coreAgent loop, turn handling, compaction strategies, permission dispatch, sub-agent orchestration
caliban-tools-builtinBuilt-in tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, TodoWrite, AgentTool, NotebookEdit, and others
caliban-sandboxOS-level tool confinement (macOS Seatbelt, Linux bubblewrap) (ADR 0032)
caliban-skillsSkill discovery, frontmatter parsing, and SkillTool invocation (ADR 0019)
caliban-mcp-clientMCP server lifecycle: spawn, handshake, list_tools, transports, OAuth (ADR 0017, 0023)
caliban-pluginsPlugin package management: manifest parsing, trust gating, namespace expansion (ADR 0030)
caliban-imagesImage / vision input: clipboard, @path, drag-and-drop, provider wire shapes (ADR 0039)

Layer 4 — Sessions, State & Infrastructure

Persistence, memory, observability, and the background fleet.

CratePurpose
caliban-sessionsSession persistence (JSON on disk), load/save, session directory management
caliban-checkpointPer-prompt checkpoint snapshots and /rewind restoration (ADR 0028)
caliban-memoryThree-tier memory (global/project/auto-memory), CLAUDE.md ancestor walk and @-imports (ADR 0018, 0035, 0036)
caliban-output-stylesBuilt-in and custom output style loading and activation (ADR 0031)
caliban-telemetryOpenTelemetry export, cost accounting, metric emission (ADR 0033)
caliban-worktreesGit worktree creation and lifecycle management for sub-agent isolation (ADR 0037)
caliban-supervisorBackground agent fleet and caliband supervisor daemon (ADR 0037, 0042)

The binary

CratePurpose
calibanThe caliban binary: CLI parsing (args.rs), startup pipeline, TUI (ratatui), headless dispatch, and subcommand handlers