Run an Autonomous Agent That Works Without You
Build a fictional accounts-payable agent that wakes on invoice events, reconciles them with well-designed tools, acts alone only where evidence allows, waits for approvals without holding a worker, pays within signed limits, and stays observable, stoppable and cheaper each month.
Most agents in tutorials answer a person who is watching. Wrenfield Supplies' accounts-payable agent works while nobody is: invoices arrive as events at any hour, the agent matches each to a purchase order and a delivery, pays what it may pay alone, and asks a controller about the rest. Its mistakes are found by finance, days later, unless the design finds them first.
Across nine lessons you build that agent. The first module turns noisy events into tasks that run exactly once and gives the agent matching tools it uses correctly. The second decides what it may do alone, how it waits for a person, and how it pays inside limits a person signed. The third keeps it observable and stoppable. The fourth makes it cheaper and proves every change on replayed events, ending with a simulated month of operation.
Every lesson has a worked case, a figure, code that runs offline against a scripted model, a progressive challenge and a drill. Numbers are synthetic and say so. Products are named only in dated notes.
Start with the free lesson on event intake. The tool-design lesson is available with a free account, and the payment workshop is public. Premium includes the autonomy, approval, control, replay and optimisation lessons and the final project.
Before starting, the harness course covers the loop and its exits. Afterwards, the production course covers durability and rollout across a fleet.
When you finish, you can
- Turn duplicate, reordered and self-caused events into tasks that run once
- Design matching tools a model uses correctly and measure tool-call accuracy
- Grant autonomy per action class from an error bound and demote it automatically
- Park work for approval in durable state and resume it with approval bound to values
- Pay only inside user-signed limits with idempotent, auditable settlement
- Detect runaways, pull scoped kill levers, replay a week of events before every change and cut cost per invoice without losing accuracy
BEFORE YOU START · Complete the harness course, or bring equivalent experience with an agent loop, tool contracts and Python. Wrenfield Supplies and every invoice, vendor and figure are fictional; code uses the standard library and scripted models, with no API keys, network or money.
Syllabus
Wake on events
Turn invoice events into tasks that run once, and give the agent matching tools it uses correctly the first time.
Act alone, safely
Decide what the agent may do without a person, wait for approvals without holding a worker, and pay only inside signed limits.
Keep it under control
Catch a runaway before finance does, and replay a week of real events against every change before it ships.
Make it better and prove it
Cut the cost per invoice without losing a correct match, then run the whole agent through a simulated month.