Skip to main content

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 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. Buffers the latest user transcription and the streamed assistant response; on LLMFullResponseEndFrame, calls sdk.conversation.record_message() for both turns.

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: optional customer/org scope; empty string means customer-less
  • conversation_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

maximem_synap_pipecat-0.1.2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maximem_synap_pipecat-0.1.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file maximem_synap_pipecat-0.1.2.tar.gz.

File metadata

  • Download URL: maximem_synap_pipecat-0.1.2.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

Hashes for maximem_synap_pipecat-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e0ff62ca295b4eb5e0259c645c779b69edab4d1f34a3889cf9dcc567c4e4accd
MD5 075eb3a7ec04845f103355936c6275a4
BLAKE2b-256 5314962e490c867cbbf906589ff9a18f3699c9892fc0c4f0ebd51e5646aa3d88

See more details on using hashes here.

File details

Details for the file maximem_synap_pipecat-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for maximem_synap_pipecat-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0a2a6606efb701a9232f99b7d0e114e45882e2b72da16734545dfe625d9d8601
MD5 499dc274fb900cb5dd2c26fbf8719008
BLAKE2b-256 7b9b5b3b7364bede7cac8e4cb10141c3d39efaa8d50c14cfc175438a25ae5d90

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page