Agent skill · software engineering · aiskillstore

pydanticai-docs

Use this skill for requests related to Pydantic AI framework - building agents, tools, dependencies, structured outputs, and model integrations.

Why this skill is useful

Provides specific patterns and examples for building agents with Pydantic AI that the AI wouldn't reliably generate on its own.

What it needs

About 2k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

Pydantic AI Documentation Skill Overview This skill provides guidance for using Pydantic AI - a Python agent framework for building production-grade Generative AI applications. Pydantic AI emphasizes type safety, dependency injection, and structured outputs. Key Concepts Agents Agents are the primary interface for interacting with LLMs. They contain: Instructions: System prompts for the LLM Tools: Functions the LLM can call Output Type: Structured datatype the LLM must return Dependencies: Data/services injected into tools and prompts Models Pydantic AI supports multiple LLM providers via model identifiers. All models that supports tool-calling can be used with pydantic-ai-skills. Tools Two types of tools: @agent.tool: Receives RunContext with dependencies @agent.toolplain: Plain function without context Toolsets Collections of tools that can be registered with agents: FunctionToolset: Group multiple tools MCPServerTool: Model Context Protocol servers Third-party toolsets (ACI.dev, etc.) Instructions 1. Fetch Full Documentation For comprehensive information, fetch the complete Pydantic AI documentation: <https://ai.pydantic.dev/llms.txt> This contains complete documentation including agents, tools, dependencies, models, and API reference. 2. Quick Reference Basic Agent Creation Agent with Tools Structured Output Dependencies Using Toolsets Async Execution Streaming 3. Common Patterns Dynamic Instructions System Prompts Tool with Retries Testing with Override 4. Installation 5. Best Practices 1. Type Safety: Always define depstype and outputtype for better IDE support 2. Dependency Injection: Use deps for database connections, API clients, etc. 3. Structured Outputs: Use Pydantic models for validated, typed responses 4. Error Handling: Use retries parameter for unreliable tools 5. Testing: Use TestModel or override() for unit tests

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/pydanticai-docs

View the source on GitHub

Browse the @skills marketplace