LiveKit Agent integration for MemoAir voice memory
Project description
memoair-livekit
LiveKit Agent integration for MemoAir voice memory. Drop-in livekit.agents.Agent subclass that searches memory before every LLM turn and persists each completed turn.
Install
pip install memoair-livekit
Quick start
import asyncio
from livekit.agents import AgentSession
from memoair_livekit import MemoAirLiveKitAgent
async def entrypoint(ctx):
agent = MemoAirLiveKitAgent(
api_key="memoair_pk_...", # account-scoped API key
project_id="proj_xxx", # which customer project
agent_id="agent_xxx", # which agent identity
user_id=ctx.room.local_participant.identity,
instructions="You are a helpful voice assistant.",
)
# Or read MEMOAIR_API_KEY / MEMOAIR_PROJECT_ID / MEMOAIR_AGENT_ID /
# MEMOAIR_USER_ID from the environment:
# agent = MemoAirLiveKitAgent.from_env(instructions="...")
session = AgentSession(vad=..., stt=..., llm=..., tts=...)
# Required: LiveKit's base Agent does NOT call on_agent_response_completed.
# Without this wiring, search runs every turn but nothing is saved.
@session.on("conversation_item_added")
def _on_item_added(event):
if event.item.role == "assistant":
asyncio.create_task(
agent.on_agent_response_completed(session.chat_ctx, event.item)
)
await session.start(agent=agent, room=ctx.room)
Full docs: https://docs.memoair.dev/voice/integrations/livekit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
memoair_livekit-0.3.2.tar.gz
(16.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file memoair_livekit-0.3.2.tar.gz.
File metadata
- Download URL: memoair_livekit-0.3.2.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43d3e0564687dbd6f7416550d7385efd53555332e95d2ce073d10b3cb8d93b55
|
|
| MD5 |
697fe2f3cbb26b689d6366977754c4e2
|
|
| BLAKE2b-256 |
0b087c258e78e428d0a8b21a160bbf4daf3439361b79fd059df88266b4e17d09
|
File details
Details for the file memoair_livekit-0.3.2-py3-none-any.whl.
File metadata
- Download URL: memoair_livekit-0.3.2-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
085e478a2a40947c38abdfaa0bce26f7f8d81b2c5e0595f46054e5fa5ca81db6
|
|
| MD5 |
82b2274003caefba5a6b22fe2e414459
|
|
| BLAKE2b-256 |
df4a6882b962e3835d063ad49bd74567ce65c36e336f65eec2702c18d1228285
|