crewai-memory-firestore
A Google Firestore StorageBackend for CrewAI's unified Memory — hierarchical scopes, categories, metadata filters, importance/recency, and native vector search via find_nearest.
pip install crewai-memory-firestore
from crewai import Crew
from crewai.memory import Memory
from crewai_memory_firestore import FirestoreMemoryBackend
backend = FirestoreMemoryBackend(project_id="my-project", collection="crewai_memory", dimensions=3072) # match your embedder
memory = Memory(storage=backend)
crew = Crew(agents=[...], tasks=[...], memory=memory)
Or once for every Crew(memory=True): set_memory_storage_factory(lambda spec: FirestoreMemoryBackend(...)). Authentication uses Application Default Credentials.
How it works
- One collection, one document per record (doc id = record id) with the embedding stored as a Firestore
Vector. searchuses nativefind_nearest(cosine) after a scope pre-filter. A scope subtree is two queries (the exact scope, and thescope/…range) merged by similarity; score is1 - distance.categories/metadata_filter/min_scoreare applied on the candidates.- Firestore requires a composite vector index
scope ASC + embedding (flat, dims). Withcreate_index=True(default) the backend creates it through the Admin API if missing; the build is asynchronous and vector queries fail withFAILED_PRECONDITIONuntil it is READY (a few minutes). Needsdatastore.indexes.create/list, or create it yourself and passcreate_index=False:
gcloud firestore indexes composite create --collection-group=crewai_memory --query-scope=COLLECTION \
--field-config=order=ASCENDING,field-path=scope \
--field-config=vector-config='{"dimension":"3072","flat":"{}"}',field-path=embedding
Docs: https://skamalj.github.io/agentstate-reducer/ · part of crewai-memory
License
MIT
Metadata
Release files for crewai-memory-firestore 0.1.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 |
|---|---|---|---|---|
| crewai_memory_firestore-0.1.0.tar.gz | 4.9 kB | Without provenance | Details for crewai_memory_firestore-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crewai_memory_firestore-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for crewai_memory_firestore-0.1.0-py3-none-any.whl |
Total release size: 9.7 kB
Release files / crewai_memory_firestore-0.1.0.tar.gz
| Download URL | crewai_memory_firestore-0.1.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
355a865cd77491df8b8d720c3fff7f81d1db14c809bf5be2837a354b6369cd36
|
|
BLAKE2b-256 checksum How to use checksums |
c79cc099369d3dae150cea88b75e827ccb1ab17439d102fa7437e649507cf1f8
|
| 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_firestore-0.1.0-py3-none-any.whl
| Download URL | crewai_memory_firestore-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
354c727740745e81514cd48a8d8e15a71e138f3af1954c45a728e62ebacb6642
|
|
BLAKE2b-256 checksum How to use checksums |
27ca3045f1a32ab438b4c5702998d53cee3973596c266799305321452092ad0f
|
| 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-firestore 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.