Skip to content

Third-Party Capabilities

Capabilities are the recommended way for third-party packages to extend Pydantic AI, since they can bundle tools with hooks, instructions, and model settings. See Extensibility for the full ecosystem, including third-party toolsets that can also be wrapped as capabilities.

Before reaching for a package here, check the capability index, which covers Pydantic AI and Pydantic AI Harness, the official capability library, including planning, compaction, sub-agents, guardrails, file system and shell access, and sandboxes. This page lists community packages for use cases those don’t cover, or that build on them.

Agent Skills

Pydantic AI Harness’s Skills turns each SKILL.md package in a workspace directory into an on-demand capability that the model loads when it needs it. Building on Skills:

  • pydantic-ai-skills by Doug Trajano - SkillsCapability hands SKILL.md discovery, validation, and instruction rendering to Skills and adds what it leaves out. read_skill_resource and run_skill_script tools reach a loaded skill’s bundled references/, assets/, and scripts/ files, with ${SKILL_DIR} placeholders substituted for real paths, and scripts run through a pluggable executor with container and virtual-filesystem sandboxes. Remote skill libraries come from GitSkillsRegistry and S3SkillsRegistry, and skills defined in Python can sit in the same catalog as SKILL.md skills.

Data & Analytics

Capabilities for querying and analyzing structured data help agents answer questions over files and databases:

  • pydantic-ai-chdb - ChDBCapability gives agents analytical SQL over local files (Parquet/CSV/JSON), object storage, and remote databases with chDB, the in-process ClickHouse engine — the engine itself needs no server or connection string to run (remote sources are reached via ClickHouse table functions, which take their own credentials). Registers run_select_query (read-only ClickHouse SQL with parameter binding), list_databases, list_tables, describe_table, get_sample_data, list_functions, and attach_file (opt-in writable sessions) tools plus schema-first instructions. Sessions default to the engine-level readonly=2 setting with capped results, and typed engine errors are mapped to ModelRetry so the model can correct its queries. Works with agent specs out of the box, so it can be loaded via from_spec / Agent.from_spec. Also available as a lower-level toolset via ChDBCapability(...).get_toolset().

Retrieval & RAG

Pydantic AI demonstrates the retrieval pattern in the RAG example, where a search tool is registered against a vector database. The following community-developed packages provide reusable implementations of this pattern as capabilities, bundling retrieval tools with citation handling and instructions:

  • haiku.rag - Local-first document RAG for Pydantic AI agents, backed by embedded LanceDB with no database server required. RAGCapability provides hybrid vector and full-text search, optional reranking, structure-aware context expansion, and citations to page numbers and section headings. Each document’s DoclingDocument structure is preserved, which is what the context expansion and the page and section citations resolve against. Retrieved figures are passed to vision-capable models as images, and with a multimodal embedder they share the text vector space, so a text query can retrieve a figure and an image can be the query. For questions requiring computation across a corpus, AnalysisCapability combines search and citations with model-written Python executed in a Monty sandbox over a virtual document filesystem. EvidenceCompactionCapability keeps multi-turn requests smaller by retaining previously cited evidence while replacing uncited earlier search results, and CitationPolicyCapability requires answers to explicitly declare whether, and by what, they are grounded. The retrieval and analysis capabilities support deferred loading. The package also exposes lower-level toolsets through create_search_toolset() and create_document_toolset().

To add your package to this page, open a pull request.

To publish your own capability package, see Publishing capabilities and Extensibility.