
Section
Production
What an agent needs before you leave it running: clear stop reasons, safe retries, traces, offline tests, evals, injection defenses, approval, credentials scoped to one user and one run, runs that survive a crash, and running it as a service.
These pages cover the work of turning an agent that runs on your laptop into one you can leave running on its own.
On a first read, take each page’s opening story, the measured result, the Steps, and When to use it; the rest is there when you build it. Passages marked Under the hood are the deepest and can wait.
Show guides by loop stage
On the agent compass
No guides here work on this stage alone.
Covers every stage
Part 1
Reliability
Part 2
Testing
Part 3
Safety
- Prompt injection and sandboxingA threat model, a ladder of sandboxes, and five layers of defense against prompt injection.Advanced
- Human approvalPutting a person in front of risky tool calls, with a gate the model can’t route around.Advanced
- Agent identityWhose rights an agent uses, how to hand them over safely, and how to prove afterward who did what.Intermediate
Part 4
Running it
Part 5
Safety
- OAuth and OIDCSign people in, keep their tokens off the browser, and call other services with each user’s own credentials.Advanced
- MCP authorizationAn MCP server that accepts only tokens issued for it, a client that gets one, and the checks the SDK leaves to you.Advanced
- Agent gatewaysOne MCP server in front of the rest that decides every call, gives each upstream its own token, and can stop an agent.Advanced
Part 6

