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.1.tar.gz
(15.9 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.1.tar.gz.
File metadata
- Download URL: memoair_livekit-0.3.1.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
029e47f08facb354ff094a73681b2217311b0f279bb83596634aa2c7085a4aac
|
|
| MD5 |
6f15721f61733652dfddf54fa050fe66
|
|
| BLAKE2b-256 |
1bd1126490556d6628087f0d0edaeded8a85a12d0291542714ee973d3c9b6f72
|
File details
Details for the file memoair_livekit-0.3.1-py3-none-any.whl.
File metadata
- Download URL: memoair_livekit-0.3.1-py3-none-any.whl
- Upload date:
- Size: 8.9 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 |
e63b006fb68fb90f9f66622c7952484c47ac24ae73ce080366c2ffb6f7427aec
|
|
| MD5 |
4bf8369e9af895f418d857d4b221f8dd
|
|
| BLAKE2b-256 |
4faf8858dffb00d61f0877bf957f7a56d78056c3e7d7b70cf4d17c2b164b3508
|