smithery/fullfran

pydantic-ai

Expert guidance on building agents and tools with Pydantic AI.

Installation

$ npx skills add smithery/fullfran --skill pydantic-ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/fullfran.

npx skills add smithery/fullfran

Browse all from smithery/fullfran

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,296 B
  • docs SUMMARY.md 81 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Pydantic AI Expert Skill

This skill provides patterns for defining agents, dependencies, and tools using Pydantic AI.

🤖 Agent Definition

  • State Management: Use StateDeps[T] to pass dependencies (DB clients, settings) to agents.
  • System Prompts: Define complex prompts in src/prompts.py. Use @agent.instructions for dynamic context.
  • Model Choice: Use OpenAIModel as a base for OpenAI-compatible providers (OpenRouter, Ollama) via OpenAIProvider.

🛠️ Tool Patterns

  • Return Strings: Agents work best with text. Tools should return formatted strings, not Pydantic objects.
  • Resource Management: Initialize and cleanup DB connections properly within the tool or via injected deps.
  • Error Handling: Tools should catch exceptions and return helpful error messages to the agent rather than crashing.

📺 CLI & Streaming

  • Rich Integration: Use Rich to display real-time streaming of agent output and tool call details.
  • Node Handling: Implement logic for userprompt, modelrequest, call_tools, and end nodes in the CLI.
  • Transparency: Always show the user which tool is being called and with what parameters.