Installation
To use Supermemory with Pipecat, install the required dependencies:Configuration
Supermemory integration is provided through theSupermemoryPipecatService class in Pipecat:
Pipeline Integration
TheSupermemoryPipecatService should be positioned between your context aggregator and LLM service in the Pipecat pipeline:
How It Works
When integrated with Pipecat, Supermemory provides two key functionalities:1. Memory Retrieval
When a user message is detected, Supermemory retrieves relevant memories:- Static Profile: Persistent facts about the user
- Dynamic Profile: Recent context and preferences
- Search Results: Semantically relevant past memories
2. Context Enhancement
Retrieved memories are formatted and injected into the LLM context before generation, giving the model awareness of past conversations.Memory Modes
Configuration Options
You can customize how memories are retrieved and used:InputParams
Injection Modes
Theinject_mode parameter controls how memories are added to the LLM context:
Speech-to-Speech Models (Gemini Live, etc.)
For speech-to-speech models like Gemini Live, the SDK automatically detects audio frames and injects memories into the system prompt. No configuration needed:Example: Voice Agent with Memory
Here’s a complete example of a Pipecat voice agent with Supermemory integration:Example: Gemini Live with Memory
For a complete example using Gemini Live speech-to-speech with Supermemory, check out the reference implementation:Pipecat Memory Example
Full working example with Gemini Live, including frontend and backend code.