Skip to content

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

The philosophy

featherweight has opinions. Take them, or fork off. Each one shaped features you will meet, and each is argued in a spec.

Principle What it means Where you will see it
Pydantic is the spec An agent's input and output are models, checked on the way in and on the way out. A bad declaration fails when the class is written. A typed agent, agents spec
Failures are values A failed run returns a status and the error. It does not raise. Running it, Failures and check_output, runner spec
Plain Python pipelines Order, loops and branching are if and for. No graph, no workflow syntax. What a job is, jobs spec
Least privilege Everything an agent can do is an allow-list that the developer wrote: its tools, the MCP servers and the tools it may use from them, its skills, the sub-agents it may launch, the background jobs it may start. Nothing is granted by default. Tools, MCP, Skills, Sub-agents, Background jobs, the tools spec
Metadata only, and your storage The framework stores metadata and nothing else. Inputs, outputs and results go where you decide. Results and the result store, persistence spec
One concept, two places A job runs in your process or on a worker, by the same code, with the same record. What a job is, Submit and a worker, submitted jobs spec
We run no server We emit events, and SSE is the one streaming protocol. Your API sends them. Status and events, In the browser, streaming spec
What you plug in is an abstract class, with a kit A database, a result store, a queue or an observer is a class you implement, and a conformance kit checks it. Bring your own storage, persistence spec
Agents propose, code executes An agent does not hold a permission. It returns a typed proposal, a person approves it, and your own code acts, once. Approvals, approvals spec, the recipe
Seams, not solutions featherweight takes what you give it, as typed definitions, and runs it durably. How you store them, who your users are, who may do what, and what things are called is your application's. Where your code meets ours is a typed seam, checked at the boundary and closed when misused. A use case is a recipe, not a feature. Who is asking (the identity: you define it, the tool checks it), jobs_lookup (a job that is not in the worker's code), a skill from a database or S3, files: pass a reference, Tenants (we have no tenant column: you choose the job id or the name), Bring your own storage, the recipes

These are not a style guide for your code. They are why featherweight works the way it does, so that its behaviour is never a surprise.


← The map · Part 0: Start here · How to read this book →