MongoDB launched an integration for the Strands Harness SDK on November 18, 2026, shipped as a new open-source Python package called strands-mongodb. It lets agents built with Strands, the open-source agent framework maintained by AWS, keep their conversation sessions and long-term memories in MongoDB instead of on local disk or in Amazon S3.
The release targets a real pain point for teams that run agents on serverless or container platforms. When every request can land on a fresh instance, an agent forgets everything unless its state lives in a shared store. With this package, one MongoDB connection holds sessions, memories and the vector search used to recall them.
What MongoDB Released
The Strands Harness SDK lets developers swap the storage and memory layers, and until now it came with file and S3 options. The new package adds MongoDB as a drop-in backend through two main classes:
- MongoDBStorage: passed to the agent's storage parameter, it takes over storage for five parts of the SDK, including sessions, transcripts and context offloading. It works on any MongoDB deployment.
- MongoDBMemoryStore: holds long-term facts that outlive a single session, such as a user's preferences, and makes them searchable by meaning. Search with automatic embeddings requires MongoDB Atlas.
The Strands MemoryManager still decides what is worth remembering and when to look it up. MongoDB only handles where those memories live and how they are retrieved, so there is no custom memory code for developers to write.
Key Features of the Memory Store
MongoDB built in several protections that production agents tend to need:
- Deduplication: each memory gets a content hash, so when the agent extracts the same fact twice, the second write does nothing and the original timestamp and expiry are kept.
- Scoping: each stored fact carries an owner label, for example a customer or account ID, and lookups and removals never cross that label.
- Flexible search: the store picks vector search, Atlas Search text search or a hybrid of both using $rankFusion, depending on what the deployment supports, and each result reports which method was used.
- Retention control: sessions and memories can have separate retention periods, and a store can delete one memory or all of them on request.
- Tracing: every operation emits an OpenTelemetry span on the app's existing tracer, without recording memory content.
How It Works
On Atlas, memories are embedded automatically through Atlas Automated Embedding, which defaults to the voyage-4-lite model. The app writes and searches plain text, and Atlas creates and refreshes the vectors in the background. That means no embedding library and no separate model API key, though teams that already produce their own embeddings can index those instead.
Because embedding happens after the write returns, a new memory is not searchable instantly. MongoDB's own sample code polls for a short time before the fact shows up in results, which is worth copying in tests.
For sessions, a SnapshotSessionManager from the SDK records the chat against a session ID. Any agent built later with that same ID, on any machine, restores the conversation and carries on. MongoDB's example is an agent deployed as an AWS Lambda function, where two different instances can serve back-to-back turns of the same chat.
What It Means for Developers
Teams that already keep application data in MongoDB get agent state in the same place, under the same backups and access controls. Agents can also ground their answers in that operational data through Atlas Vector Search, without syncing a copy to a separate vector database.
Pay attention to the note on tenant isolation. The scope filter is enforced by the Python package, not by the database server. When customers must be separated for regulatory reasons, MongoDB itself recommends a separate database or collection per tenant with restricted credentials.
This is the latest in a series of agent framework integrations from MongoDB, following its Google ADK integration for agent memory. Oracle developers looking at the same problem can compare it with agent memory in Oracle AI Database.
How to Get Started
You need at least Python 3.10, plus version 1.54.0 or newer of strands-agents. Install it with pip using the extra that fits your needs: storage for sessions, memory for the memory store, or all for both.
Calling initialize on the memory store creates the indexes it needs. Teams moving off the older mongodb_memory tool, or off a third-party MongoDB package, will find a MIGRATION document with field mappings and a script to copy existing data.
Conclusion
strands-mongodb gives Strands agents durable sessions and searchable long-term memory backed by one MongoDB connection, with deduplication, scoping and tracing included. It fits best for teams running stateless agents that already rely on MongoDB or Atlas.
Sources
See my articles more often when you search Google.
