Field manual, second edition
How to Build Autonomous Coding Agents
Build the deterministic system around the model. Then operate the agents you run: identity, authority, budget, equipment, and a record another person can read.
A language model is a probabilistic engine. Almost everything around it can be decided in code: what it retrieves, what stays in its window, which step runs next, what it may do, what it may spend, and what gets recorded. Parts 1 to 13 build that system. Parts 14 to 20 show how to operate the agents you now run.
Reading paths
Shorter routes through the book. Each one stands on its own.
Build or tune an agent
13 min- 1AI agents are not expensive. Bad architecture is.
- 2Stop making agents read your entire logs
- 3Parse the user prompt before the model ever sees it
Then: Part 13 to set up measurement, then the rest of 4 to 12.
Answer for several agents
13 minThen: Parts 17 and 20, then part 13.
Review agent use for security or finance
10 minThen: Parts 15 and 19.
Contents
9 sections in reading order. Each row gives the part's claim and how long it takes.
I
Before you start
How the parts fit and where to begin.
3 min in 1 part
II
The economics
Most of the token bill comes from the system around the model.
5 min in 1 part
III
Deterministic retrieval
Decide in code what the agent reads.
16 min in 4 parts
- 2Stop making agents read your entire logsLogs are structured data, and treating them as prompt text costs tokens you do not have to spend.4 min
- 3Parse the user prompt before the model ever sees itYour prompt already carries structured information, so extract it before you pay for inference.4 min
- 4Why grep is the wrong retrieval engineSearching is not understanding, and code already carries the structure you need.4 min
- 5Build semantic memory onceA run should start from what the last one learned instead of repeating it.4 min
IV
Context engineering
Decide in code what stays in the window.
13 min in 3 parts
- 6A rule written in prose cannot fail CIConstraints belong in a representation a validator can check.4 min
- 7Context compression is worth more than a bigger modelRemoving irrelevant information beats buying a larger model.4 min
- 8Agents guess at schema they were not shownA model adds a duplicate column when the context did not carry the existing one.5 min
V
Orchestration and memory
Decide in code which step runs next and what the agent remembers.
18 min in 4 parts
- 9Why coordinator agents don't scaleMost multi-agent systems pay a coordination tax and call it architecture.5 min
- 10Tests should be first-class retrieval objectsTests describe behavior in executable form, and a test runner's verdict is computed rather than inferred.4 min
- 11Agents need working memory, not bigger context windowsYou do not reread every book you own before fixing a bug, and your agent should not either.4 min
- 12Knowledge graphs beat prompt engineeringKnowledge should be connected, not concatenated.5 min
VI
Measurement
Measure the agent the way you measure a service.
5 min in 1 part
VII
Operating the workforce
Identity, authority, budget, equipment, and a record another person can read.
33 min in 7 parts
- 14Give every agent its own identityYou cannot set authority for, bill, or review something you cannot name.4 min
- 15Write the mandateFour decisions govern an agent. Most teams have made all four. Few have them in one place.4 min
- 16The agent asks, a rule decidesAuthority is a decision at the moment of use, written down by the team that owns the system.5 min
- 17Spend you can attributeA total is not an answer. The answer is which agent spent what, and on whose behalf.5 min
- 18Equip agents on purposeA tool in the catalog is not a tool in the agent's hands. Assign equipment the way you assign access.5 min
- 19Keep a record another person can readA log answers the engineer who wrote it. A record answers the person who was not there.5 min
- 20Bounded tasks and ongoing workSome work has an endpoint. Other work continues. Manage each in its own way.5 min
VIII
The endgame
Where the system goes next, and a closing thought.
5 min in 2 parts
IX
Back matter
Templates, terms, and sources.
1 min in 1 part
- Field kitField kitTemplates and worksheets to copy. Print this section and fill it in with the people who own each line.reference
- GlossaryGlossaryThe words this book uses in a fixed sense.reference
- About the authorAbout the authorOxagen is workforce management for autonomous agents: give each agent an identity, set its authority and budget, equip it with tools and skills, and review…1 min
- SourcesSourcesEvery empirical claim in this book traces to one of the sources below. Read the primary literature. It is better than any summary of it, including this one.…reference
Updates by email
Get the next edition of the field manual and new research when it is published.