スキル一覧に戻る
FullFran

pydantic-ai

by FullFran

0🍴 0📅 2026年1月25日
GitHubで見るManusで実行

SKILL.md


name: pydantic-ai description: Expert guidance on building agents and tools with Pydantic AI.

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 user_prompt, model_request, call_tools, and end nodes in the CLI.
  • Transparency: Always show the user which tool is being called and with what parameters.

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です