Skip to content

Source Strands Bidi Agents

Reese Hodge edited this page Oct 9, 2026 · 1 revision

Source: Strands Bidi Agents (GA)

The Strands blog post Bidi Agents now GA (dated 2026-10-05), read 2026-10-09 together with the bidirectional-streaming docs it links and AWS's same-week Nova 2.5 Sonic announcement. Nothing here is adopted.

It earned a page for two reasons. It shipped alongside Nova 2.5 Sonic, which made Source-Nova-Sonic stale. And it is the Strands wrapper that Source-AgentCore-Bidirectional-Streaming flagged as Python-only. GA did not change that.

What it is

BidiAgent holds one persistent connection to a realtime speech-to-speech model for the whole conversation. It streams input and output at the same time, so a user can talk over the agent (barge-in), and it runs tool calls in the background without pausing either direction.

It shares foundations with the regular Strands Agent: tools, lifecycle hooks, system-prompt handling, and application context via invocation_state. The FAQ adds a caveat: features that depend on the regular agent loop "should be checked for Bidi support".

Realtime models are a separate family. Each provider class works only with BidiAgent:

Provider Class Input Connection limit
Amazon Nova Sonic BedrockNovaSonicModel Audio, text 8 minutes
Google Gemini Live GoogleGeminiLiveModel Audio, text, images About 10 minutes
OpenAI Realtime OpenAIRealtimeModel Audio, text, images 60 minutes

Every provider takes the same core options: model_id, voice, params (a pass-through to the provider's own API), and connection (restart timing).

Python only — verified, not assumed

Every sample is Python (pip install "strands-agents[bidi-all,bidi-pyaudio]", from strands.bidi.agent import BidiAgent). The docs' Implementation section lists only strands-py files. The post never says so.

Checked on 2026-10-09:

  • The pinned @strands-agents/sdk 1.19.0 ships no Bidi types. The only bidi match in its .d.ts files is a comment in mime.d.ts ("bidirectional mapping between media formats and MIME types").
  • The latest release, 1.20.0 (published 2026-10-08), exports no subpath matching bidi, realtime, voice or audio.
  • The strands-ts source on main (indexed commit 54775ee) contains no Bidi code.

For browsers and mobile, the FAQ is explicit: run BidiAgent on a Python backend and stream audio to it. The client supplies microphone capture, playback and the connection.

What GA adds over the raw model

Connection renewal

Nova Sonic caps a connection at 8 minutes (see Source-Nova-Sonic). BidiAgent restarts the provider connection before the limit, at a turn boundary if one arrives within a bounded wait. It carries context across:

  • History replay — Nova Sonic and OpenAI Realtime get a fresh connection plus the conversation history.
  • Session resumption — Gemini Live reconnects to the same server-side session, falling back to replay.

Timing is configurable per provider, and hooks expose restarts. Surviving an application restart is a separate concern, handled by session management "with capabilities and history limits that vary by provider".

Echo suppression

AudioIO(audio_processor=True) turns on WebRTC acoustic echo cancellation, noise suppression and automatic gain control. It uses the agent's own playback as the echo reference. When the provider signals a barge-in, the output clears queued playback. AudioIO drives the local microphone and speakers through PortAudio, so it belongs to the process running the agent.

Observability

OpenTelemetry spans cover the session, model responses, tool calls, connection establishment and connection restarts. Session spans carry reported token usage. Response spans record time from response start to first audio chunk. Setup is the same StrandsTelemetry used for other Strands agents.

Sensitive span attributes can be redacted while keeping timing, tool names and token counts. The post gives OTEL_SEMCONV_STABILITY_OPT_IN="gen_ai_unredacted_attributes=" for this, and notes that application logs and persisted history need their own handling.

Delegation to other agents

A voice agent can call a slower agent as a tool. The post's example wraps a Python strands_harness agent with create_harness(...).as_tool(...). The voice model and the delegated model are chosen independently.

Naming drift between AWS samples and GA

AWS's earlier scalable voice agent design post constructs BidiNovaSonicModel(model_id="amazon.nova-2-sonic-v1:0", …). The GA docs use BedrockNovaSonicModel from strands.bidi.models. Code copied from a pre-GA sample may therefore not match the GA API. Check class names against the installed package.

The GA examples pass model_id="amazon.nova-2-5-sonic". That ID was not found in any Bedrock model card on 2026-10-09; see Source-Nova-Sonic.

What this means for Max Height

Analysis, not fact. Nothing here has been decided.

It removes a chore, not an objection. The four costs on Source-Nova-Sonic remain: no visemes, no free replay, no Guardrails, and a whole-conversation cost shape. What Bidi automates is the session-continuation pattern needed to get past 8 minutes, which is plumbing.

The language is now the Strands-specific barrier. Decision-Strands-SDK rejected the Python SDK to keep the monorepo in TypeScript. Adopting BidiAgent would reopen that, as a second agent runtime in a second language. The TypeScript route skips Strands entirely: AWS publishes a Node.js WebSocket sample that calls InvokeModelWithBidirectionalStream directly. That route would have to reimplement connection renewal and barge-in handling by hand.

AudioIO would not be the audio path. Max Height captures the microphone in the browser (Component-Speech-Input). A Python backend would receive a network stream rather than drive a device, so AudioIO's echo cancellation would not apply. Echo handling would stay on the client.

Two of the three providers bill outside AWS. OpenAI Realtime and Gemini Live add non-AWS credentials and spend that the AWS budget alerts and hard stop in Concept-Budget-Ceiling cannot see.

The telemetry fits P9. Time-to-first-audio and per-session token usage are the numbers a voice spec would need to set and then watch (Concept-Observability).

This is input for the hybrid evaluation in issue #48, not a proposal. Adopting real-time voice would trip the Spec Kit rule: it means a new AWS resource, a cost-model change, and an architecture change.

Agent takeaway

Read this before proposing Strands for voice. Strands' GA is Python's GA: packages/agent cannot import any of it. Re-check the TypeScript SDK's exports before relying on that claim, since it was true as of 1.20.0.

See also: Source-Nova-Sonic, Source-AgentCore-Bidirectional-Streaming, Decision-Strands-SDK, Index.

Clone this wiki locally