> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# TurnStateEvent

> The turn started or ended (ACP v2 ).

The turn started or ended (ACP v2 `state_update`). Only the connection that
sent the prompt receives these, so observers of a session driven elsewhere
should rely on `status` events instead.

## Properties

**state** `TurnState` *required*

**stopReason** `undefined | StopReason` *required*

**Type:** `undefined | StopReason`

Why the turn ended, on `idle`.

**type** `"turn_state"` *required*

**update** `SessionUpdate` *required*


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.