Skip to main content

pipecat-engram

Engram memory plugin for Pipecat — durable, explainable memory for voice and realtime AI agents.

EngramMemoryProcessor is a drop-in FrameProcessor that:

  • Stores every finalized user turn to your Engram bucket.
  • Recalls relevant memories on each new turn and injects them as a context TextFrame (with skip_tts=True) right before the user's utterance, so the LLM sees the memory but the TTS doesn't speak it.

Install

pip install pipecat-engram

Configure

Set your Engram API key (get one at https://lumetra.io):

export ENGRAM_API_KEY=eng_live_...

Or pass it directly to the constructor.

Minimal Pipeline example

from pipecat.pipeline.pipeline import Pipeline
from pipecat.pipeline.task import PipelineTask
from pipecat.pipeline.runner import PipelineRunner

from pipecat_engram import EngramMemoryProcessor

# Memory sits between the user input (STT or text) and the LLM, so the
# LLM context aggregator sees recall TextFrames just before each user turn.
memory = EngramMemoryProcessor(
    bucket="my_agent",
    recall_prefix="Relevant memory: ",
)

pipeline = Pipeline([
    transport.input(),     # mic / WebRTC / etc.
    stt,                   # e.g. DeepgramSTTService
    memory,                # <-- EngramMemoryProcessor
    context_aggregator.user(),
    llm,                   # e.g. OpenAILLMService
    tts,                   # e.g. CartesiaTTSService
    transport.output(),
    context_aggregator.assistant(),
])

task = PipelineTask(pipeline)
await PipelineRunner().run(task)

For a pure text pipeline (no STT/TTS), EngramMemoryProcessor will also act on plain TextFrames flowing downstream from the user side.

Direct REST access

from pipecat_engram import EngramClient

async with EngramClient() as engram:
    await engram.store_memory("user prefers Celsius", bucket="prefs")
    result = await engram.query_memory("what units does the user prefer?", bucket="prefs")
    print(result["answer"])

EngramClient exposes six methods that map 1:1 to the Engram REST API:

Method Endpoint
store_memory(content, bucket) POST /v1/buckets/{bucket}/memories
query_memory(question, bucket) POST /v1/query
list_buckets(limit, offset) GET /v1/buckets
list_memories(bucket, limit) GET /v1/buckets/{bucket}/memories
delete_memory(bucket, memory_id) DELETE /v1/buckets/{bucket}/memories/{memory_id}
clear_memories(bucket) DELETE /v1/buckets/{bucket}/memories

The user-facing parameter question is mapped to the REST field query.

Frame handling

EngramMemoryProcessor is opinionated about which frames it acts on:

Frame type Action
TranscriptionFrame (finalized STT) Store + recall
TextFrame (plain user text) Store + recall
LLMTextFrame, TTSTextFrame Forwarded unchanged — never stored
InterimTranscriptionFrame Forwarded unchanged — too noisy
Any other frame Forwarded unchanged

Storing is fire-and-forget so it does not add latency to the turn.

Self-hosted Engram

EngramMemoryProcessor(base_url="https://engram.example.com")

Or via env: ENGRAM_BASE_URL=https://engram.example.com.

License

MIT — Copyright (c) Lumetra Labs Inc.

Release files for pipecat-engram 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pipecat-engram 0.1.0
File Size Uploaded
pipecat_engram-0.1.0.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pipecat-engram 0.1.0
File Interpreter ABI Platform
pipecat_engram-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.1 kB

Release files / pipecat_engram-0.1.0.tar.gz

Download URL pipecat_engram-0.1.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
83190f9a27e894bd111c696b2ee1df5b13f5fa30c9ab289bc161b577aecabb60
BLAKE2b-256 checksum
How to use checksums
27488d7f9921c8d1b5655812c73b2c97dc255d133dcba608fc0c09579ee0228f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Release files / pipecat_engram-0.1.0-py3-none-any.whl

Download URL pipecat_engram-0.1.0-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb54bfb268704d598566ae9f123b796902b0120bb644677aa9c885eca91e49e0
BLAKE2b-256 checksum
How to use checksums
8db145ca83146542aab084a569d53e7411c2b6d7a490cab8b352f53f4100f2e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page