Suggested first-project workflow
Install pydantic-ai with pip or uv
Run pip install pydantic-ai (and optionally pydantic-ai-harness or logfire) in your Python environment.
Prototype offline with the built-in test model
Verify dependencies, tools, and structured output schemas using Agent("test") before configuring external provider keys.
Wire providers, fallbacks & MCP tools
Set your provider key or Pydantic AI Gateway key, add ModelFallback capabilities, and attach Python tools or MCP servers.
Instrument traces in Logfire or OTEL
Call logfire.configure() and logfire.instrument_pydantic_ai() to inspect spans on Logfire’s free Personal tier or your own OTEL collector.
User experiences