“pydantic-ai”
Building an E-Commerce Cart Agent with Structured Tool Outputs
Cart tools that return free text push JSON parsing into your agent prompt. Build a Pydantic AI cart agent where add, update, remove, price, and checkout-prepare each return a validated Pydantic model, with recoverable validation errors and TestModel tests.
Compliance as an Agent Task: Automating Policy Checks with Verifier Agents
Build verifier agents that check every proposed agent action against codified policy, with fail-closed defaults, guardrail placement, and eval-backed tests.
Insurance Claims Triage Agents with Structured Classification
Build an intake agent that classifies claims with Pydantic schemas, verifiable evidence, confidence-based escalation, evals, and a full audit trail.
Sharing State Across Agent Boundaries: Context Contracts
Define type-safe context contracts with PydanticAI to share validated state safely across multi-agent handoffs and boundary transitions.
Sanitizing Agent Inputs: Prompt Validation Before Inference
Protect PydanticAI agents against prompt injection, jailbreaks, and malformed inputs using typed input contracts and pre-inference sanitization filters.
Creating Effective File-Based Skills
A comprehensive guide on creating file-based skills for AI agents, covering the structure of SKILL.md and best practices for writing custom scripts.