Content-related type definitions for bidirectional streaming.

#### BidiUserContentBlock

A complete text or image block supplied by a user.

#### BidiContentBlock

A complete text, image, or tool result block.

#### BidiContentDelta

An audio delta for the live input stream.

#### BidiUserContentBlockData

Dictionary form of one user content block.

#### BidiContentBlockData

Dictionary form of one text, image, or tool result block.

#### BidiContentDeltaData

Dictionary form of an audio delta.

## BidiMessage

```python
@dataclass
class BidiMessage()
```

Defined in: [src/strands/experimental/bidi/types/content.py:33](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/content.py#L33)

An input message containing ordered content blocks.

Callers must supply at least one block when sending and must not mix tool results with user text or images. Send streaming deltas individually.

**Attributes**:

-   `content` - Ordered list of complete content blocks.

## BidiContentMetadata

```python
class BidiContentMetadata(TypedDict)
```

Defined in: [src/strands/experimental/bidi/types/content.py:46](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/content.py#L46)

Streamed content metadata stored under a message’s metadata.custom.bidi.

**Attributes**:

-   `kind` - Identifies the message as text, reasoning, or a transcript.
-   `status` - Whether the content is pending, complete, or incomplete.

Agent-related type definitions for bidirectional streaming.

This module defines the types used for BidiAgent.

#### BidiAgentInput

A single user input or list of user content blocks.

Media input types for bidirectional streaming.

## AudioDelta

```python
@dataclass
class AudioDelta()
```

Defined in: [src/strands/experimental/bidi/types/media.py:15](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/media.py#L15)

Audio samples to append to the live input stream.

Sending a delta does not explicitly end the user’s turn.

**Attributes**:

-   `format` - Audio format.
-   `source` - Source containing the audio samples.

#### to\_dict

```python
def to_dict() -> _AudioDeltaData
```

Defined in: [src/strands/experimental/bidi/types/media.py:28](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/media.py#L28)

Return the dictionary form of this delta.

Protocols for bidirectional input and output streams.

The protocols separate input and output concerns into independent callables with lifecycle methods managed by `BidiAgent`.

## InputStream

```python
@runtime_checkable
class InputStream(Protocol)
```

Defined in: [src/strands/experimental/bidi/types/io.py:18](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/io.py#L18)

Callable input stream managed by a bidirectional agent.

An input stream reads one value from a source each time the agent calls it.

#### start

```python
async def start(agent: "BidiAgent") -> None
```

Defined in: [src/strands/experimental/bidi/types/io.py:24](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/io.py#L24)

Start input.

#### stop

```python
async def stop() -> None
```

Defined in: [src/strands/experimental/bidi/types/io.py:28](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/io.py#L28)

Stop input.

#### \_\_call\_\_

```python
def __call__() -> Awaitable[BidiAgentInput]
```

Defined in: [src/strands/experimental/bidi/types/io.py:32](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/io.py#L32)

Read input data from the source.

**Returns**:

Awaitable that resolves to input content (audio, text, image, etc.)

## OutputStream

```python
@runtime_checkable
class OutputStream(Protocol)
```

Defined in: [src/strands/experimental/bidi/types/io.py:42](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/io.py#L42)

Callable output stream managed by a bidirectional agent.

An output stream handles one event each time the agent calls it.

#### start

```python
async def start(agent: "BidiAgent") -> None
```

Defined in: [src/strands/experimental/bidi/types/io.py:48](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/io.py#L48)

Start output.

#### stop

```python
async def stop() -> None
```

Defined in: [src/strands/experimental/bidi/types/io.py:52](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/io.py#L52)

Stop output.

#### \_\_call\_\_

```python
def __call__(event: BidiOutputEvent) -> Awaitable[None]
```

Defined in: [src/strands/experimental/bidi/types/io.py:56](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/io.py#L56)

Process output events from the agent.

**Arguments**:

-   `event` - Output event from the agent (audio, text, tool calls, etc.)

Bidirectional streaming types for real-time audio/text conversations.

Type definitions for bidirectional streaming that extends Strands’ existing streaming capabilities with real-time audio and persistent connection support.

Key features:

-   Audio output events with standardized formats
-   Barge-in detection and handling
-   Connection lifecycle management
-   Provider-agnostic event types
-   Type-safe discriminated unions with TypedEvent
-   JSON-serializable output events (audio stored as base64 strings)

Audio format normalization:

-   Supports PCM, WAV, Opus, and MP3 formats
-   Describes sample rates in Hz
-   Normalizes channel configurations (mono/stereo)
-   Abstracts provider-specific encodings
-   Audio output stored as base64-encoded strings for JSON compatibility

#### AudioChannel

Number of audio channels.

-   Mono: 1
-   Stereo: 2

#### AudioFormat

Audio encoding format.

#### Role

Role of a message sender.

-   “user”: Messages from the user to the assistant.
-   “assistant”: Messages from the assistant to the user.

## BidiConnectionStartEvent

```python
class BidiConnectionStartEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:81](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L81)

Streaming connection established and ready for interaction.

**Arguments**:

-   `connection_id` - Unique identifier for this streaming connection.
-   `model` - Model identifier (e.g., “gpt-realtime-2.1”, “gemini-3.8-live”).

#### \_\_init\_\_

```python
def __init__(connection_id: str, model: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:89](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L89)

Initialize connection start event.

#### connection\_id

```python
@property
def connection_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:100](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L100)

Unique identifier for this streaming connection.

#### model

```python
@property
def model() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:105](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L105)

Model identifier (e.g., ‘gpt-realtime-2.1’, ‘gemini-3.8-live’).

## BidiConnectionRestartEvent

```python
class BidiConnectionRestartEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:110](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L110)

Agent is restarting the model connection.

Emitted on both reconnect paths: reactively after the model reports a timeout, and proactively when the reconnect timer fires ahead of the provider’s limit.

**Arguments**:

-   `reason` - What triggered the restart (“timeout” reactively, “scheduled” proactively).
-   `timeout_error` - The model’s timeout error on the reactive path; None when scheduled.
-   `turn_interrupted` - True if the restart cut an in-progress or owed turn (the alignment wait could not complete it before the deadline, or a timeout struck mid-turn). The provider replays history as context, so that turn will not be answered on its own — an app can re-prompt or notify the user when this is set.

#### \_\_init\_\_

```python
def __init__(reason: Literal["timeout", "scheduled"],
             timeout_error: "ConnectionTimeoutError | None" = None,
             turn_interrupted: bool = False)
```

Defined in: [src/strands/experimental/bidi/types/events.py:125](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L125)

Initialize connection restart event.

#### reason

```python
@property
def reason() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:142](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L142)

What triggered the restart (“timeout” or “scheduled”).

#### timeout\_error

```python
@property
def timeout_error() -> "ConnectionTimeoutError | None"
```

Defined in: [src/strands/experimental/bidi/types/events.py:147](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L147)

Connection timeout error on the reactive path; None when scheduled.

#### turn\_interrupted

```python
@property
def turn_interrupted() -> bool
```

Defined in: [src/strands/experimental/bidi/types/events.py:152](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L152)

True if the restart cut an in-progress or owed turn that will not be answered.

## BidiConnectionWarningEvent

```python
class BidiConnectionWarningEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:157](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L157)

Agent is approaching a proactive reconnect.

Emitted by the proactive reconnect timer before a reconnect; informational only.

**Arguments**:

-   `time_left_s` - Approximate seconds until the scheduled reconnect.

#### \_\_init\_\_

```python
def __init__(time_left_s: float)
```

Defined in: [src/strands/experimental/bidi/types/events.py:166](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L166)

Initialize connection warning event.

#### time\_left\_s

```python
@property
def time_left_s() -> float
```

Defined in: [src/strands/experimental/bidi/types/events.py:176](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L176)

Approximate seconds until the scheduled reconnect.

## BidiResponseStartEvent

```python
class BidiResponseStartEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:181](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L181)

Start of a model response.

**Arguments**:

-   `response_id` - Unique identifier for this response (used in BidiResponseStopEvent).

#### \_\_init\_\_

```python
def __init__(response_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:188](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L188)

Initialize response start event.

#### response\_id

```python
@property
def response_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:193](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L193)

Unique identifier for this response.

## BidiAudioStartEvent

```python
class BidiAudioStartEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:198](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L198)

Beginning of an assistant audio stream, identified by `content_id`.

#### \_\_init\_\_

```python
def __init__(content_id: str) -> None
```

Defined in: [src/strands/experimental/bidi/types/events.py:201](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L201)

Initialize audio start event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:206](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L206)

Identifier shared by this audio stream’s events.

## BidiAudioDeltaEvent

```python
class BidiAudioDeltaEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:211](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L211)

Incremental audio output from the model.

**Arguments**:

-   `audio` - Base64-encoded audio chunk.
-   `format` - Audio encoding format.
-   `sample_rate` - Number of audio samples per second in Hz.
-   `channels` - Number of audio channels (1=mono, 2=stereo).
-   `content_id` - Unique identifier shared by this audio stream’s events.

#### \_\_init\_\_

```python
def __init__(audio: str, format: AudioFormat, sample_rate: int,
             channels: AudioChannel, content_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:222](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L222)

Initialize audio delta event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:243](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L243)

Identifier shared by this audio stream’s events.

#### audio

```python
@property
def audio() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:248](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L248)

Base64-encoded audio chunk.

#### format

```python
@property
def format() -> AudioFormat
```

Defined in: [src/strands/experimental/bidi/types/events.py:253](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L253)

Audio encoding format.

#### sample\_rate

```python
@property
def sample_rate() -> int
```

Defined in: [src/strands/experimental/bidi/types/events.py:258](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L258)

Number of audio samples per second in Hz.

#### channels

```python
@property
def channels() -> AudioChannel
```

Defined in: [src/strands/experimental/bidi/types/events.py:263](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L263)

Number of audio channels (1=mono, 2=stereo).

## BidiAudioStopEvent

```python
class BidiAudioStopEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:268](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L268)

End of an assistant audio stream, which may still be playing.

#### \_\_init\_\_

```python
def __init__(content_id: str) -> None
```

Defined in: [src/strands/experimental/bidi/types/events.py:271](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L271)

Initialize audio stop event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:276](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L276)

Identifier shared by this audio stream’s events.

## BidiTextStartEvent

```python
class BidiTextStartEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:281](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L281)

Beginning of assistant text output, identified by `content_id`.

#### \_\_init\_\_

```python
def __init__(content_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:284](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L284)

Initialize text start event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:289](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L289)

Identifier shared by this text block’s events.

## BidiTextDeltaEvent

```python
class BidiTextDeltaEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:294](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L294)

Incremental assistant text output, separate from speech transcripts.

#### \_\_init\_\_

```python
def __init__(delta: str, content_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:297](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L297)

Initialize text delta event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:302](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L302)

Identifier shared by this text block’s events.

#### delta

```python
@property
def delta() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:307](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L307)

Incremental text.

## BidiTextStopEvent

```python
class BidiTextStopEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:312](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L312)

End of an assistant text stream, before its completed block is emitted.

#### \_\_init\_\_

```python
def __init__(content_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:315](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L315)

Initialize text stop event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:320](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L320)

Identifier shared by this text block’s events.

## BidiTextBlockEvent

```python
class BidiTextBlockEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:325](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L325)

Complete assistant text, emitted after its stop event by the agent.

#### \_\_init\_\_

```python
def __init__(text: str, content_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:328](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L328)

Initialize text block event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:333](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L333)

Identifier shared by this text block’s events.

#### text

```python
@property
def text() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:338](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L338)

Complete text.

## BidiReasoningStartEvent

```python
class BidiReasoningStartEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:343](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L343)

Beginning of model-provided reasoning text, identified by `content_id`.

#### \_\_init\_\_

```python
def __init__(content_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:346](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L346)

Initialize reasoning start event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:351](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L351)

Identifier shared by this reasoning block’s events.

## BidiReasoningDeltaEvent

```python
class BidiReasoningDeltaEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:356](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L356)

Incremental reasoning text or thought summary exposed by the model.

#### \_\_init\_\_

```python
def __init__(delta: str, content_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:359](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L359)

Initialize reasoning delta event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:364](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L364)

Identifier shared by this reasoning block’s events.

#### delta

```python
@property
def delta() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:369](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L369)

Incremental reasoning text.

## BidiReasoningStopEvent

```python
class BidiReasoningStopEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:374](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L374)

End of a reasoning stream, before its completed block is emitted.

#### \_\_init\_\_

```python
def __init__(content_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:377](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L377)

Initialize reasoning stop event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:382](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L382)

Identifier shared by this reasoning block’s events.

## BidiReasoningBlockEvent

```python
class BidiReasoningBlockEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:387](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L387)

Complete reasoning text, emitted after its stop event by the agent.

#### \_\_init\_\_

```python
def __init__(text: str, content_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:390](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L390)

Initialize reasoning block event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:395](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L395)

Identifier shared by this reasoning block’s events.

#### text

```python
@property
def text() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:400](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L400)

Complete reasoning text or thought summary.

## BidiTranscriptStartEvent

```python
class BidiTranscriptStartEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:405](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L405)

Beginning of a user or assistant transcript, before its text arrives.

**Arguments**:

-   `role` - Who is speaking (“user” or “assistant”).
-   `content_id` - Unique identifier shared by this transcript’s events.

#### \_\_init\_\_

```python
def __init__(role: Role, content_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:413](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L413)

Initialize transcript start event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:424](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L424)

Identifier shared by this transcript’s events.

#### role

```python
@property
def role() -> Role
```

Defined in: [src/strands/experimental/bidi/types/events.py:429](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L429)

The role of the speaker.

## BidiTranscriptDeltaEvent

```python
class BidiTranscriptDeltaEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:434](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L434)

Incremental transcription of user or assistant speech.

**Arguments**:

-   `delta` - The incremental transcript text.
-   `role` - Who is speaking (“user” or “assistant”).
-   `content_id` - Unique identifier shared by this transcript’s events.

#### \_\_init\_\_

```python
def __init__(delta: str, role: Role, content_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:443](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L443)

Initialize transcript delta event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:455](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L455)

Identifier shared by this transcript’s events.

#### delta

```python
@property
def delta() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:460](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L460)

The incremental transcript text.

#### role

```python
@property
def role() -> Role
```

Defined in: [src/strands/experimental/bidi/types/events.py:465](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L465)

The role of the message sender.

## BidiTranscriptStopEvent

```python
class BidiTranscriptStopEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:470](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L470)

End of a transcript stream, before its completed block is emitted.

**Arguments**:

-   `role` - Who spoke (“user” or “assistant”).
-   `content_id` - Unique identifier shared by this transcript’s events.

#### \_\_init\_\_

```python
def __init__(role: Role, content_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:478](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L478)

Initialize transcript stop event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:489](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L489)

Identifier shared by this transcript’s events.

#### role

```python
@property
def role() -> Role
```

Defined in: [src/strands/experimental/bidi/types/events.py:494](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L494)

The role of the speaker.

## BidiTranscriptBlockEvent

```python
class BidiTranscriptBlockEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:499](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L499)

Complete transcript, emitted after its stop event by the agent.

**Arguments**:

-   `transcript` - The final transcript text.
-   `role` - Who spoke (“user” or “assistant”).
-   `content_id` - Unique identifier shared by this transcript’s events.

#### \_\_init\_\_

```python
def __init__(transcript: str, role: Role, content_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:508](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L508)

Initialize transcript block event.

#### content\_id

```python
@property
def content_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:520](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L520)

Identifier shared by this transcript’s events.

#### transcript

```python
@property
def transcript() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:525](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L525)

The final transcript text.

#### role

```python
@property
def role() -> Role
```

Defined in: [src/strands/experimental/bidi/types/events.py:530](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L530)

The role of the speaker.

## BidiBargeInEvent

```python
class BidiBargeInEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:535](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L535)

Stop current response generation or playback while the session continues.

**Arguments**:

-   `reason` - Why response output should stop.

#### \_\_init\_\_

```python
def __init__(reason: Literal["user_speech", "error"])
```

Defined in: [src/strands/experimental/bidi/types/events.py:542](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L542)

Initialize barge-in event.

#### reason

```python
@property
def reason() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:552](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L552)

Why response output should stop.

## BidiResponseStopEvent

```python
class BidiResponseStopEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:557](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L557)

Response output ended. User transcription may still be pending.

**Arguments**:

-   `response_id` - ID of the response that ended (matches BidiResponseStartEvent).

#### \_\_init\_\_

```python
def __init__(response_id: str)
```

Defined in: [src/strands/experimental/bidi/types/events.py:564](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L564)

Initialize response stop event.

#### response\_id

```python
@property
def response_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:574](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L574)

Unique identifier for this response.

## ModalityUsage

```python
class ModalityUsage(dict)
```

Defined in: [src/strands/experimental/bidi/types/events.py:579](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L579)

Token usage for a specific modality.

**Attributes**:

-   `modality` - Type of content.
-   `input_tokens` - Tokens used for this modality’s input.
-   `output_tokens` - Tokens used for this modality’s output.

## BidiUsageEvent

```python
class BidiUsageEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:593](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L593)

Token usage event with modality breakdown for bidirectional streaming.

Tracks token consumption across different modalities (audio, text, images) during bidirectional streaming sessions.

**Arguments**:

-   `input_tokens` - Total tokens used for all input modalities.
-   `output_tokens` - Total tokens used for all output modalities.
-   `total_tokens` - Sum of input and output tokens.
-   `modality_details` - Optional list of token usage per modality.
-   `cache_read_input_tokens` - Optional tokens read from cache.
-   `cache_write_input_tokens` - Optional tokens written to cache.

#### \_\_init\_\_

```python
def __init__(input_tokens: int,
             output_tokens: int,
             total_tokens: int,
             modality_details: list[ModalityUsage] | None = None,
             cache_read_input_tokens: int | None = None,
             cache_write_input_tokens: int | None = None)
```

Defined in: [src/strands/experimental/bidi/types/events.py:608](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L608)

Initialize usage event.

#### input\_tokens

```python
@property
def input_tokens() -> int
```

Defined in: [src/strands/experimental/bidi/types/events.py:633](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L633)

Total tokens used for all input modalities.

#### output\_tokens

```python
@property
def output_tokens() -> int
```

Defined in: [src/strands/experimental/bidi/types/events.py:638](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L638)

Total tokens used for all output modalities.

#### total\_tokens

```python
@property
def total_tokens() -> int
```

Defined in: [src/strands/experimental/bidi/types/events.py:643](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L643)

Sum of input and output tokens.

#### modality\_details

```python
@property
def modality_details() -> list[ModalityUsage]
```

Defined in: [src/strands/experimental/bidi/types/events.py:648](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L648)

Optional list of token usage per modality.

#### cache\_read\_input\_tokens

```python
@property
def cache_read_input_tokens() -> int | None
```

Defined in: [src/strands/experimental/bidi/types/events.py:653](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L653)

Optional tokens read from cache.

#### cache\_write\_input\_tokens

```python
@property
def cache_write_input_tokens() -> int | None
```

Defined in: [src/strands/experimental/bidi/types/events.py:658](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L658)

Optional tokens written to cache.

## BidiToolUseBlocksEvent

```python
class BidiToolUseBlocksEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:663](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L663)

A complete group of tool calls requested by the model.

**Arguments**:

-   `tool_uses` - Tool calls to execute together.

#### \_\_init\_\_

```python
def __init__(tool_uses: list[ToolUse])
```

Defined in: [src/strands/experimental/bidi/types/events.py:670](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L670)

Initialize a tool-use group.

#### tool\_uses

```python
@property
def tool_uses() -> list[ToolUse]
```

Defined in: [src/strands/experimental/bidi/types/events.py:675](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L675)

Tool calls in provider order.

## BidiConnectionStopEvent

```python
class BidiConnectionStopEvent(TypedEvent)
```

Defined in: [src/strands/experimental/bidi/types/events.py:680](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L680)

Streaming connection closed.

**Arguments**:

-   `connection_id` - Unique identifier for this streaming connection (matches BidiConnectionStartEvent).
-   `reason` - Why the connection was closed.

#### \_\_init\_\_

```python
def __init__(connection_id: str,
             reason: Literal["client_disconnect", "timeout", "error",
                             "complete", "user_request"])
```

Defined in: [src/strands/experimental/bidi/types/events.py:688](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L688)

Initialize connection stop event.

#### connection\_id

```python
@property
def connection_id() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:703](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L703)

Unique identifier for this streaming connection.

#### reason

```python
@property
def reason() -> str
```

Defined in: [src/strands/experimental/bidi/types/events.py:708](https://github.com/strands-agents/harness-sdk/blob/main/strands-py/src/strands/experimental/bidi/types/events.py#L708)

Why the connection was closed.

#### BidiOutputEvent

Union of different bidi output event types.