Strands Agents memory
A MemoryStore with automatic recall before every model call, turn-by-turn extraction, and a crash-proof lifecycle — zero framework dependencies.
Overview
Install strands-memorysync and Strands agents get automatic long-term memory: the MemoryManager consults MemorySyncStore before every model call (real injection — not the tool-gated recall of the official Mem0 strands tool, where a distracted model simply skips memory), and the extraction sink sends the user’s messages to fact extraction with deterministic idempotency seeds (the agent’s replies are not sent). Because a retried or overlapping batch is recognised server-side and not extracted twice, turn-by-turn extraction is safe and recommended — facts are recallable from the first exchange, where zep-strands batches five turns before anything is stored. The lifecycle is crash-proof by design: initialize() deliberately makes no network calls (zep-strands 0.1.0 shipped an event-loop binding crash there), search fails open under a hard 1.2s budget instead of surfacing AggregateMemoryError into application code, and the model-facing tools are search and save only — no delete, so a prompt injection cannot wipe a user’s memories (the official Mem0 tool exposes one). Zero framework dependencies: the store duck-types the MemoryStore Protocol, so it can never version-conflict with your Strands release.
Setup status and requirements
- Supported version
- strands-memorysync 1.1.0 (PyPI)
- Last setup review
- 2026-08-24
- Permissions
- A MemorySync API key with read and write scopes.
- Limits
- Requires a strands-agents release with the MemoryManager seam (2026+, Python 3.10+). The store itself has no framework dependency.
Capabilities
- Automatic injection before every model call — not tool-gated
- Turn-by-turn extraction — first-turn recall works (no 5-turn lag)
- initialize() makes zero network calls — the zep-strands crash cannot happen
- Hard recall budget (default 1.2s); search fails open, never AggregateMemoryError
- Deterministic idempotency seeds — manager retries are not extracted twice
- No model-facing delete tool — prompt injection cannot destroy data
- Zero framework dependencies — no strands-agents version pin
- sequence_numbers kept on each user turn; replies, tool and system messages never sent
Quick Start
from strands import Agentfrom strands.memory import MemoryManagerfrom strands_memorysync import MemorySyncStorestore = MemorySyncStore(api_key="ms_...",user_id="customer-42",session_id="support",)agent = Agent(memory_manager=MemoryManager(stores=[store]),)agent("which seat should I book?")
Use Cases
AWS-stack agents with portable, cloud-agnostic memory
Replacing tool-gated Mem0 recall with real automatic injection
Multi-store setups pairing MemorySync with Bedrock Knowledge Bases
Guides and related pages
Related integrations
Explore More
Add long-term memory to Strands Agents
Start free with 10,000 add requests a month and no credit card. Memory is stored per end user and comes back in every later session.
