Synap memory integration for Pipecat — voice-pipeline context injection + conversation recording
Project description
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maximem_synap_pipecat-0.1.1.tar.gz.
File metadata
- Download URL: maximem_synap_pipecat-0.1.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9da2e08da56deff965b9a051600d1ca93b929bc659077bb5a6bede660828bb2
|
|
| MD5 |
bcb2010f2f89ffd415ef6ec1aa8ce986
|
|
| BLAKE2b-256 |
3383366ea7be0f7b5516808d930bca510b3a069dcf9f20ddb7f5ade1265d8577
|
File details
Details for the file maximem_synap_pipecat-0.1.1-py3-none-any.whl.
File metadata
- Download URL: maximem_synap_pipecat-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c31584b78ff2e2e936c7e7db70d60d74ff13dae435c995b382e2c9628b56566
|
|
| MD5 |
4532ffabec88c7d17acfbe6fd98425c1
|
|
| BLAKE2b-256 |
9cae3737943b1ff21bdfc24cf4c21ad6b5f3a8949423b5321100c0fa11e8a848
|