Skip to content

Book › Part 0: Start here › The map docs for

The map

How the parts fit. Each box is a chapter, or a few.

flowchart TD
    agent["Agent: a typed class"] -->|run by| runner["AgentRunner"]
    runner -->|calls| model["A model: Gemini, Claude, OpenAI"]
    runner -->|uses| abilities["Tools, MCP servers, skills, sub-agents"]
    runner -->|records metadata in| db[("Database: the run log")]
    job["Job: a typed class that runs agents"] -->|run here by| runjob["run_job"]
    job -->|submitted by| client["JobClient"]
    client -->|message| queue[("JobQueue")]
    queue --> worker["JobWorker"]
    runjob --> runner
    worker --> runner
    runner -->|result| store[("ResultStore: yours")]
    runner -.->|events| observers["Observers: OpenTelemetry"]
  • An agent is a typed class. The runner runs it, against a model, with its abilities, and records metadata about every attempt in the database, the run log.
  • A job is a typed class that runs agents. run_job runs it in your process. A client submits it to a queue, and a worker runs it elsewhere. The same job, the same record, in both places.
  • Results go to a result store that you own. The framework keeps no data.
  • Observers receive what happens, and send it where you want: OpenTelemetry is the one we ship.
  • What ships, and what is yours. Model providers: Gemini, Gemma, Claude, OpenAI. Databases: sqlite and Postgres. Result stores and queues: sqlite. Observers: OpenTelemetry. MCP servers: stdio and HTTP. Chat protocols: AG-UI and the Vercel AI SDK. For databases, result stores, queues, observers and providers, yours is a class you write: Part 6.

I want to...

I want to Go to
Write an agent whose output I can trust A typed agent, Failures and check_output
Give it tools, MCP servers or skills Tools, MCP, Skills
Run it over many inputs, and recover from a failure What a job is, Resume
Build a chat A streaming agent, In the browser
Attach a file to a chat message Attaching a file
Run it somewhere else, on several workers Submit and a worker, Several workers
Let an agent start another and go on Background jobs
See what it did What happened, Observability
Use my own database, queue or store Bring your own storage
Look up an exact rule The guides, the specs

← What featherweight is · Part 0: Start here · The philosophy →