> ## 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.

Use the HTTP GET route to inspect the Adapt-1 planning stream protocol, and connect through WebSocket at the same path for live expansion. The GET response schema is untyped. See [streaming expansion](https://docs.reilabs.org/docs/planning/integration.md#streaming-expansion) for observed message shapes and confirm the complete WebSocket contract for your deployment.

The request tables below describe schema version 5. A default marked "Not declared" is absent from that schema; it does not mean `null`. Check `/version` at the API host root and confirm compatibility with your deployment.

## 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 in schema version 5. It does not replace the hosted bearer identity.

## HTTP request body

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

## Responses

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

The validation error 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). Operational refusals can have their own error details.

## WebSocket expansion is a separate contract

For live expansion, connect through WebSocket at `/api/v1/domains/{domain_id}/planning/adversarial/stream`. Confirm the handshake, message types, and completion/error envelopes against your deployment's WebSocket contract.

Observed 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. Use the deployment's complete contract for the full message envelope.

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.