Agent skill · magnus919

pydanticai

Build type-safe AI agents and graph-based workflows with PydanticAI and PydanticGraph. Agent creation, function tools, capabilities, dependency injection, structured output, streaming, multi-agent patterns, testing, evals, and graph state machines. Use whenever you are building agents, tool-using LLM workflows, or graph-based state machines in Python.

What it needs

About 8k tokens when loaded.

What this skill does

PydanticAI & PydanticGraph Expert Skill PydanticAI is a Python agent framework for building production-grade GenAI applications, built by the team behind Pydantic. PydanticGraph is its companion graph/state-machine library. Install: Quick Reference When to Load Which Reference Topic Load When File --- --- --- Agent creation & lifecycle You need to create, configure, or run an agent — define tools, deps, output types, run methods, streaming references/core-agents.md Capabilities & hooks You need built-in capabilities (Thinking, WebSearch, MCP, etc.), on-demand loading, lifecycle hooks, or custom capabilities references/capabilities-hooks.md PydanticGraph You need a state machine, graph-based control flow, parallel execution, BaseNode subclasses, or GraphBuilder with joins/decisions references/graph.md Models, output & streaming You need multi-model setups, FallbackModel, streaming output, output functions, or structured output with validation references/models-output.md Multi-agent patterns & integrations You need agent delegation, programmatic hand-off, MCP servers, durable execution, or UI adapters references/patterns.md Testing & evaluation You need TestModel, FunctionModel, pytest patterns, overrides, or Pydantic Evals for systematic eval references/testing-evals.md Full worked examples You want complete runnable examples — bank support agent, email feedback graph, multi-agent flight booking references/examples.md Framework boundaries You need to compare PydanticAI vs LangGraph for a project, or want to combine them references/hybrid-pydanticai-langgraph.md — also load skillview(name='langgraph') API surface reference You need to find the right import path, class name, or method signature quickly references/api-reference.md Common Patterns at a Glance Agent with tools and structured output → See references/core-agents.md for full agent lifecycle, run methods, and tool patterns. …

How to use it

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

@skills magnus919/pydanticai

View the source on GitHub

Browse the @skills marketplace