Skip to main content

pydantic-ai-dynamodb-persistence

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

Install

pip install pydantic-ai-dynamodb-persistence
# or via the core extra:
pip install "pydantic-ai-persistence[dynamodb]"

Requires Python 3.10+.

Usage

Durable step persistence

from pydantic_ai import Agent
from pydantic_ai_harness.step_persistence import StepPersistence
from pydantic_ai_dynamodb_persistence import DynamoDBStepStore

store = DynamoDBStepStore(table_name="pai-steps", region_name="us-east-1",
                         max_snapshots_per_run=20)
agent = Agent("openai:gpt-4o", capabilities=[StepPersistence(store=store)])

Message history

from pydantic_ai_dynamodb_persistence import DynamoDBHistoryStore

store = DynamoDBHistoryStore(table_name="pai-history", region_name="us-east-1")
await store.save("conv-1", result.all_messages())
prior = await store.load("conv-1")

API

  • DynamoDBStepStore(table_name, *, region_name=None, boto_session=None, endpoint_url=None, max_snapshots_per_run=None)
  • DynamoDBHistoryStore(table_name, *, region_name=None, boto_session=None, endpoint_url=None)
  • DynamoDBAsyncKV(...) — the underlying AsyncKV (offloads sync boto3 to a thread).

Standard boto3 auth (env / profile / SSO / IAM role). Single table, PK + SK string keys, auto-created (on-demand billing).

Note: PydanticAI's StepStore is a beta/experimental harness feature; its API may still change.

License

MIT

Metadata

Release files for pydantic-ai-dynamodb-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-dynamodb-persistence 0.1.0
File Size Uploaded Provenance
pydantic_ai_dynamodb_persistence-0.1.0.tar.gz 4.2 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 7.8 kB

Release files / pydantic_ai_dynamodb_persistence-0.1.0.tar.gz

Download URL pydantic_ai_dynamodb_persistence-0.1.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
41cc40f92d0c36e8db0016250cf453ca626f9fe71a30f62db4004feffab600f4
BLAKE2b-256 checksum
How to use checksums
f1b438d85631b010e0f2b7c62c0d66cf707ad8f21047844423a791c6a4aab5d4
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_dynamodb_persistence-0.1.0-py3-none-any.whl

Download URL pydantic_ai_dynamodb_persistence-0.1.0-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e1ef48bd4a6895c82ac65f54d9010c7db6cba9ccfb11de84286c3a9cfb01ca2
BLAKE2b-256 checksum
How to use checksums
c007f2169b8cee03d726f8361d85a0f3e058691753dca2865e8760aee024d548
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-dynamodb-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