---
title: "Persistent Sessions and Memory for Strands with MongoDB"
description: "AWS and MongoDB launched the open-source strands-mongodb Python package, integrating MongoDB as the data platform for Strands AI agents. The integration provides session persistence so agents resume conversations after a restart or on a different instance, and long-term memory for facts that carry across conversations. Atlas Automated Embedding generates vector embeddings from plain text without an external embedding pipeline, enabling vector, text, or hybrid search. The memory store enforces tenant isolation through scoped stamps and deduplicates repeated extractions using a content hash. OpenTelemetry tracing is included, and the package requires Python 3.10 or later and strands-agents 1.54.0 or later."
---

# Persistent Sessions and Memory for Strands with MongoDB

[MongoDB](https://yomu.fyi/company/mongodb) · Nov 17, 2026

**Type:** Announcement

## Summary

AWS and MongoDB launched the open-source strands-mongodb Python package, integrating MongoDB as the data platform for Strands AI agents. The integration provides session persistence so agents resume conversations after a restart or on a different instance, and long-term memory for facts that carry across conversations. Atlas Automated Embedding generates vector embeddings from plain text without an external embedding pipeline, enabling vector, text, or hybrid search. The memory store enforces tenant isolation through scoped stamps and deduplicates repeated extractions using a content hash. OpenTelemetry tracing is included, and the package requires Python 3.10 or later and strands-agents 1.54.0 or later.

## Context

Strands is an open-source framework for building AI agents, maintained by AWS. The Strands Harness SDK manages the agent loop and provides pluggable storage and memory interfaces with built-in backends for local files and Amazon S3. When agents run in ephemeral environments such as AWS Lambda, state tied to one process is invisible to the next, so a database is needed for cross-instance continuity.

## Approach / What changed

The integration provides MongoDBStorage and MongoDBMemoryStore classes that implement Strands’ pluggable storage and memory interfaces. Sessions are saved to MongoDB by session ID, allowing any instance to resume a conversation. Long-term memories are stored with a content hash for deduplication, a tenant scope for isolation, and optional expiry. Atlas Automated Embedding generates vector embeddings from plain text without an external embedding pipeline, enabling vector, text, or hybrid search.

## Takeaways

- MongoDBStorage and MongoDBMemoryStore implement Strands’ pluggable interfaces, so agents can swap in MongoDB without rewriting core agent logic.
- Atlas Automated Embedding generates vector embeddings from plain text at write time, removing the need for a separate embedding pipeline or model API key.
- The memory store uses a content hash to silently discard duplicate extractions and stamps every memory with a tenant scope that callers cannot override.

## FAQ

### How does the integration isolate memory between tenants?

The store stamps every memory with a scope such as a tenant or user ID and limits every search and delete to that scope. Callers cannot override it through filters or metadata. For compliance boundaries, each tenant can have its own database or collection with restricted credentials, and MongoDB enforces the boundary itself.

### How does memory search work without an embedding pipeline?

Atlas Automated Embedding embeds each memory using voyage-4-lite unless you choose a different model. You write plain text and search with plain text. There is no embedding library to install and no model API key to manage. Atlas generates, stores, and updates the embeddings itself as memories are written.

### How does the integration handle duplicate memories?

A content hash turns a repeated extraction into a no-op. If the agent extracts the same fact a second time, the store keeps the copy it already has with its original timestamp and expiry. This keeps the memory store clean without requiring custom deduplication logic.

**Tags:** [AI Agents](https://yomu.fyi/topic/ai-agents), [MongoDB](https://yomu.fyi/topic/mongodb), [Python](https://yomu.fyi/topic/python), [Strands](https://yomu.fyi/topic/strands), [Vector Search](https://yomu.fyi/topic/vector-search)

- Source: [MongoDB](https://www.mongodb.com/company/blog/product-release-announcements/persistent-sessions-memory-for-strands)
- Source URL: https://www.mongodb.com/company/blog/product-release-announcements/persistent-sessions-memory-for-strands
- Ingested by Yomu: 2026-11-18T15:00:17.266Z

[Read original post](https://www.mongodb.com/company/blog/product-release-announcements/persistent-sessions-memory-for-strands)
