Installation
To use Supermemory with Pipecat, install the required dependencies:user_id=;
the service passes that value as the namespace for profile, search, and writes.
session_id is passed as the v5 document id (previously custom_id).
Set up your API key as an environment variable:
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
Supermemory reads the v5 profile once per conversation, on the first context frame, and searches the same namespace once for each new user message when query results are enabled:- 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 added to the LLM context before generation, each inside a<user_memories> block:
- Profile: appended to the first system message (or sent as a new leading system message when there is none). It is fetched once and never refreshed, so it stays byte-identical on every later request and never appears in a user message.
- Search results: appended to the user message they were retrieved for. Earlier user messages keep the block they first received, tool-call steps reuse their turn’s block without searching again, and results the profile already covers are skipped.
[2026-03-04]), never relative times.
Recall waits at most 3 seconds and makes no retries. If Supermemory is slow or unavailable, the turn continues without memories; a profile that failed to load is fetched again on the next user turn.
Memory modes
The profile (static and dynamic) goes in the system message; search results go on the user message.
Configuration options
You can customize how memories are retrieved and used:InputParams
Injection modes
Theinject_mode parameter controls where per-turn search results are added. The profile block always goes in the system message.
Speech-to-speech models (Gemini Live, etc.)
Pipecat’s Gemini Live and OpenAI Realtime services read only the first context they receive (Pipecat 0.0.98 through 1.7.0). Apart from reconnects, later context frames only forward new tool results, so neither a changed system message nor a new text user message reaches the model mid-session, whicheverinject_mode you use.
The default configuration still gives these models the user profile: it is fetched on the first context frame, before the first user message, and is part of the system instruction the session starts with. Per-turn search results do not reach them. If you pass system_instruction= to GeminiLiveLLMService, Pipecat 1.x uses it instead of the context’s system message, so put your prompt in the LLMContext instead:
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.