Skip to main content

Install

pip install synap-pipecat

What’s included

ClassPurpose
SynapMemoryProcessorInjects Synap context before the LLM frame processor
SynapRecorderRecords user and assistant turns after the response

Quick start

from pipecat.pipeline.pipeline import Pipeline
from pipecat.services.openai import OpenAILLMService
from synap_pipecat import SynapMemoryProcessor, SynapRecorder

memory = SynapMemoryProcessor(
    sdk=sdk,
    user_id="alice",
    customer_id="acme",   # optional
    max_results=6,
)

recorder = SynapRecorder(
    sdk=sdk,
    user_id="alice",
    customer_id="acme",
    conversation_id="call-001",   # optional; auto-generated if omitted
)

pipeline = Pipeline([
    transport.input(),
    stt,
    memory,          # inject memory before LLM
    user_aggregator,
    llm,
    tts,
    transport.output(),
    assistant_aggregator,
    recorder,        # record turn after response
])

SynapMemoryProcessor

Intercepts LLMMessagesFrame events and prepends a system message containing the user’s relevant memories before the frame reaches the LLM.
memory = SynapMemoryProcessor(
    sdk=sdk,
    user_id="alice",
    customer_id="acme",
    max_results=6,
    mode="fast",    # "fast" or "accurate"
)
Failures degrade gracefully — the frame passes through unmodified if context retrieval fails.

SynapRecorder

Intercepts TranscriptionFrame (user) and LLMFullResponseEndFrame (assistant) events and ingests the completed turn into Synap asynchronously.
recorder = SynapRecorder(
    sdk=sdk,
    user_id="alice",
    customer_id="acme",
    conversation_id="call-001",
)
Write failures surface as SynapIntegrationError — Pipecat’s frame error handling will catch and log these.

Positioning in the pipeline

transport.input()


   STT


SynapMemoryProcessor  ← fetches context, prepends to system prompt


 UserAggregator


   LLM


   TTS


transport.output()


AssistantAggregator


 SynapRecorder        ← records completed user + assistant turn

Next steps

LiveKit Agents

Context preloading and recording for LiveKit voice agents.

Claude Agent SDK

Hooks and MCP server for the Claude Agent SDK.