Documentation¶
Five kinds of page, from "how do I build it" to "why is it this way". Start at the top and go down only as far as you need.
| Level | Answers | Where |
|---|---|---|
| Overview | What is featherweight, and is it for me? | The README |
| The book | How do I build something, step by step? | book/ |
| Recipes | How do I put a few parts together for one job? | recipes/ |
| Guides | How do I do X? | This folder |
| Specs | What exactly does it do, what was decided and why, and what is left out? | specs/ |
| Examples | Show me running code | examples/ |
The book teaches in order; the guides and the specs are for looking things up. A word that means something particular is in the glossary, which also says which of two names to use. The guides and the specs cover the same features. A guide is for using one, and its spec is for relying on it, changing it, or finding out why it behaves as it does.
Where to start¶
- I want to build something, step by step. The book: a short chapter at a time, one small project that grows from a typed agent to a chat and a pipeline on workers. Start with the map. The guides and the specs below are the reference.
- I want a short pattern to adapt. Recipes: a pipeline, resuming a job, a fake model for tests, a worker, a chat that streams, each one small and complete.
- I'm building a platform where users define skills or agents. Recipes: a skill from a database or S3, agents built from JSON with your own rules, a queue that signs its messages, a tool that acts for the signed-in user. Then who is asking and jobs that are not declared in code.
- I want a coding agent to build with it. The skill: install it in Claude Code, or copy
skills/featherweightinto another tool's skills folder. It carries the rules, a working app, the book and the guides. - I'm new here. Getting started: install it, write an agent, run it.
- I want to build an agent. Agents: define one, run it, read the result, handle failures. Then
examples/launchingorexamples/skillsto run something. - I want my agent to use outside tools. MCP tools: declare a server, and the agent gets its tools. They are
found by search by default. Then
examples/mcp, which uses GitHub's server. - I want to use another model or provider. Models and providers: Gemini, Gemma, Claude and OpenAI, and how to add GPT-5.x or Ollama with a small class.
- I want agents that delegate. Launching agents: an allow-list of agents, depth and breadth limits.
- I want to teach an agent a procedure. Skills: instructions in the Agent Skills format, read on demand.
- I want to see a whole pipeline. Example pipeline:
doclearn, five agents and two pipelines built on featherweight. Run it withmake pipeline. - I want an agent to start another and go on. Background jobs: a job exposed to an agent as a tool, with the
result coming back as a message. Then
examples/background. - I want to run jobs in the background. Submitted jobs: a client submits, a worker runs, and you follow
it with events. Then
examples/jobs. - I want to run it in production. A production stack: what to use where, with Postgres, your own queue and result store.
- I want to see what my jobs and agents do. Observability: OpenTelemetry spans for jobs, attempts, model calls
and tool calls, ready for an evaluation platform. Then
examples/observability. - I want to work on featherweight itself. Development: the commands, the layout, how to contribute.
- I want to know why it works this way, or to change it. Specs. Start with the agent runner, which most behaviour passes through.
Guides¶
| Guide | Covers | Its spec |
|---|---|---|
| Getting started | Installing it, a first agent, running it, the examples | |
| Agents | Defining and running an agent, results, retries, output checks, tools, who is asking, approvals, configuration | Agents, the runner, tools and the registry, approvals |
| Models and providers | Gemini, Gemma, Claude, OpenAI, what is checked, adding a model or a provider |
Models |
| Launching agents | The subagents allow-list, the two tools, depth and breadth, concurrency, tracing |
The runner |
| MCP tools | Declaring servers, connections, what the model gets, failures, finding tools by search | MCP tools, tool discovery |
| Skills | The skill model, how an agent reads its skills, loading, what the specification covers | Skills |
| Streaming agents | StreamingAgent, runner.stream(), the events, thoughts, the AG-UI and Vercel adapters, stopping a response, keeping the conversation, the example |
Streaming agents |
| What the providers accept as attachments | A dated snapshot of what Anthropic, Google, OpenAI and Ollama accept: types, how, sizes, counts, with links | Attachments |
| Persistence | What the run log holds and what it never does, result stores, choosing a database, migrations, tenants | Persistence |
| Jobs | Declaring a job as a class or with @job, run_job, following it with events and SSE, resuming a failed job |
Jobs |
| Submitted jobs | JobClient, JobWorker and JobQueue: submitting a job, cancelling, several workers and takeover, your own queue, the example |
Submitted jobs |
| Background jobs | background_jobs, start_background, here or on a worker, the result message, the events, a chat in the browser, how long a child lives |
Background jobs |
| Observability | Observers, OTelObserver, what is on the spans, content, your own spans, evaluation, the convention versions |
Observers and OpenTelemetry |
| A production stack | What to use where: Postgres, your queue, your result store, the API, workers, traces; the wiring | Persistence, submitted jobs |
| Example pipeline | doclearn: what it does, its agents, how it handles failures, and its limits |
|
| Migrating from 0.1 | What breaks between 0.1 and the next release, what to search for, what to write instead, and the same for a coding agent | The units of work |
| Development | The make commands, the layout of the repository, contributing |
Specs¶
Each spec has the same shape: goal, the rules, decisions and why, what is not supported, and which tests cover it. The index lists them. How they fit together:
agents ──────────── what an agent is, and what is checked when it is built
│
runner ──────────── runs agents: attempts, retries, concurrency, launching other agents
│ │
│ ├── models ──────── which model and provider, and how hard it thinks
│ │
│ └── jobs ────────── a pipeline: its status, events and resuming
│
├── tools ───────────── the tools of an attempt, the registry
│ │
│ ├── MCP tools ───────── servers, connections, failures
│ │ └── tool discovery ── finding MCP tools by search
│
└── skills ───────────── instructions an agent reads when it needs them
How it fits together¶
- The README is the landing page: what featherweight is, what it does, and how it differs.
- A guide is written for someone with a task. It shows code, and says what to expect.
- A spec is written from the code. It states the rules as they are, the decisions with their reasons, and what was left out on purpose. If a guide and a spec disagree, the spec and the code are right, and the guide should be fixed.
- An example is a folder you can run (
make example-skills,make example-launching,make example-mcp,make example-resume,make example-jobs,make example-observability,make pipeline). Each has a README that says what to look at. - Releasing is for the maintainers: Releasing says how a release is made, and the changelog is
CHANGELOG.md. - The tests are in
tests/, and each spec says which files cover it.tests/e2euses the real model.