fullfran-pydantic-ai

Installation
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

Installs
First Seen
fullfran-pydantic-ai — smithery/ai