LogFire is built by the Pydantic team specifically for Python applications, with native Pydantic AI integration
Full visibility into LLM calls
MCP tools and regular tools
Automatic cost calculation
Rich formatting for history
Latency, success rates
Detailed span information
The integration is opt-in and works gracefully when LogFire is not configured!
# Install Pydantic AI support uv tool install superoptix --with "superoptix[frameworks-pydantic-ai]" # Install LogFire observability (separate, optional) uv tool install superoptix --with "superoptix[logfire]" # Or install both together uv tool install superoptix --with "superoptix[frameworks-pydantic-ai,logfire]"
Important: LogFire is NOT included in superoptix[all] due to OpenTelemetry version conflicts with google-adk. Install LogFire separately!
superoptix[frameworks-pydantic-ai,logfire] - Works!superoptix[frameworks-openai,logfire] - Works!superoptix[all] - Works! (LogFire not included)superoptix[all,logfire] - Fails! (google-adk conflict)apiVersion: agent/v1 kind: AgentSpec metadata: name: Developer Assistant version: "1.0.0" spec: # LogFire configuration - place it here in the spec section logfire: enabled: true # Default: true (auto-detects if LogFire is available) # Other spec configurations (same level) language_model: provider: ollama model: llama3.1:8b api_base: http://localhost:11434 persona: role: Software Developer goal: Write clean code
# 1. Authenticate with LogFire (one-time setup) logfire auth # 2. LogFire auto-configures after auth # No additional code needed! # 3. Run your agent super agent run developer --goal "Your task" # 4. View traces at https://logfire.pydantic.dev
After authenticating, traces are automatically sent to LogFire Cloud!
# 1. Initialize project super init my_project cd my_project # 2. Pull agent super agent pull developer # 3. Enable LogFire in playbook (edit playbook YAML) # Add to spec section: # spec: # logfire: # enabled: true # 4. Authenticate with LogFire (one-time setup) logfire auth # 5. Compile with Pydantic AI super agent compile developer --framework pydantic-ai # 6. Run agent (LogFire traces captured automatically) super agent run developer --goal "Implement a REST API endpoint" # 7. View traces at https://logfire.pydantic.dev
Solution: Verify LogFire is authenticated: logfire auth. Check if LogFire is configured before agent initialization.
Solution: uv tool install superoptix --with "superoptix[frameworks-pydantic-ai,logfire]"
Solution: Ensure LogFire is configured BEFORE agent initialization. Re-compile agent: super agent compile developer --framework pydantic-ai
If LogFire is not installed or not configured, the integration silently skips instrumentation. Your agent will work normally without errors. This is intentional - LogFire is optional!