c3d98a0branch(automate):git switch agent-builder
Agent Builder
Build an agent that can act, with limits you wrote down before it ran.
An agent is a loop that picks tools. The hard part is the edges: invalid arguments, retries that double-charge, actions that need a person. You build those edges first.
- for
- Developers ready to let a model call tools: search, create, update, refund.
- time
- 4 weeks at 4 hours a week
- not for
- Anyone without a real tool to call. Start with a fake one in the Lab, then come back.
You will ship
A support agent that looks up orders, proposes refunds, and stops for approval above a limit you set.
Prerequisites
- App Engineer level coding, or finished Launchpad plus some practice
- Has handled JSON and HTTP errors
- Knows what an idempotency key is, or will learn it in week one
c3d9e01plan:six commits to ship
The branch, commit by commit.
0/6 commits done · saved in this browser only
- commit 1Write the tool contract
Names, argument types, enums and limits, written as a schema the code checks.
Where this happens: /lessons/tool-calling#build - commit 2Reject bad calls
Validate every call before running it and send a clear error back to the model.
Where this happens: /lessons/tool-calling#try - commit 3Approval boundary
Pick the actions a person must approve and enforce it in code, not in the prompt.
Where this happens: /lessons/agent-trace#build - commit 4Timeouts and safe retries
Retry reads freely, retry writes only with an idempotency key.
Where this happens: /lessons/agent-trace#try - commit 5Scenario tests
Ten recorded conversations that must keep passing after every prompt change.
Where this happens: /lessons/agent-trace#test - commit 6Ship the demo
Run it in shadow mode: it proposes, a person decides, you compare.
Where this happens: /projects#refund-agent
c3d9c02docs:courses on this branch
Courses.
Tool Calling That Holds Up
Let a model call your functions without letting it call them wrong. Schemas, validation, guardrails and approvals.
Evals Before Vibes
Build the test set first. Then every prompt change, model swap or vendor pitch gets judged on the same evidence.
Ship It and See It
Tracing, latency budgets, cost per request and alerts for features that call models and tools.
c3d9d03ship:capstone
Capstone: Refund agent with limits
Looks up orders, proposes refunds, and stops for a person above the limit.
Tests it must pass
- rejects cut-off JSON
- holds 320.00 for approval
- never retries a write without a key
export function policy(args: RefundArgs): "run" | "approve" { return args.amount_cents > APPROVAL_LIMIT_CENTS ? "approve" : "run";}