Public PyPI plugin
PyAI vs LiveKit: managed agent or open framework
Yes. `pip install livekit-plugins-pyai`. Your LiveKit worker keeps the LLM, rooms, and transport. PyAI is Hear and Speak.
PyAI
PyAI runs the agent.
LiveKit Agents
You keep transport, LLM, and tools. PyAI is speech.
Control boundary
The decision is who operates the conversation loop.
Both paths use PyAI speech. The difference is whether your application owns each stage or asks Omni to run the agent as one managed system.
Managed path
PyAI Omni
- 1Connect to Omni over one WebSocket.
- 2Configure persona, knowledge, tools, voice, and optional continuity when the Agent profile has it enabled and a caller key is available.
- 3PyAI runs turn-taking, speech, reasoning, and agent audio.
- 4Use managed telephony or connect your own call path.
Composable path
LiveKit Agents + PyAI
- 1Keep the caller inside a LiveKit room.
- 2Send caller audio to PyAI Hear through the plugin.
- 3Run your LLM, tools, and turn policy in the LiveKit worker.
- 4Send text to PyAI Speak and publish the audio back to the room.
Side by side
| PyAI | LiveKit Agents + PyAI | |
|---|---|---|
| Product shape | Managed speech-to-speech agent on one WebSocket. | Open-source realtime agent framework with a tested public PyAI STT and TTS plugin. |
| What you own | Persona, tools, knowledge, and business configuration. | The worker, media flow, LLM, turn policy, tools, deployment choices, and failure handling. |
| Media | Voice sessions and phone calls. | WebRTC rooms with voice, video, multimodal, and multi-participant workflows. |
| Speech | Speech is part of the integrated Omni path. | PyAI Hear and Speak are explicit LiveKit AgentSession components. |
| Telephony | Managed telephony and built-in call controls are available. | LiveKit supplies SIP and media primitives; your worker owns the call behavior. |
| Runtime | Any client that can speak the Omni WebSocket protocol. | LiveKit supports Python and Node.js. The PyAI plugin is currently Python. |
LiveKit facts are from its public Agents, models, and Cloud billing documentation, checked August 17, 2026.
The working object
Keep your LiveKit worker. Swap only the speech components.
Your framework still owns orchestration. The PyAI key stays on the server-side worker and authorizes Hear and Speak.
Install the PyAI adapter
pip install livekit-plugins-pyai==0.1.2Set PYAI_API_KEY on the worker. A sandbox key is enough to test Hear and Speak with bounded daily usage and no billing gate.
from livekit.agents import AgentSession
from livekit.plugins import pyai
session = AgentSession(
stt=pyai.STT(language="en"),
llm=llm, # keep your existing LiveKit LLM
tts=pyai.TTS(voice="stock_emma_en_gb"),
vad=vad, # keep your existing LiveKit VAD
)Choose based on the work you want to own.
Choose LiveKit Agents + PyAI when
- You already run LiveKit rooms or SIP.
- Video, avatars, or multi-participant sessions matter.
- You need to swap or inspect every pipeline component.
- Your team wants to own worker deployment and failure policy.
Choose PyAI Omni when
- You are shipping a phone-first voice agent.
- One managed realtime contract matters more than component choice.
- You want built-in call controls, knowledge, tools, and caller continuity when the Agent profile has it enabled and a caller key is available.
- You do not want to operate an STT, LLM, and TTS cascade.
TL;DR
- Install the public plugin and keep your LiveKit rooms, LLM, and tools
- Hear is $0.001/min and Speak is $0.04/min when used as components
- Omni is $0.05/min speech + brain if you want the managed loop instead
- Choose LiveKit when WebRTC, video, or multi-participant media are requirements
When LiveKit Agents is the better pick
The public plugin supports Python. LiveKit also supports Node.js, but that runtime needs direct PyAI API wiring rather than this package.
FAQ
Can I use PyAI with LiveKit Agents?
Yes. Install livekit-plugins-pyai in your Python worker and use PyAI Hear for speech-to-text and PyAI Speak for text-to-speech. Your framework keeps control of transport, the LLM, tools, and pipeline behavior.
When should I use LiveKit Agents with PyAI instead of Omni?
Use LiveKit with PyAI when WebRTC rooms, video, multi-participant media, or component-level orchestration are requirements.
When should I use PyAI Omni?
Use Omni when you want one managed speech-to-speech agent with turn-taking, knowledge, tools, optional managed telephony, and caller continuity when an Agent profile has it enabled and a caller key is available.
What changes in my code?
Keep your existing framework application. Replace its STT and TTS components with the PyAI services, set PYAI_API_KEY on the worker, and leave your transport, LLM, tools, and business logic in place.
How does pricing work?
$0.001/min for Hear and $0.04/min for Speak when used as components. Omni is $0.05/min*. *Managed telephony is $0.01/min separately. The LiveKit Agents framework is open source. LiveKit Cloud, media, inference, telephony, and your other model services are metered separately.
Does this page claim one framework is faster?
No. End-to-end behavior depends on the transport, hosting region, LLM, turn settings, and every processor in the pipeline. Test both paths on the same calls and publish the conditions with any result.
Pick your control boundary. Keep the speech layer.
Use PyAI Hear and Speak inside LiveKit Agents, or run the complete agent on Omni.