Skip to content

building-pydantic-ai-agents

Build AI agents with Pydantic AI — tools, capabilities (including on-demand loading), workspaces, structured output, streaming, testing, and multi-agent

— (0 ratings) 6.8K downloads pydantic
$ npx skills add https://github.com/pydantic/skills --skill building-pydantic-ai-agents

Skills can run code on your computer. Review the source before installing. This listing is community-made and isn't affiliated with Anthropic.

About this skill

Building AI Agents with Pydantic AI

Pydantic AI is a Python agent framework for building production-grade Generative AI applications.
This skill provides patterns, architecture guidance, and tested code examples for building applications with Pydantic AI.

When to Use This Skill

Invoke this skill when:

  • User asks to build an AI agent, create an LLM-powered app, or mentions Pydantic AI
  • User wants to add tools, capabilities (thinking, web search), or structured output to an agent
  • User asks to define agents from YAML/JSON specs or use template strings
  • User wants to stream agent events, delegate between agents, or test agent behavior
  • Code imports pydantic_ai or references Pydantic AI classes (Agent, RunContext, Tool)
  • User asks about hooks, lifecycle interception, or agent observability with Logfire
  • User wants to reach models from several providers with one API key (the Pydantic AI Gateway)
  • User wants an agent to run commands or access files in an attached workspace
  • The agent design includes optional instructions, specialist workflows, long-tail tools, or any context the model does not need on most turns

Installs: 6.8K | GitHub stars: 161 | First seen: Mar 26, 2026

Related skills

New

Agent workflows

find-skills

Helps users discover and install agent skills.

New • 4.6M
New

Agent workflows

agent-browser

Fast, persistent browser automation with session continuity across sequential agent commands.

New • 1.8M
New

Agent workflows

handoff

Summarize conversations into handoff documents for seamless agent-to-agent transitions.

New • 1.2M