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

# Inspect the planning stream protocol

> Read the native planning stream protocol description and connect it to the WebSocket expansion workflow, its request identities, and evaluator binding.

The HTTP interface exposes a GET route for the Adapt-1 planning stream protocol. It is distinct from the WebSocket connection at the same path used for live expansion. See [streaming expansion](https://docs.reilabs.org/docs/planning/integration.md#streaming-expansion) for the recorded message shapes. The captured GET response schema is untyped and does not specify the complete WebSocket message contract.

The tables below reproduce request fields from archived schema-version-5 build `0136121bd2cf9d4cdbcb114565c7e1ffb74c5a63`. A default marked "Not declared" is absent from that schema; it does not mean `null`. See [source and response notes](https://docs.reilabs.org/docs/neuroadapt/value-api.md#authentication-and-schema-source) for the evidence scope.

## Path, headers, and query

Send the hosted API key as `Authorization: Bearer <ADAPT1_API_KEY>`. The authenticated identity determines ownership; follow [HTTP and contracts](https://docs.reilabs.org/docs/neuroadapt/request-contracts.md) for the session placeholder.

| Parameter | Location | Required | Type | Constraints |
| - | - | - | - | - |
| `domain_id` | path | Yes | `string` | No further constraint declared |
| `session_id` | query | No | `string` or `null` | No further constraint declared |
| `X-Neuroadapt-Session-Id` | header | No | `string` or `null` | No further constraint declared |

`X-Neuroadapt-Session-Id` is a compatibility header present in the archived backend schema. It does not replace the hosted bearer identity.

## HTTP request body

The archived GET operation declares no request body. Its optional `session_id` is a query parameter, as listed above.

## Responses

| HTTP status | Archived contract |
| - | - |
| 200 | Successful JSON response. The archived schema does not type its properties. |
| 422 | Request validation error; the archived schema references `HTTPValidationError`. |

The archived validation shape has an optional `detail` array. Each validation entry requires `loc` (an array of strings or integers), `msg` (string), and `type` (string); it can also include `ctx` (object) and `input` (any JSON value). Recorded operational refusals can have their own error details.

## WebSocket expansion is a separate contract

Live expansion uses a WebSocket connection at `/api/v1/domains/{domain_id}/planning/adversarial/stream`. The GET response schema above does not define the WebSocket handshake, all message types, or completion/error envelopes.

Recorded initial planning messages include `session_id`, `relation`, `policy`, `root`, `options`, `evaluator_source`, and `expected_model_sha256`. An `expand` message identifies a `state_id` and a `request_id`; the client returns the matching request identity and children with full `state` descriptors. This is a recorded partial shape, not a complete schema generated from the GET operation.

See [streaming expansion](https://docs.reilabs.org/docs/planning/integration.md#streaming-expansion) for the response fragment and the distinction between HTTP `target` edges and streamed `state` children.


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