PydanticAI Agents
Use this skill when you care about typed contracts, validation, and clean Python engineering as much as raw model output.
Workflow
- Define the agent's structured inputs, outputs, and dependencies before writing prompts.
- Choose the provider model through PydanticAI's model layer so the workflow remains portable.
- Add tools, dependency injection, and structured outputs only where they simplify the system.
- Instrument the workflow with Logfire or another OTel-compatible backend before shipping.
- Back the agent with tests and evals, especially when schema correctness matters.
Guardrails
- Do not bypass typed outputs for convenience on critical workflows.
- Keep tool schemas strict and explicit.
- Prefer MCP integration through documented interfaces rather than hidden adapters.
- Treat observability as mandatory for production agents.
Output Requirements
- State the output schema strategy.
- State the provider/model path.
- State the observability path and one failure mode to test.


