crewai-memory-dynamodb
An Amazon DynamoDB StorageBackend for CrewAI's unified Memory — hierarchical scopes, categories, metadata filters, importance/recency, and native vector search via DynamoDB SearchVectors. No external vector database.
pip install crewai-memory-dynamodb
from crewai import Crew
from crewai.memory import Memory
from crewai_memory_dynamodb import DynamoDBMemoryBackend
backend = DynamoDBMemoryBackend(table_name="crewai-memory", dimensions=3072) # match your embedder
memory = Memory(storage=backend) # CrewAI does LLM analysis, scoping, scoring
crew = Crew(agents=[...], tasks=[...], memory=memory)
memory.remember("The customer prefers email over phone", scope="/customers/acme", categories=["preference"])
memory.recall("how should we contact acme?", scope="/customers")
Or register it once for every Crew(memory=True):
from crewai.memory.storage.factory import set_memory_storage_factory
set_memory_storage_factory(lambda spec: DynamoDBMemoryBackend("crewai-memory", dimensions=3072))
How it works
- One table:
PK= scope path,SK= record id, plus aby_idGSI and a vector index onembedding(cosine,dimensions) whose search schema declaresPKas an inline filter. Auto-created (PAY_PER_REQUEST); the vector index can only be declared at creation, so use a new table to changedimensions. searchruns nativeSearchVectorsonce per concrete scope under the requested prefix (DynamoDB allows only equality on a string search-schema attribute), merges by similarity (1 - distance), then appliescategories/metadata_filter/min_scoreon the candidates (oversampled ×3 when filtering).- Scope tree, category counts,
list_records,delete(older_than=...),reset,touch_recordsare query/scan based — sized for agent-memory volumes. dimensionsmust equal theMemoryembedder's output size (CrewAI defaulttext-embedding-3-large= 3072; Bedrock Titan v2 = 1024).
Requires boto3>=1.43.78 and a region where DynamoDB vector search is available. Permissions: DescribeTable, CreateTable, GetItem, PutItem, DeleteItem, BatchWriteItem, Query, Scan, SearchVectors.
Docs: https://skamalj.github.io/agentstate-reducer/ · part of crewai-memory
License
MIT
Metadata
Release files for crewai-memory-dynamodb 0.1.1
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 |
|---|---|---|---|---|
| crewai_memory_dynamodb-0.1.1.tar.gz | 5.4 kB | Without provenance | Details for crewai_memory_dynamodb-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crewai_memory_dynamodb-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for crewai_memory_dynamodb-0.1.1-py3-none-any.whl |
Total release size: 10.7 kB
Release files / crewai_memory_dynamodb-0.1.1.tar.gz
| Download URL | crewai_memory_dynamodb-0.1.1.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f43c6124ff503fbfd7b22e8a927c3bfaa72b8801327f2339203fb5a987ffe1e8
|
|
BLAKE2b-256 checksum How to use checksums |
c4274060a5656adb2df16e931d3d883b1430f6a9d36bcdfd28a00c366467f27e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / crewai_memory_dynamodb-0.1.1-py3-none-any.whl
| Download URL | crewai_memory_dynamodb-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
992564648e46c16f9483b6c9593cf12c4959a008c390ba3c014b54adf35baaa2
|
|
BLAKE2b-256 checksum How to use checksums |
ccc0787a098a606e41e0f793e0310417032119263fed22fc7ea570b4d8856e17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for crewai-memory-dynamodb 0.1.1
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.