AI NewsDev toolsAnnouncement

MongoDB releases strands-mongodb, a Python package for Strands agents

MongoDB released strands-mongodb, an open-source Python package that gives Strands agents persistent sessions, memory and vector search in MongoDB Atlas.

AI News

Editorial2 min read

LinkedInX
MongoDB and Strands integration diagram

Why it mattersStrands uses a local-file memory backend by default. An agent forgets a conversation when the process restarts. A production agent needs persistent memory.

MongoDB released strands-mongodb on 18 November. It is an open-source Python package that plugs MongoDB Atlas in as the storage behind Strands. Strands is the open-source agent framework that AWS builds and maintains. The package lives at mongodb/strands-mongodb on GitHub.

What the package provides

Strands comes with pluggable storage and memory backends, and comes default backends for local files and Amazon S3. The MongoDB package adds three things.

Session persistence. An agent resumes a conversation after a restart or on a different machine. The framework reads the session state from MongoDB rather than from a local file.

Long-term memory. Facts and lessons carry across conversations, stored as documents in MongoDB. The package deduplicates by content hash, so the same fact is not written twice.

Vector search. Past interactions are retrieved by meaning, using MongoDB Atlas Vector Search. The package also supports text search through Atlas Search and hybrid search through $rankFusion. It picks the best search type for the query.

Scoping and embedding

Every memory is stamped with a scope, which is a tenant or user ID. Searches are limited to that scope. The package enforces the scope itself, so an agent cannot read another tenant's memories by accident.

Embeddings are handled by Atlas Automated Embedding, with voyage-4-lite as the default model. A team does not run a separate embedding pipeline. OpenTelemetry spans record every operation, without capturing memory content.

Requirements and install

The package needs Python 3.10 or newer and strands-agents 1.54.0 or newer. It is installed from PyPI as strands-mongodb, with extras for storage, memory or both. A connection string and a database name go into the Agent constructor. The Strands SnapshotSessionManager and MemoryManager wire the MongoDB stores into the agent.

Who this is for

Teams that build on Strands, the AWS agent framework. Strands comes with a default memory backend that writes to local files. That is good enough for a demo. It is not good enough on more than one machine. The MongoDB package is MongoDB's own take on what a production backend looks like. It covers sessions, memory and retrieval, each with an Atlas feature behind it.

Two things the post does not say. There is no price in it. The Atlas bill is not new for a team already on MongoDB. There is no benchmark against other memory backends. MongoDB sells the integration as the natural fit when the agent's data already lives in Atlas.

Teams on MongoDB today get the shortest path to a Strands agent with persistent sessions and memory.

Source

Persistent sessions and memory for Strands with MongoDB, MongoDB.

SourceMongoDB

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project