OpenAI Live
OpenAI GPT-Live brings continuous voice conversations to your agents.
The Live model listens and speaks while a separate Responses model handles
reasoning and selects tools for BidiAgent to execute.
Follow the quickstart to build a voice agent, using the Live configuration below.
Installation
Section titled “Installation”Install the OpenAI Live extra in a separate virtual environment:
pip install "strands-agents[bidi-openai-live]"For local audio dependencies and device setup, see Audio I/O.
Credentials
Section titled “Credentials”Create an OpenAI API key with access to your chosen Live and Responses models, then set it in your environment:
export OPENAI_API_KEY="your-api-key"OpenAILiveModel reads OPENAI_API_KEY automatically. Pass OpenAI client options
through client_args, such as client_args={"api_key": "your-api-key"}.
Configuration
Section titled “Configuration”Configure a Live model for speech and a Responses model for reasoning and tool
use, then pass the provider to BidiAgent:
from strands.bidi.agent import BidiAgentfrom strands.bidi.models import OpenAILiveModel
model = OpenAILiveModel( model_id="gpt-live-1", delegation_config={"type": "responses", "model_id": "gpt-6-luna"}, voice="marin", audio_config={"sample_rate": 24000},)agent = BidiAgent(model=model)Both model IDs are required. The top-level model_id selects the voice model;
delegation_config["model_id"] selects the Responses model. Only Responses
delegation is supported.
Choose an OpenAI voice or omit voice to use the API default. Input and
output use mono PCM16 at 24 kHz; set audio_config={"sample_rate": 16000} for
16 kHz. Custom inputs must stream continuously, including silence.
See the OpenAILiveModel API reference for all constructor options.
Delegation settings
Section titled “Delegation settings”Configure backend reasoning and output through delegation_config:
from strands.bidi.models import OpenAILiveModel
model = OpenAILiveModel( model_id="gpt-live-1", delegation_config={ "type": "responses", "model_id": "gpt-6-luna", "max_output_tokens": 512, "reasoning": {"effort": "low"}, },)Set delegation_config["system_prompt"] to override the agent’s system prompt
for backend reasoning and tool use. Otherwise, both models use the agent’s
prompt. Register tools on BidiAgent.
For text settings, service tier, and other options, see
OpenAILiveResponsesDelegationConfig and OpenAI’s
Responses delegation guide.
Connection restarts
Section titled “Connection restarts”The provider saves sessions with OpenAI and forks them on restart, preserving the conversation and configuration. Forking requires enabled project storage and a finalized recording; it is unavailable with Zero Data Retention.
Compatibility
Section titled “Compatibility”When consuming Strands events, account for these differences:
- Transcripts: Each API fragment becomes a completed transcript block and history message, even when it contains only part of a sentence. Backend text and spoken transcripts both enter history.
- Barge-in: The provider does not emit
BidiBargeInEvent. Strands cannot automatically clear buffered audio or cancel tools when the user speaks. - Usage: Token usage covers the Responses model only. Live reports voice duration in seconds, which Strands token metrics do not include. See OpenAI’s usage guidance.