This book teaches AI-agent engineering from first principles through production operations. You will build agents with the OpenAI Agents SDK and Claude Agent SDK, then place both behind an AI harness that controls tools, state, permissions, budgets, traces, evaluations, recovery, and human approval. No previous agent experience is required.
By the final chapter, you will be able to:
That is a larger promise than “learn an SDK.” SDK calls change. Engineering judgment travels.
The book follows one fictional but production-shaped system called SupportOps. It accepts a support request, finds grounded information, proposes an action, asks for approval when authority is high, executes a tool, verifies the outcome, and writes an audit record.
Each part upgrades the same system:
You need a computer, a terminal, a code editor, Git, and curiosity. Later labs use Python 3.10+ and Node.js 18+. Provider labs require your own API credentials and may create usage charges; always verify current pricing and limits in the provider console.
You do not need prior knowledge of language models, async programming, JSON Schema, distributed systems, or cloud deployment. Those concepts appear before the code that depends on them.
Use a coding agent as a pair, not as a substitute for evidence. Before accepting a generated change, ask:
Ask your coding agent
“Explain this chapter’s exercise in your own words. Propose the smallest implementation, list files before editing, add success and failure tests, run them, and summarize evidence. Do not use external services or create side effects without my approval.”
AI-native does not mean replacing every if statement with a model. It means designing a system around probabilistic inference while deliberately restoring the properties production software needs: explicit authority, typed boundaries, durable state, observable execution, measurable behavior, and reversible change.
The model handles ambiguity. Deterministic code handles invariants. The harness connects them.
Harness invariant: The model may propose an action; the harness decides whether, how, and under whose authority that action can occur.
Do not measure progress by pages read. Measure artifacts and evidence:
The capstones require all seven.
Create learning-log.md. For every chapter, record one new invariant, one experiment, one failure you observed, and one question you can now answer with evidence. This becomes your personal agent-engineering field manual.