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"),
user_agg,
llm,
tts,
transport.output(),
asst_agg,
SynapRecorder(sdk, user_id="alice", customer_id="acme"),
])
Scope
SynapMemoryProcessor— sits BEFORE the user context aggregator. On eachTranscriptionFrame, fetches relevant context from Synap viasdk.fetch()and appends it as a system message to the sharedLLMContext. 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. Buffers the latest user transcription and the streamed assistant response; onLLMFullResponseEndFrame, callssdk.conversation.record_message()for both turns.
Error policy
- Reads (
SynapMemoryProcessor) degrade gracefully — SDK failures log atERRORand the frame continues downstream with no Synap context injected. A Synap blip must never break a live voice call. - Writes (
SynapRecorder) surfaceSynapIntegrationErrorviawrap_sdk_errors_async. The processor logs the failure and pushes anErrorFrameupstream; the pipeline itself stays alive (errors propagate as frames, not exceptions). - Non-matching frames pass through untouched in both processors — standard Pipecat
push_framecontract.
Constructor args (both processors)
sdk: a configuredMaximemSynapSDKuser_id: required — Synap memory is user-scopedcustomer_id: optional customer/org scope; empty string means customer-lessconversation_id: optional explicit conversation id (auto-generated per process lifetime when absent, shared across both processors if you pass the same instance)
Release files for maximem-synap-pipecat 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| maximem_synap_pipecat-0.2.0.tar.gz | 8.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| maximem_synap_pipecat-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.3 kB
Release files / maximem_synap_pipecat-0.2.0.tar.gz
| Download URL | maximem_synap_pipecat-0.2.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
758963c079c02a94b44c7bb904cec7f28da4ca94add6deeba83d0b9fd029380d
|
|
BLAKE2b-256 checksum How to use checksums |
a9fb06fff6d9f943603e3fd14052f5df87baec2a88bea20c6094e148fe1f1ba1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / maximem_synap_pipecat-0.2.0-py3-none-any.whl
| Download URL | maximem_synap_pipecat-0.2.0-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
69af5fb3ac9717f572fbc96281653a956f4a685711f8c0e229960e22288afd69
|
|
BLAKE2b-256 checksum How to use checksums |
c1c10dec2c01206a008a6b28b366a6a808add99ee939a7333ec7173273d647aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|