Vision Agents uses Stream Video for real-time WebRTC transport by default. External WebRTC transports are supported as well. Most AI providers offer free tiers to get started.
Installation
Quick Start
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
model | str | "grok-4-latest" | Model ("grok-4-latest", "grok-4.1") |
api_key | str | None | API key (defaults to XAI_API_KEY env var) |
tools_max_rounds | int | 3 | Maximum tool-call rounds per response |
Function Calling
Grok 4.1+ supports function calling:Events
The xAI plugin no longer documents provider-specific event classes for normal app code. Prefer core events and provider-agnostic response handling.Next Steps
xAI Realtime
Speech-to-speech over WebSocket
xAI TTS
Text-to-speech with expressive voices