Skip to main content

Overview

The synap-pipecat integration connects Synap, Maximem AI’s long-term memory layer, to Pipecat voice pipelines. It ships two FrameProcessor classes: SynapMemoryProcessor injects relevant user memory into the shared LLMContext before the LLM replies, and SynapRecorder captures each user and assistant turn back to Synap so memory persists across sessions. A SynapShortTermProcessor is also provided for injecting short-term conversation context.

Source Repository

Source code, examples, and issues for the Synap SDK and its Pipecat integration (under packages/integrations/synap-pipecat)

Documentation

Synap documentation from Maximem AI

Website

Learn more about Synap and request an API key

Dashboard

Manage your Synap account and API keys

Installation

This is a community-maintained package distributed separately from pipecat-ai:
pip install maximem-synap-pipecat
Requires pipecat-ai>=0.0.80 and maximem-synap>=0.2.0.

Prerequisites

Synap Account Setup

Before using the Synap integration, you need:
  1. Synap Account / API Key: Get one at maximem.ai/synap
  2. A configured MaximemSynapSDK instance, created with your API key: MaximemSynapSDK(api_key="sk-...")

Configuration

SynapMemoryProcessor

Inserted before the user context aggregator. On each TranscriptionFrame, fetches user-scoped context from Synap and appends it as a system message to the shared LLMContext.
sdk
MaximemSynapSDK
required
A configured MaximemSynapSDK instance.
user_id
str
required
Required — Synap memory is user-scoped.
customer_id
str
default:"\"\""
Optional customer/org scope. An empty string means customer-less.
context
LLMContext
default:"None"
Shared LLMContext used by the user/assistant aggregators. When None, the processor is inert (no injection) but still passes frames through.
mode
str
default:"\"accurate\""
Synap fetch mode ("accurate" or "fast").
max_results
int
default:"10"
Cap on sdk.fetch results per turn.
include_conversation_context
bool
default:"False"
Whether to request Synap’s recent conversation block alongside the semantic memory.

SynapRecorder

Inserted after the assistant context aggregator. Buffers the latest user transcription and the streamed assistant response, then records both turns via sdk.conversation.record_message on LLMFullResponseEndFrame.
sdk
MaximemSynapSDK
required
A configured MaximemSynapSDK instance.
user_id
str
required
Required — Synap conversations are user-scoped.
customer_id
str
default:"\"\""
Optional customer/org scope. An empty string means customer-less.
conversation_id
str
default:"None"
Stable id for this call. Auto-generated per processor lifetime when absent.
A SynapShortTermProcessor is also exported for injecting short-term conversation context. See the source repository for its full configuration.

Usage

from pipecat.pipeline.pipeline import Pipeline
from pipecat.processors.aggregators.llm_context import LLMContext
from pipecat.processors.aggregators.llm_response_universal import (
    LLMUserAggregator,
    LLMAssistantAggregator,
)
from maximem_synap import MaximemSynapSDK
from synap_pipecat import SynapMemoryProcessor, SynapRecorder

sdk = MaximemSynapSDK(api_key="sk-...")
context = LLMContext(
    messages=[{"role": "system", "content": "You are a helpful assistant."}]
)

user_agg = LLMUserAggregator(context=context)
asst_agg = LLMAssistantAggregator(context=context)

pipeline = Pipeline([
    transport.input(),
    stt,
    SynapMemoryProcessor(sdk, user_id="alice", customer_id="acme", context=context),
    user_agg,
    llm,
    tts,
    transport.output(),
    asst_agg,
    SynapRecorder(sdk, user_id="alice", customer_id="acme"),
])
Reads degrade gracefully — if a Synap fetch fails, the frame continues downstream with no context injected so a Synap blip never breaks a live call. Write failures surface as a SynapIntegrationError pushed upstream as an ErrorFrame.

Compatibility

The integration requires pipecat-ai>=0.0.80. Check the source repository for the latest tested version and changelog.