pydantic-ai-rag
This project is included in pydantic-ai-toolbox.
Install
pip install "pydantic-ai-toolbox[rag]"
Usage
from pydantic_ai import Agent
from pydantic_ai_toolbox import RAGToolset
rag = RAGToolset(
embedder=my_embedder,
chunk_size=1000,
chunk_overlap=100,
storage_path="./index",
distance="cosine",
max_results=20,
namespace="default",
)
rag.add_text("The sky is green.", doc_id="d-sky")
agent = Agent("openai:gpt-4o", toolsets=[rag])
agent.run_sync("What color is the sky?")
embedder is any callable mapping list[str] -> list[list[float]] (OpenAI, a local model, or a stub for tests).
Full reference and a runnable example: RAG.md.
Metadata
Release files for pydantic-ai-rag 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pydantic_ai_rag-0.0.0.tar.gz | 2.3 kB | With provenance | Details for pydantic_ai_rag-0.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydantic_ai_rag-0.0.0-py3-none-any.whl | Python 3 | none | any | Details for pydantic_ai_rag-0.0.0-py3-none-any.whl |
Total release size: 5.1 kB
Release files / pydantic_ai_rag-0.0.0.tar.gz
| Download URL | pydantic_ai_rag-0.0.0.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6321f22dc8e57b806a1da6f244fd085aabbef2d95e23ce0521a17910136bc510
|
|
BLAKE2b-256 checksum How to use checksums |
c23b97dd980830b862732eb215c80c5385f624105201d182d06e7f9ee20d98bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 19, 2026.
Transparency logRelease files / pydantic_ai_rag-0.0.0-py3-none-any.whl
| Download URL | pydantic_ai_rag-0.0.0-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89eec645988326d4044cd8e8e38e07031100edb07ea8096bb4849e37193f656c
|
|
BLAKE2b-256 checksum How to use checksums |
e3b5fcd013cba8e4e69a23feb1de0fd36ad78f7f4c32e6799db790665914edd0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 19, 2026.
Transparency logSecurity for pydantic-ai-rag 0.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pydantic_ai_rag-0.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.