pydantic-ai-agent-creation
Create PydanticAI agents with type-safe dependencies, structured outputs, and proper configuration. Use when building AI agents, creating chat systems, or integrating LLMs with Pydantic validation.
npx skills add majiayu000/claude-skill-registry --skill pydantic-ai-agent-creation-existential-birds-beagle-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Creating PydanticAI Agents ## Quick Start ```python from pydantic_ai import Agent # Minimal agent (text output) agent = Agent('openai:gpt-4o') result = agent.run_sync('Hello!') print(result.output) # str ``` ## Model Selection Model strings follow `provider:model-name` format: ```python # OpenAI agent = Agent('openai:gpt-4o') agent = Agent('openai:gpt-4o-mini') # Anthropic agent = Agent('anthropic:claude-sonnet-4-5') agent = Agent('anthropic:claude-haiku-4-5') # Google agent = Agent('google-gla:gemini-2.0-flash') agent = Agent('google-vertex:gemini-2.0-flash') # Others: groq:, mistral:, cohere:, bedrock:, etc. ``` ## Structured Outputs Use Pydantic models for validated, typed responses: ```python from pydantic import BaseModel from pydantic_ai import Agent class CityInfo(BaseModel): city: str country: str population: int agent = Agent('openai:gpt-4o', output_type=CityInfo) result = agent.run_sync('Tell me about Paris') print(result.output.city) # "Paris" print(result.output.population) # int, validated ``` ## Agent Configuration ```python from pydantic_ai import Agent from pydantic_ai.settings import ModelSettings agent = Agent( 'openai:gpt-4o', output_type=MyOutput, # Structured
- Quick Start
- Model Selection
- Structured Outputs
- Agent Configuration
- Running Agents
- Instructions vs System Prompts
- Common Patterns
- Parameterized Agent (Type-Safe)
- No Dependencies (Satisfy Type Checker)
- Verification gates
- Decision Framework
What does the pydantic-ai-agent-creation skill do?
Create PydanticAI agents with type-safe dependencies, structured outputs, and proper configuration. Use when building AI agents, creating chat systems, or integrating LLMs with Pydantic validation.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill pydantic-ai-agent-creation-existential-birds-beagle-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
