What Writ does
Writ is a language and a runtime for bounded agent authority. You declare what an agent must achieve and what the agent can do. The runtime enforces the declaration.
The problem
Section titled “The problem”An agent loop is short. Your code sends a message to a model. The model asks for a tool call. Your code makes the tool call and sends the result back. The loop continues until the model stops.
The code around that loop is not short. It holds retry policy, iteration limits, cost limits, tool permission lists, path guards, approval steps, and verification steps. You write all of it. Each new model does more of the planning, so more of that code becomes unnecessary.
The Writ approach
Section titled “The Writ approach”Remove the sequence from the code. What stays is a set of terms:
- The goal.
- The permissions.
- The budget.
- The conditions that must stay true.
- The proof of completion.
These terms are a contract. Writ gives the contract a file format and a runtime.
What you write
Section titled “What you write”You write a writ. A writ is a YAML file with these parts:
| Part | Purpose |
|---|---|
mandate |
The goal, as a condition on the world. |
grants |
The actions that the agent can do. |
bounds |
The quantity that the agent can spend. |
invariants |
The conditions that must stay true during the run. |
satisfaction |
The proof that the work is complete. |
obligations |
The checks that must pass before satisfaction. |
remedies |
The response to a breach. |
What the runtime does
Section titled “What the runtime does”The runtime is the registrar. The registrar does these things:
- It sends the mandate and the available actions to the model.
- It receives an action request from the model.
- It examines the action against the grants, the bounds, and the invariants.
- It permits the action, or it denies the action and tells the model why.
- It writes the action and each check result to the record.
The registrar repeats these steps until the satisfaction clauses pass, a bound stops the run, or a remedy stops the run.
What Writ does not do
Section titled “What Writ does not do”Writ has no intelligence. Writ does not plan the work, and Writ does not make the agent better at the task. The model does that work.
Writ is also not a workflow tool. If you can write the full procedure before the run starts, use a workflow tool instead. Use Writ when you give the agent a goal and limits, and the agent selects the steps.