Your proof-of-concept works on your laptop. The demo got a nod. Then someone called it production - and you’re the one on call when it mislabels issues, burns through the API budget, or quietly degrades after a “small prompt tweak.”
Production AI Agents with PydanticAI is for senior Python engineers who already know how to ship APIs and now need to ship agents with the same discipline: versioned contracts, contract tests, eval gates in CI, observability, cost SLOs, canaries, rollback plans, and a runbook that survives a 3am page. This is not a prompt-engineering book and not an introduction to LLMs. It treats agents as software and Pydantic AI as the framework where typed outputs and dependency injection give you the seams to test, version, and operate what other stacks leave loose.
You build one system end to end: an open-source maintainer assistant that triages GitHub issues. From tools and retrieval through output contracts, unit tests, the eval suite, observability, cost engineering, human-in-the-loop controls, canary rollout, and on-call operations, you end with an agent you would trust to keep running while you sleep.
Runnable code for every chapter lives in the book’s companion repository. If you have an agent in a notebook and a deadline to put it in production this quarter, this book is the checklist.