Maximem Synap's Agent Memory Now Available for Claude Agent SDK
Your Claude Agent SDK agent ships. Users love it. They return the next day and it remembers nothing. This is not a bug. It is the default behavior.
The Claude Agent SDK has become the default choice for developers building production agents on Anthropic's models. Built by Anthropic. Native integration with Claude 3.5 Sonnet and Opus. If you are building an agent that runs on Claude, the official SDK is where you start.
Today, Maximem Synap extends the Claude Agent SDK with persistent per-user memory. Native memory stores conversation state within a single process. Synap makes that state survive restarts, resolve entities across sessions, and retrieve relevant context without manual wiring.
Where Claude Agent SDK Excels
Anthropic gave developers a standard for building agents on Claude models. Tracing built in. Multi-turn conversation handling that works out of the box. Tool use with proper error handling. Model switching without code changes. If your agent needs to call external tools, reason across multiple steps, or maintain conversation state within a session, the Claude Agent SDK handles the orchestration well.
The challenge is what happens when your user comes back tomorrow.
How Claude Agent SDK Memory Works Today
The Claude Agent SDK ships basic memory options for conversation tracking. All store data within a single process lifetime. For a deeper look at how each works, see the Claude Agent SDK documentation (https://docs.anthropic.com/claude/docs/agents).
InMemoryStore stores every message in a list attached to the agent run. A scratchpad that grows forever. After twenty turns, your context window fills with noise. The agent cannot see your actual instructions. On restart, the scratchpad clears. Every session starts fresh.
WindowedStore keeps only the last K messages and discards everything older. The window slides. Yesterday's conversation is already gone. You are not solving memory. You are accelerating forgetting.
SummaryStore compresses history into summaries. Send a paragraph describing what happened instead of every message. But summarization is lossy. Stanford research found that a single summary pass drops accuracy from 66.7% to 57.1%. Each additional pass loses more. You trade recall for tokens.
All three options solve in-session state. What they do not solve, by design, is cross-session persistence, entity resolution, semantic retrieval, or
automatic compaction. Those are memory-layer problems.
What Synap Adds
Synap is agentic context management. It does not replace the Claude Agent SDK's memory. It extends it with a persistence layer.
We ship three components that plug into the SDK's native interfaces:
SynapTracingHook implements the SDK's Hook interface. Attach it to any agent run. It captures every turn in the background and ingests it into Synap asynchronously. No code changes to your agent logic. No latency added to your execution. The agent keeps working. The agent starts remembering.
SynapAgentMemory implements AgentMemory. Use it as your memory backend. Per-user, per-conversation scoping. State survives restarts. Prior messages replay on the next session without manual setup.
SynapRetriever implements Retriever. Fetch user-scoped memories as standard memory objects. Two modes: fast (vector-only, 50 to 100ms) and accurate (graph traversal + reranking, 200 to 500ms).
The integration is a native package. Drop it in, replace the memory backend, and your agent picks up persistent memory without a rewrite.
We built this because agents kept stalling in production. Not from bad tool logic. From missing context that lived in a different session last Tuesday.
Production testing hit 90.2% on LongMemEval. Fast mode retrieves in under 100ms.
For why context management is infrastructure and not a feature, read What Is Agentic Context Management?
For build-versus-buy numbers, see The Real Cost of DIY Agent Memory
Technical Deep Dive
LongMemEval Benchmark -
LongMemEval tests whether agents recall facts across long, multi-turn conversations spanning multiple sessions. The benchmark simulates production conditions where users return days apart and expect the agent to remember prior context. Synap scores 90.2% on this benchmark. Baseline vector-only approaches typically score 60-70%. The gap comes from entity resolution and temporal awareness that pure vector search lacks.
Entity Resolution Mechanism
Synap tracks identity across 15 reference patterns: names, emails, phone numbers, account IDs, session IDs, API keys, and more. When an agent encounters "John" in one session and "[email protected]" in another, the resolution engine runs deterministic matching on structured fields, then probabilistic matching on unstructured references. Conflicts are resolved using temporal recency and source confidence scores. The result is a single canonical entity that accumulates context across all identifiers.
Accuracy-Preserving Compaction
Compaction identifies which facts are critical versus redundant. Critical facts include user preferences, constraints, commitments, and entity relationships. Redundant facts include repeated greetings, acknowledged statements, and intermediate reasoning steps. The compaction engine uses a classifier trained on conversation data to distinguish these categories. Most teams see 60 to 70% fewer tokens shipped to the LLM per turn after compaction kicks in. The accuracy preservation comes from never dropping classified-critical facts, even under aggressive token budgets.
Graph Traversal in Accurate Mode
Fast mode retrieves by vector similarity alone. Accurate mode adds a graph layer that traverses relationships between entities. If you ask about "the project John mentioned," the graph finds John, traverses to projects linked to John, and returns the relevant context. This adds latency but catches connections that vector similarity misses. Reranking then scores results by recency, confidence, and query relevance.
Multi-Tenant Scoping
Memory is scoped by three keys: user_id identifies the person, conversation_id isolates individual sessions, and customer_id enables multi-tenant deployments. A SaaS deploying agents for multiple customers uses customer_id to ensure tenant A never sees tenant B's memory. This scoping is enforced at the storage layer, not just in application logic.
What Synap Adds to Claude Agent SDK
Persistence
Claude Agent SDK Native. In-process only. State clears on restart.
With Synap. Per-user memory survives across sessions and restarts.
Entity Resolution
Claude Agent SDK Native. Raw identifiers. No linking across sessions.
With Synap. "John" and "[email protected]" resolve to one canonical entity across every session.
Compaction
Claude Agent SDK Native. Manual summarization. Lossy.
With Synap. Automatic and configurable. Accuracy-preserving compaction that does not drop critical facts.
Retrieval Latency
Claude Agent SDK Native. Depends on setup.
With Synap. 50 to 100ms fast mode. 200 to 500ms accurate mode.
Long-Term Recall
Claude Agent SDK Native. Not benchmarked for cross-session recall.
With Synap. 90.2% on LongMemEval.
Failure Handling
Claude Agent SDK Native. Retrieval failures crash the run or return noise.
With Synap. Empty result and a logged error. Your agent keeps running.
User Scoping
Claude Agent SDK Native. Run-scoped only.
With Synap. Built-in user_id, conversation_id, customer_id scoping out of the box.
What Production Teams Gain
Cross-session continuity. Your user chats on Monday, returns on Wednesday. SynapAgentMemory replays prior context. SynapRetriever surfaces relevant facts
from last week. The agent treats every session as one continuous conversation. Native memory treats every session as a fresh start.
Accuracy that ships. 90.2% on LongMemEval measures whether agents recall facts across long, multi-turn conversations spanning multiple sessions.
Token efficiency. Synap's compaction trims conversation history without dropping critical context. Most teams see 60 to 70% fewer tokens shipped to the
LLM per turn. At scale, that is the difference between profit and burn.
Latency that does not block. Fast retrieval: 50 to 100ms. Accurate mode with graph traversal and reranking: 200 to 500ms. Both degrade without crashing. A failure returns empty results and a log line, not a broken agent.
Entity resolution. "John from Acme," "[email protected]," and "user_4829" resolve to one person across every session. Synap handles this at the memory layer so your agent does not have to.
Production resilience. The tracing hook captures turns in the background without adding latency. The retriever returns empty results on failure instead of crashing. The memory replays prior messages per session. All three components implement standard Claude Agent SDK interfaces. No wrappers. No adapters.
How to Get Started
Three steps. No rearchitecture.Step 1: Install
pip install maximem-synap-claude-agent-sdk
Step 2: Initialize and attach
import os
from maximem_synap_claude_agent_sdk import (
MaximemSynapSDK,
SynapTracingHook,
SynapAgentMemory,
SynapRetriever
)
sdk = MaximemSynapSDK(api_key=os.getenv("SYNAP_API_KEY"))
# Attach automatic turn capture to any agent run
hook = SynapTracingHook(sdk=sdk, user_id="user_123")
# Or use Synap as your memory backend
memory = SynapAgentMemory(
sdk=sdk,
user_id="user_123",
conversation_id="session_456"
)
# Or retrieve user-scoped memories
retriever = SynapRetriever(
sdk=sdk,
retriever = SynapRetriever(
sdk=sdk,
user_id="user_123",
mode="fast" # or "accurate"
)
Step 3: Deploy
Synap handles persistence, compaction, and retrieval. Your agent handles logic.
Full config, scoping rules, and error handling: https://docs.maximem.ai/integrations/claude-agent-sdk
Memory Is Infrastructure
Anthropic gave developers a standard for building agents on Claude models. Real value. The memory layer it ships handles in-session state well. Making that state persist across sessions, resolve entities, and retrieve intelligently is a different problem.
The teams that ship production agents discover this around month three. They either build memory infrastructure themselves, or they plug in a system built for the problem.
This is why memory is infrastructure, not a feature.
Start building Claude Agents that remember across sessions → (https://synap.maximem.ai)
Synap pricing is usage-based. You pay for memory operations: storage, retrieval, compaction. No per-seat or per-framework surcharge. Starter plan: $49/month. Every new account gets $25 in free credits to test before committing. See full pricing at https://synap.maximem.ai/pricing.
Related Posts
- What Is Agentic Context Management?
- The Real Cost of DIY Agent Memory
- Skills Are the New Microservices



