Long-term memory for LiveKit Agents — livekit-memorysync

Hi everyone — we just released livekit-memorysync, a small package that gives LiveKit voice agents long-term memory backed by MemorySync (https://memorysync.io). Tell the agent something, hang up, call back — it remembers.

Voice is the one surface where memory latency is audible, so the whole design centers on one rule: recalled context is injected in on_user_turn_completed under a hard time budget (default 1.2 s). If memory is slow, the reply proceeds without it — the conversation never stalls. A background prefetch warms the next turn, so the steady-state cost is ~0 ms.

Highlights:

  • Both-role capture via conversation_item_added (user AND assistant turns, with interruption metadata)
  • Deterministic idempotency seeds — retries and reconnects never duplicate memories
  • A search_memory tool the LLM can call for explicit lookups (“what did I tell you last week?”)
  • Failure-proof: outages and quota limits degrade to “no memories this turn”, never a broken call

Install: pip install livekit-memorysync
Docs: LiveKit Voice Memory | MemorySync Docs

We also opened a PR adding a runnable example to python-agents-examples (#93). Feedback very welcome!

I don’t think that repository would accept a demo that depended on a third party plugin, but if you can point to a separate repo (or a fork) here, it would be helpful :raising_hands:

We’ve moved the runnable example into its own repo:

It’s the complete voice agent from the PR: per-turn memory injection inside on_user_turn_completed under a hard 1.2 s latency budget (a slow memory service can never stall the call), both-side turn capture with idempotent retries, and an on-demand memory search tool. pip install -r requirements.txt, add LiveKit + MemorySync keys to .env, and python memorysync_memory.py console — tell it your name, restart the session, and it remembers.

Happy to close #93 in favour of this repo if that’s the preferred route. :raising_hands:

Thank you, & I see you already closed #93 :raising_hands: I edited the above post slightly and made it the solution so anyone finding this post in the future has everything in the same place.