Skip to main content

strands-mongodb-store

A MongoDB Vector Search MemoryStore for Strands Agents — semantic long-term agent memory using Automated Embedding: MongoDB generates the embeddings itself (via Voyage AI), so you store plain text and query with plain text — no external embedder, no vectors to manage.

pip install strands-mongodb-store
from strands import Agent
from strands.memory import MemoryManager
from strands_mongodb_store import MongoDBMemoryStore

store = MongoDBMemoryStore(
    name="user-memories",
    connection_string="mongodb://localhost:27017",   # self-managed, or an Atlas SRV URI
    database_name="agent", collection_name="memory",
    model="voyage-4-lite",
)
agent = Agent(memory_manager=MemoryManager(stores=[store]))

await store.add("The user prefers dark mode", metadata={"kind": "pref"})
hits = await store.search("what theme does the user like?")

How it works

  • Automated Embedding. The vector index is created with a type: "autoEmbed" field and a Voyage model; MongoDB embeds your content at index-time and your query text at query-time. add stores just {_id, content, metadata, createdAt} — no vectors in your documents.
  • Semantic recall via $vectorSearch ("query": <text>), ranked by vectorSearchScore, surfaced as _score.
  • The vector index is created automatically if absent.

Requirements

MongoDB Vector Search with Automated Embedding, on either:

  • MongoDB Atlas, or
  • self-managed MongoDB Community 8.2+ running the mongot binary (Linux; Docker / tarball / package / K8s).

Automated Embedding needs a Voyage AI API key configured on the deployment (Atlas, or mongot for Community). Models: voyage-4-lite (default), voyage-4, voyage-4-large, voyage-code-3.

The memory store (strands-mongodb-store) is distinct from the byte storage backend (strands-mongodb-storage). Also published as strands-store-mongodb. 0.2.0 switched from manual embeddings to Automated Embedding (breaking).

License

MIT

Metadata

Release files for strands-mongodb-store 0.2.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 strands-mongodb-store 0.2.0
File Size Uploaded Provenance
strands_mongodb_store-0.2.0.tar.gz 4.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for strands-mongodb-store 0.2.0
File Interpreter ABI Platform
strands_mongodb_store-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.6 kB

Release files / strands_mongodb_store-0.2.0.tar.gz

Download URL strands_mongodb_store-0.2.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
aaaa83ac7ff6058c93ed30a171a7796e06f7607639b169fee5a78e34edc1fbab
BLAKE2b-256 checksum
How to use checksums
4e96dd51d2eef7867aea1c90f41ae97f779d10f06577c5de8bf7537cfeaf53cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / strands_mongodb_store-0.2.0-py3-none-any.whl

Download URL strands_mongodb_store-0.2.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aca10e9b7914055885d6a2f5cd3becdc0854e3213fb1f5822137d6d787dcde75
BLAKE2b-256 checksum
How to use checksums
d8774d4ad8c77b8da53eb26c1a1af7a93513ca55ae11b8ba3a3ba6aa60f35ff6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Security for strands-mongodb-store 0.2.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.2.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