aloof-bear-48148
12/20/2025, 12:12 AMtall-airline-16756
12/20/2025, 12:12 AMtall-airline-16756
12/20/2025, 12:12 AMAgent.__init__(instructions=...), or are you also passing instructions directly into the xAI RealtimeModel? Try this to verify behavior:
session = AgentSession(
llm=xai.realtime.RealtimeModel(instructions="You are a helpful assistant.")
)
If that forwards instructions, the gap is between Agent.init and the xAI plugin.
1. Plugin version
• Make sure you’re on the latest livekit-plugins-xai release. The xAI plugin’s docs show RealtimeModel accepts instructions, but examples are sparse and earlier versions may not forward agent-level instructions.
1. Minimal repro & diagnostics
• If the direct RealtimeModel(instructions=...) does not work, please paste a minimal snippet showing:
◦ how you construct Agent and AgentSession
◦ which xAI plugin version you’re using
◦ any logs or responses from the plugin/backend showing session config
This will let me pinpoint whether the issue is in your usage or the plugin forwarding.
1. If direct model instructions work but Agent.init doesn’t
• That indicates the xAI plugin isn’t honoring agent-level instruction propagation. I can walk you through a short patch/workaround (always pass instructions into RealtimeModel) or help capture the exact trace to file an issue for the plugin maintainers.
Which of the checks above can you try now, and can you share a minimal code snippet and the plugin version if the problem persists?
Sources: xAI Grok Voice Agent API plugin | LiveKit docs | OpenAI Realtime API plugin guide | LiveKit docsaloof-bear-48148
12/20/2025, 12:34 AMtall-airline-16756
12/20/2025, 12:34 AMinstructions into xai.realtime.RealtimeModel raises a TypeError.
• Agent-level instructions are ignored when the LLM is xai.realtime.RealtimeModel.
• The same code works with openai.realtime.RealtimeModel.
What’s happening
• The xAI RealtimeModel does not support an instructions parameter and does not forward Agent-level instructions. This is a known limitation of the xAI plugin (it only documents parameters like voice, api_key, and turn_detection).
Next steps (recommended)
• File a bug report on the LiveKit Agents GitHub requesting parity support for instructions in xai.realtime.RealtimeModel and mention that OpenAI’s plugin accepts and forwards system instructions. Include:
◦ Your minimal repro (the two tests you ran)
◦ Plugin version livekit-plugins-xai==1.3.9
◦ Error message for direct model instructions (TypeError... unexpected keyword argument 'instructions')
◦ That Agent-level instructions are ignored
• Workaround: Until the plugin supports this, pass your system prompt directly to the model if possible — but xAI’s plugin currently lacks that parameter, so the practical workaround is to use the OpenAI realtime plugin (if acceptable) or modify the plugin locally to forward instructions in session initialization.
If you want, I can:
• Draft a concise GitHub issue text for you (include repro, expected behavior, and observed behavior).
• Help outline a minimal patch approach to add instructions forwarding in the plugin code so you can test a local fix.
Which would you prefer?
Sources: xAI Grok Voice Agent API plugin | LiveKit docs | OpenAI Realtime API plugin guide | LiveKit docs | Azure OpenAI Realtime API and LiveKit | LiveKit docs