Skip to main content

Overview

Grok Realtime agents are voice-to-voice agents where Coval connects directly to xAI’s Grok Voice Agent API on your behalf. You provide an API key, an agent prompt, a voice, and a model — Coval handles everything else. No webhook, no SIP trunk, and no self-hosted server required. This makes Grok Realtime the fastest way to evaluate a Grok-based agent configuration: tune the prompt, change the voice, and re-run the same test set to see how the change affects behavior.
Use this connection when you want to evaluate an agent built directly on the Grok Voice Agent API. If your production agent runs on Pipecat, LiveKit, or a custom stack, connect it through the matching integration instead.

Configuration Requirements

The only required field for a MODEL_TYPE_GROK_REALTIME agent is metadata.grok_realtime_api_key. Every other field below is optional — if omitted, Coval applies the default shown.

xAI API Key

  • Field: grok_realtime_api_key
  • Type: String (required)
  • Purpose: Authenticates Coval’s connection to the Grok Voice Agent API
  • Format: An xAI API key with Grok Voice Agent API access. Must start with xai-.
  • Security: Stored encrypted and handled securely

Agent System Instructions

  • Field: grok_realtime_instructions
  • Type: String (optional)
  • Default: "" (model default instructions)
  • Purpose: System prompt sent as the session instructions to the Grok voice model
  • Use Cases: Role definition, behavior guidelines, response formatting
  • Example: "You are a helpful customer support agent. Always be polite and provide accurate information."

Model

  • Field: grok_realtime_model
  • Type: String (optional)
  • Default: grok-voice-think-fast-1.0 (used when the field is omitted)
  • Purpose: Selects which Grok voice model powers the agent
Available Models:

Agent Voice

  • Field: grok_realtime_voice
  • Type: String (optional)
  • Default: ara
  • Purpose: Prebuilt voice used by the agent
Available Voices:
There is no temperature setting for Grok Realtime agents. The Grok Voice Agent API does not expose a temperature knob, so tune response style through the system instructions instead.

Simulation Timeout

  • Field: simulation_timeout_seconds
  • Type: Integer (optional)
  • Default: 900 (15 minutes)
  • Range: 1 to 1800 (30 minutes)
  • Purpose: Maximum duration for a single simulated conversation

Setup Instructions

1

Get an xAI API key

Create a key in the xAI Console and confirm it has Grok Voice Agent API access. Keys start with xai-.
2

Create the agent in Coval

Open Agents in the sidebar, click New Agent, and select Grok Realtime under Voice to Voice.
3

Configure the agent

Paste your xAI API key, write your system instructions, and pick a model and voice.
4

Run a simulation

Create a test set, launch a simulation, and review the transcript and metric outputs.

Creating via the API

Grok Realtime agents can also be created with the v1 Agents API:

How Simulations Work

When you launch a simulation against a Grok Realtime agent, Coval:
  1. Opens a connection to the Grok Voice Agent API using your API key, model, voice, and system instructions
  2. Plays the simulated user’s turns into the live session
  3. Captures the agent’s audio responses and transcribes them
  4. Records the full conversation transcript
  5. Runs your configured metrics against the transcript

Troubleshooting

Invalid or missing API key
  • The key must start with xai- — the agent form flags keys without that prefix
  • Confirm the key is valid in the xAI Console and has Grok Voice Agent API access
Voice rejected on save
  • Voice must be one of eve, ara, rex, sal, or leo. Other strings are rejected at save time.
Responses are too random or too flat
  • Grok Realtime has no temperature setting. Adjust the system instructions — for example, ask for concise, consistent answers, or give examples of the tone you want.
Agent is unresponsive or cuts off early
  • Increase Simulation Timeout if conversations are being cut short
  • Check that your system instructions don’t tell the agent to end calls immediately