Play with the Grok Voice Agent API in this LiveKit-powered playground
xAI ecosystem support
xAI provides some of the most powerful AI models and services today, which integrate into LiveKit Agents in the following ways:
- Grok Models: A family of state of the art, high-performance LLMs.
- Grok Voice Agent API: A speech-to-speech realtime model, API compatible with OpenAI's Realtime API.
Getting started
Use the Voice AI quickstart to build a voice AI app with Grok.
Voice AI quickstart
Build your first voice AI app with Grok Voice Agent API.
Install the xAI plugin:
uv add "livekit-agents[xai]~=1.3"
Add your xAI API key to your .env file:
XAI_API_KEY=<your-xai-api-key>
Use xai.realtime.RealtimeModel as the LLM component to initialize your AgentSession:
from livekit.plugins import xai# ...# in your entrypoint functionsession = AgentSession(llm=xai.realtime.RealtimeModel(voice="Ara",),)
LiveKit Agents overview
LiveKit Agents is an open source framework for building realtime AI apps in Python and Node.js. It supports complex voice AI workflows with multiple agents and discrete processing steps, and includes built-in load balancing.
LiveKit provides SIP support for telephony integration and full-featured frontend SDKs in multiple languages. It uses WebRTC transport for end-user devices, enabling high-quality, low-latency realtime experiences. To learn more, see LiveKit Agents.
Additional resources
The following links provide more information on each available xAI component in LiveKit Agents.