Registry / llm-agents / pydantic-ai-skills

pydantic-ai-skills

JSON →
library0.10.0pypypi✓ verified 86d ago

A lightweight agent skill implementation for Pydantic AI, providing a framework for defining, loading, and executing reusable skills (tools) for AI agents. Current version 0.10.0 supports programmatic and filesystem-based skills, Git registries, and integration with pydantic-ai agents. Released on a rapid cadence (~monthly).

pip install pydantic-ai-skills
INSTALL
IMPORT
SIG · PYDANTIC-AI-SKILLS
P
pydantic-ai-skills
llm-agentspythonv0.10.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SkillsToolset
from pydantic_ai_skills import SkillsToolset
from pydantic_ai_skills.toolset import SkillsToolset
SkillsToolset is re-exported from the top-level package; the submodule path changed in v0.5.0.
Skill
from pydantic_ai_skills import Skill
from pydantic_ai_skills.models import Skill
Skill class moved to top-level in v0.5.0.

Quickstart: create a programmatic skill and use it with a pydantic-ai agent.

from pydantic_ai import Agent from pydantic_ai_skills import SkillsToolset, Skill # Define a skill programmatically skill = Skill( name="greet", description="Greet the user by name.", content="Greet the user politely.", scripts=[ { "language": "python", "code": "def greet(name: str) -> str:\n return f'Hello, {name}!'", "entrypoint": "greet" } ] ) # Create agent with skills toolset agent = Agent('openai:gpt-4o', tools=SkillsToolset(skills=[skill])) # Run agent result = agent.run_sync('Greet Alice') print(result.data)
Debug
Known issues
breakingIn v0.10.0, SkillException hierarchy was replaced with ModelRetry and stdlib exceptions. Code catching SkillException will break.
fix
Replace `except SkillException:` with `except ModelRetry:` or appropriate stdlib exception (e.g., ValueError).
affects: <0.10.0
breakingv0.9.0 dropped compatibility with pydantic-ai versions earlier than 1.74. Older pydantic-ai versions are no longer supported.
fix
Upgrade pydantic-ai to >=1.74.
affects: <0.9.0
deprecatedSkillsToolset auto_reload parameter (introduced in v0.6.0) is now deprecated. Use reload() method explicitly.
fix
Remove `auto_reload=True` and call `.reload()` manually when needed.
affects: 0.6.0 - 0.9.0
Errors
Common errors & fixes
AttributeError: module 'pydantic_ai_skills' has no attribute 'Skill'
Using an older version (<0.5.0) where Skill was not re-exported, or importing from wrong submodule.
fix
Upgrade to v0.5.0+ or import from pydantic_ai_skills.models.Skill (deprecated).
ImportError: cannot import name 'SkillException' from 'pydantic_ai_skills'
SkillException was removed in v0.10.0.
fix
Use ModelRetry from pydantic_ai.exceptions or stdlib exceptions instead.
Upgrade
Version history
0.10.0latest on PyPI · released May 9, 2026
Audit
Dependencies
pydantic-ai>=0.1.74requiredRequired for RunContext, ModelRetry, and agent integration
gitpython>=3.1optionalRequired for GitSkillsRegistry
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
pydantic-ai-skills — pip install pydantic-ai-skills · libregistry