Skip to main content

pydantic-ai-firestore-persistence

Google Firestore backend for pydantic-ai-persistence — a PydanticAI StepStore (durable events / snapshots / tool-effect ledger) and message-history store, on Firestore.

Install

pip install pydantic-ai-firestore-persistence
# or:  pip install "pydantic-ai-persistence[firestore]"

Usage

from pydantic_ai import Agent
from pydantic_ai_harness.step_persistence import StepPersistence
from pydantic_ai_firestore_persistence import FirestoreStepStore

store = FirestoreStepStore(
    project_id="my-gcp-project",
    root_collection="pai_persistence",
    max_snapshots_per_run=20,
)
agent = Agent("openai:gpt-4o", capabilities=[StepPersistence(store=store)])

FirestoreHistoryStore(project_id=…) provides save/load message history. Authentication uses Application Default Credentials (gcloud auth application-default login).

Data model

Each partition key maps to a document <root>/<enc(PK)> whose items subcollection holds one doc per sort key: <enc(SK)> → {SK, data}. Doc ids are URL-encoded (Firestore ids can't contain /); the raw SK is a field so prefix/range queries work within a subcollection without extra indexes.

Note: PydanticAI's StepStore is a beta/experimental harness feature.

License

MIT

Metadata

Release files for pydantic-ai-firestore-persistence 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydantic-ai-firestore-persistence 0.1.0
File Size Uploaded Provenance
pydantic_ai_firestore_persistence-0.1.0.tar.gz 4.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pydantic-ai-firestore-persistence 0.1.0
File Interpreter ABI Platform
pydantic_ai_firestore_persistence-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / pydantic_ai_firestore_persistence-0.1.0.tar.gz

Download URL pydantic_ai_firestore_persistence-0.1.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
495ce0e29f233dea713e7975f951483cf89039135bab74bdd5e99b6b33c3f792
BLAKE2b-256 checksum
How to use checksums
b7e1ad1bc4e1f54beb149cc28c4d0730165e865cf5b58035b5f8f69c3dc21c22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / pydantic_ai_firestore_persistence-0.1.0-py3-none-any.whl

Download URL pydantic_ai_firestore_persistence-0.1.0-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c11be450ea341cb32cd711a6fcdc030e86bd54751efd192a2f092a8ad087b356
BLAKE2b-256 checksum
How to use checksums
9db334284a0a3815453b223450c219a38ca3a61fdf5948d999e33dfb743d8f85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Security for pydantic-ai-firestore-persistence 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page