Skip to main content
Synap ships a library of thin integration packages so you can add persistent memory to your existing agent stack without rewriting your application. Each package handles the translation between Synap’s API and the framework’s native memory or tool interface. Out of the box, a package opens Synap’s real-time gRPC stream on the first turn, reports the agent’s turns, tool calls and reasoning on it, and, once Synap has compacted a conversation, sends the model Synap’s compaction in place of the earlier turns. See How integrations connect.
In Synap Core: every package works against a local server. Set SYNAP_BASE_URL=http://127.0.0.1:8000 and leave the API key out. Core is REST only, so the real-time stream that listen() opens is Cloud only: in Core that call answers “not available in the open-source server”.

Three ways to add Synap

AI coding agent (fastest)

Install the skill and let Claude Code, Cursor, or Codex wire Synap in for you.

Framework package

Drop in the package for your framework: LangChain, LangGraph, Mastra, the Vercel AI SDK and more (below).

No-code (MCP)

Connect any MCP client with a URL and a token. No code.
High-level architecture: the SDK, used inside your AI agent application, communicates directly with the Synap service
All packages share the same contract:
  • Read-side failures degrade gracefully: a failed context fetch or compaction lookup returns an empty result and logs, so your agent keeps running with the framework’s own history.
  • Recording never breaks a run: opening the stream and writing turns, tool calls and reasoning never raise inside your framework’s loop. A failure is logged and the turn falls back to REST where it can. A tool you give the model to store a memory on request (such as synap_remember) is different: its failure is reported back to the model.
  • Same scoping model everywhere: every package accepts user_id, optional customer_id, and optional conversation_id.

How integrations plug in

Every framework exposes a few hook points in its agent loop, and each Synap package maps onto the same set of points. No matter which framework you use, an integration plugs in through one or more of these: These fall into two modes:
  • Always-on memory: history, callback, and retriever points run on every turn without the model deciding to. This is the default for memory-augmented agents and needs no prompt changes.
  • Model-driven memory: tools let the agent choose when to read or write memory. Use this when you want the model to reason about what to remember or look up, or when always-on context would be too broad.
Most integrations support several of these points, so you can combine always-on context with model-driven tools in the same agent. The per-framework pages below note exactly which points each package provides.

How integrations connect

The stream opens by itself. On the first turn, a package calls listen() for you, then reports turns, tool calls, tool results and reasoning on the stream. The open waits up to 10 seconds. If it fails, each turn is written over REST instead, never both, and the stream is tried once more a few seconds later, then no more than once a minute. Tool results still go to the SDK’s local archive. A package never raises inside your framework’s loop. A stream your own code opened is used as is. See gRPC vs REST. To keep a package on REST, set SYNAP_AUTO_LISTEN=false. Each language also has a per-SDK switch: set_auto_listen(sdk, False) from synap_integrations_common in Python, setAutoListen(sdk, false) in the Mastra, eve and Claude Agent TypeScript packages, and autoListen: false in the Vercel AI SDK package. The Python packages need maximem-synap-integrations-common 0.2.3 or later, which they install. The TypeScript packages open the stream with the same rules, and an open stream does not keep a Node.js script alive. Short-term history. Once Synap has compacted a conversation, a package replaces every turn before the current one with Synap’s compaction block and the turns after it. The current turn (the last user message onward, with tool calls paired to their results) is untouched. Before the first compaction, or if Synap cannot answer, the framework’s messages are left alone. The framework’s own compaction stays installed: it sees a short history and rarely fires, and it is the fallback when Synap cannot answer. For most packages this is on by default. These need one setup step:
  • LangChain: add SynapHistoryMiddleware to a create_agent agent.
  • OpenAI Agents: pass hooks.run_kwargs() to Runner.run; run hooks alone cannot change what the model sees.
  • deepagents: give SynapMemoryMiddleware a conversation_id.
  • Haystack: wire the store (2.x) or SynapHistoryHook (3.x) into your agent.
  • NeMo Agent Toolkit: add the synap_history middleware to your workflow YAML.
  • Vercel eve: set createSynapCompactionModel as the agent’s model in agent.ts, and leave compaction.model unset.
For the Claude Agent SDK, Claude Code owns the live transcript, so Synap’s compaction is added to prompts and handed to Claude Code’s own compaction rather than replacing history inside a running session. The hosted MCP server stays on REST and does not open the stream or change history: it is stateless and serves each request with its own key.

Available Integrations

Agent frameworks

LangChain

py Chat history, callbacks, middleware, retriever and tools for LangChain chains and agents.

LangGraph

py Cross-thread store, compacted history and run reporting for LangGraph graphs.

LlamaIndex

py BaseMemory implementation with compacted history, and a retriever, for LlamaIndex pipelines.

OpenAI Agents

py Search and store tools, plus run hooks that record each run and send Synap’s compacted history.

Pydantic AI

py Dependency dataclass, auto-registered tools, run reporting and compacted history for Pydantic AI agents.

CrewAI

py StorageBackend for CrewAI’s unified Memory, plus a listener that reports each run and uses Synap’s compaction.

AutoGen

py Search and store BaseTool implementations, plus a model context that reports the run and uses Synap’s compaction.

Google ADK

py FunctionTool factory, plus callbacks that record each run and send Synap’s compacted history.

Haystack

py Retriever, memory-writer and agent history components for Haystack pipelines and agents.

Agno

py Drop-in InMemoryDb replacement that routes user memories through Synap, with hooks that report each run.

Semantic Kernel

py Kernel plugin with search_memory and store_memory, plus turn reporting and compacted history.

Microsoft Agent Framework

py Context, history and compaction for the agent SDK, and memory stores for the Agent Harness.

NeMo Agent Toolkit

py MemoryEditor, a run reporter and a compacted-history middleware for NVIDIA NeMo Agent Toolkit workflows.

Strands Agents

py Native MemoryStore, a history hook, tools, and a real-time turn and tool-call feed.

CAMEL-AI

py Native AgentMemory with long-term recall, conversation recording and compacted history layered over CAMEL’s own.

Smolagents

py Memory tools, a step recorder and compacted history for Hugging Face Smolagents.

deepagents

py A memory backend where grep is a semantic search, plus recall and conversation middleware.

Vercel AI SDK

ts Middleware that wraps any Vercel AI SDK model with Synap context, turn recording, the real-time stream and compacted history.

Vercel eve

ts Memory tools, stream hooks, a short-term-context resolver and a compaction model for eve agents.

Mastra

ts SynapMemory and tools for Mastra: long-term context, compacted history and run reporting.

Claude Agent SDK

py ts Hooks, an MCP server and, in Python, a session store for Anthropic’s Claude Agent SDK.

Voice

LiveKit Agents

py Context preloading, turn and tool-call reporting and compacted history for LiveKit voice agents.

Pipecat

py Frame processors for memory injection, turn and tool-call recording and compacted history in Pipecat pipelines.

No-code

No-code (MCP)

Connect Gumloop, n8n, Claude, or any MCP client with just a URL and a token, no code.

Quick Comparison

The stream is the integration we recommend for a live agent, and the framework packages use it by default: see How integrations connect and Agent Integration. You can also drive it yourself with instance.listen alongside any package, or with no framework at all.
The TypeScript packages build on the JavaScript SDK and need Node.js 20+; @maximem/synap-vercel-adk is a native client and needs Node.js 18+. Context and memory operations run on Edge Runtime and Cloudflare Workers as well; the gRPC stream opens only on Node.js, and elsewhere turns go over REST. See Installation → JavaScript and TypeScript SDK.

Prerequisites

Every integration requires a configured MaximemSynapSDK instance:
See SDK Initialization and Authentication for full setup details.

Going further