LiveKit + MemorySync
Voice agents that remember callers — recall injected under a hard latency budget, so a reply is never late.
Overview
Install livekit-memorysync and your LiveKit voice agent remembers callers across calls without ever sounding slow: recalled context is injected in on_user_turn_completed under a hard budget (default 1.2s). With prefetch on (the default), each turn starts the next recall in the background from what the caller just said, so the following turn injects it with no network wait; pass prefetch=False to recall against every new utterance instead. Each of the caller’s turns is sent to fact extraction as it finalizes — with a deterministic idempotency seed, plus interrupted: true when LiveKit marks the item interrupted — and only the durable facts in it are stored; the agent’s replies are not sent. The injected block is turn-only and never sent, so recalled context never re-enters memory. Composable by design: attach the engine to your own Agent subclass, or use the MemorySyncAgent drop-in. A memory outage degrades to "no memories this turn"; it can never stall or break a call.
Setup status and requirements
- Supported version
- livekit-memorysync 1.1.1 (PyPI)
- Last setup review
- 2026-10-01
- Permissions
- A MemorySync API key with read and write scopes.
- Limits
- Requires livekit-agents 1.0+ (Python 3.10+). With speech-to-speech realtime models, prefer the memory search tool over turn injection — the turn boundary is synthesized from transcripts.
Capabilities
- Hard recall budget (default 1.2s) — tested against a 5s-slow backend
- Background prefetch from the previous utterance: no network wait on the next turn
- Caller turns sent to fact extraction as items finalize; interrupted turns flagged
- Deterministic idempotency seeds — a retried or reconnected turn is extracted once
- Injection is turn-only and capture-excluded, by test
- Composition-first: keep your own Agent class (drop-in also available)
- Memory search function_tool for speech-to-speech realtime models
- Facts carry the livekit:: thread scope — same shared memories
Quick Start
from livekit.agents import Agent, AgentSessionfrom livekit_memorysync import MemorySyncMemorymemory = MemorySyncMemory(api_key="ms_...", user_id="caller-42",thread_id="room-123")class Assistant(Agent):def __init__(self) -> None:super().__init__(instructions="You are a helpful voice assistant.")async def on_user_turn_completed(self, turn_ctx, new_message):await memory.on_user_turn(turn_ctx, new_message)session = AgentSession(...)memory.attach(session) # send the caller's turns as they finalize
Use Cases
Phone and web voice assistants that greet returning callers by context
Voice support agents that remember prior issues and preferences
Outbound voice campaigns that recall facts from each customer’s earlier calls
Explore More
Built for production AI systems
Build AI systems that remember
MemorySync provides the infrastructure layer for persistent memory, adaptive retrieval, and enterprise AI intelligence.
Start free. No credit card required.