Production Agent Engineering — A Practical Guide
A build-first guide to shipping AI agents that survive contact with production.
Most agent material teaches you to make a demo work. This one assumes the demo already works and asks the harder question: what does it take to put an agent in front of real users, keep it correct, keep it affordable, and keep it running? Every chapter pairs the concept with code you actually run.
What you build
The book is organized as a progression. You start by writing an agent loop from scratch — no framework, so you understand every moving part — and finish with deployed production systems.
Mini-projects: a from-scratch ReAct loop, your own @tool decorator and function-calling framework,
a workflow engine (chaining, routing, parallelization), a multimodal RAG agent, and an MCP client harness.
Production systems: a deep research agent (autonomous crawling, PDF/GitHub/YouTube ingestion, MCP tool orchestration, human-in-the-loop controls), a deterministic writing workflow (evaluator-optimizer loops, LangGraph, multi-media output), and a multi-agent system with central orchestration.
Capstone: your own deployed MCP server.
What it covers
Foundations — how agents differ from workflows, the capability taxonomy from a bare reasoning model up to self-evolving systems, and the model/tools/orchestration architecture underneath all of it.
Tools and MCP — designing tool schemas an LLM can actually use, the best practices that decide whether tool calling works or silently misfires, and the Model Context Protocol in depth.
Context engineering — structured outputs, sessions and state, long-conversation management, and memory systems: extraction, consolidation, provenance, and retrieval.
Quality — evaluation strategy, LLM-as-a-judge and agent-as-a-judge, human-in-the-loop review, and the three pillars of observability.
Production — CI/CD with evaluation as a quality gate, safe rollout, security, in-production operations, A2A interoperability, and the full AgentOps lifecycle.
Sources
Built on the Google 5-Day Agents Intensive whitepapers (May 2026 revision) in resources/, and the
curriculum of the Towards AI Agent Engineering course.
The explanation and code here are written fresh — the sources set the syllabus, this book is the working
through of it.
Related guides
- Agentic AI Evaluation — evaluating agents in depth, plus a design-patterns playbook and long-horizon operations track
- LLM Serving & Inference — the serving layer underneath: vLLM, Kubernetes, autoscaling, monitoring
- ML & LLM Learning — the fundamentals underneath both
Building locally
cargo install mdbook # or: brew install mdbook
mdbook serve --open