Skip to main content

synap-pipecat

Synap integration for Pipecat — preload long-term memory into voice pipelines and record every turn back to Synap.

Install

pip install synap-pipecat

Requires pipecat-ai>=0.0.80, maximem-synap>=0.2.0.

Quickstart

from pipecat.pipeline.pipeline import Pipeline
from pipecat.processors.aggregators.llm_context import LLMContext
from pipecat.processors.aggregators.llm_response_universal import (
    LLMContextAggregatorPair,
    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", context=context),
])

Pass context= to both processors. SynapMemoryProcessor without a context is a read-only tap — it fetches nothing into the prompt. And on Pipecat ≥1.x the universal aggregators consume TranscriptionFrame while TTS services consume LLMTextFrame, so a SynapRecorder at the end of the pipeline only sees the turns via the shared context (user) and the TTSTextFrame stream (assistant). Without context= it records nothing.

Scope

  • SynapMemoryProcessor — sits BEFORE the user context aggregator. On each TranscriptionFrame, fetches relevant context from Synap via sdk.fetch() and appends it as a system message to the shared LLMContext. The transcription frame itself flows through unchanged so the user aggregator can record it as the user turn.
  • SynapRecorder — sits AFTER the assistant context aggregator. On LLMFullResponseEndFrame, calls sdk.conversation.record_message() for both turns. The user turn comes from the latest TranscriptionFrame to reach the processor, or — on universal-aggregator pipelines where that frame never arrives — from the shared context. The assistant turn comes from streamed LLMTextFrames, or from the TTSTextFrame stream (the words actually spoken, which is also the correct record under interruption).

Error policy

  • Reads (SynapMemoryProcessor) degrade gracefully — SDK failures log at ERROR and the frame continues downstream with no Synap context injected. A Synap blip must never break a live voice call.
  • Writes (SynapRecorder) surface SynapIntegrationError via wrap_sdk_errors_async. The processor logs the failure and pushes an ErrorFrame upstream; the pipeline itself stays alive (errors propagate as frames, not exceptions).
  • Non-matching frames pass through untouched in both processors — standard Pipecat push_frame contract.

Constructor args (both processors)

  • sdk: a configured MaximemSynapSDK
  • user_id: required — Synap memory is user-scoped
  • customer_id: B2B instances only, where it is required. Not accepted on a B2C instance, which rejects it with HTTP 400.
  • conversation_id: optional explicit conversation id (auto-generated per process lifetime when absent, shared across both processors if you pass the same instance)

Metadata

Release files for maximem-synap-pipecat 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maximem-synap-pipecat 0.2.1
File Size Uploaded
maximem_synap_pipecat-0.2.1.tar.gz 17.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for maximem-synap-pipecat 0.2.1
File Interpreter ABI Platform
maximem_synap_pipecat-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 28.7 kB

Release files / maximem_synap_pipecat-0.2.1.tar.gz

Download URL maximem_synap_pipecat-0.2.1.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
953f1f46c038001beb5a2181a01ada5547bcf98247679c32d257d5ac0bc273ea
BLAKE2b-256 checksum
How to use checksums
bcf4d10e0696ffface2030f47fbb53dd3109561ef2b673ae5c957f83c0a728b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release files / maximem_synap_pipecat-0.2.1-py3-none-any.whl

Download URL maximem_synap_pipecat-0.2.1-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bde04777100092657d77ffccade8092f061d10a4b56fe328b9b07c1e58f0164a
BLAKE2b-256 checksum
How to use checksums
c6556d640cee3f78ff3d01df592f2a0b91ebaf8b76153fc3e29942ab56fbf0f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page