Bedrock Nova Sonic
Amazon Nova Sonic brings expressive, multilingual voice conversations to your agents. Users can speak naturally, interrupt a reply, and ask the agent to take action through tools.
Follow the quickstart to build a voice agent that listens, speaks, and calls tools.
Installation
Section titled “Installation”Install the Nova Sonic extra:
pip install "strands-agents[bidi]"For local audio dependencies and device setup, see Audio I/O.
Credentials
Section titled “Credentials”Configure AWS credentials with permission to invoke Nova Sonic in a
supported region.
BedrockNovaSonicModel uses Boto3’s credential chain, including
environment variables, named profiles, and IAM roles. See
Setting up AWS credentials
for shared setup instructions.
To use a named profile, pass a Boto3 session with its region:
import boto3
from strands.bidi.models import BedrockNovaSonicModel
model = BedrockNovaSonicModel( model_id="amazon.nova-2-5-sonic", boto_session=boto3.Session(profile_name="voice-agent", region_name="us-east-1"),)Without a custom session, you can pass region directly. If omitted, the model
uses Boto3’s configured region, falling back to us-east-1.
Configuration
Section titled “Configuration”Create a model with the voice and audio settings for your application, then pass it
to BidiAgent. This example selects the tiffany voice and 24 kHz output audio:
from strands.bidi.agent import BidiAgentfrom strands.bidi.models import BedrockNovaSonicModel
model = BedrockNovaSonicModel( model_id="amazon.nova-2-5-sonic", region="us-east-1", voice="tiffany", audio={"output": {"sample_rate": 24000}},)agent = BidiAgent(model=model)Choose a voice from Nova Sonic’s voices and languages. Audio uses
mono PCM, with 16 kHz input and output by default. Set either stream’s sample rate
through audio.
See the BedrockNovaSonicModel API reference for all constructor
options.
Session settings
Section titled “Session settings”Pass Nova Sonic’s session settings through params to tune
inference and turn detection. For example, LOW endpointing sensitivity allows
longer pauses before the model decides the user has finished speaking:
from strands.bidi.models import BedrockNovaSonicModel
model = BedrockNovaSonicModel( model_id="amazon.nova-2-5-sonic", params={"turnDetectionConfiguration": {"endpointingSensitivity": "LOW"}},)Use the provider’s field names inside params, as shown above.
Connection restarts
Section titled “Connection restarts”Nova Sonic limits each connection to eight minutes. By default, BidiAgent
schedules a restart after seven minutes and replays conversation history into the
new connection. See Connection restarts to
customize the timing and track the transition.
On startup and restart, the adapter replays text from the conversation history, including completed transcripts. It truncates individual messages to 50 KiB and retains up to 200 KiB of recent history. These limits apply to the history sent when opening a connection.