Give Botie a Typed Job with Pydantic AI

Botie can read a manual, but the application still needs a usable answer and real citation IDs. Give the agent its dependencies and check what comes back.

14 sections · 4 questions · 1 coding challenge

1 / 14

Making a Model Response Fit an Ordinary Python Application

BOTIE

Application developers needed model responses that could be checked and passed to other code. The Pydantic team approached that problem through Python types, dependency injection and output validation. Its September 2025 v1 announcement describes those engineering concerns; the reference here uses the current documented interfaces.

The useful idea is familiar from the earlier lessons: make each boundary explicit. A request receives the manual data it may read, a tool exposes an operation, and the final answer must fit a declared structure. Our invented pump-manual example adds a citation check. It does not turn a well-formed sentence into a verified maintenance instruction.

Sources for this history