This walks you through the four main ways to test PydanticAI agents without burning API credits on every test run. TestModel gives you deterministic responses, FunctionModel lets you write custom logic that inspects messages and decides what to return, VCR cassettes record and replay real API calls, and inline snapshots auto-update your assertions. The gates section is worth reading if you use VCR or snapshots, it's a four-step checklist that keeps you from accidentally rewriting files you didn't mean to touch. Good coverage of tool testing and dependency mocking too. If you're writing agents in production, you'll use at least two of these patterns.
npx skills add https://github.com/existential-birds/beagle --skill pydantic-ai-testing