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

# Native graph planning API

> Submit a root state and a finite graph of legal action transitions to native planning, with explicit evaluator selection, identity guards, and work limits.

Submit a finite state graph to Adapt-1 native planning. `GraphPlanningRequest` requires `session_id`, `relation`, `policy`, and `root`. Each node has an ID and maximizing/minimizing perspective; each edge supplies an action and target node ID. See [planning integration](https://docs.reilabs.org/docs/planning/integration.md) for graph construction and [planning options](https://docs.reilabs.org/docs/planning/options.md) for limits and evaluator selection.

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

## JSON body contract

Content type: `application/json`. The HTTP request body is required. The following table describes its fields; linked schema names lead to the complete nested definitions on this page. When an array type also permits `null`, that alternative applies to the entire field, not to individual array items.

## Request body

Schema: `GraphPlanningRequest`.

Fields outside this object's declared properties are rejected by the schema.

| Field | Required | Type | Declared default | Constraints |
| - | - | - | - | - |
| `checkpoint` | No | object or `null` | Not declared | Additional properties allowed |
| `evaluator_source` | No | `string` | `domain_model` | Values: `domain_model`, `value_model`, `value_candidate` |
| `expected_model_sha256` | No | `string` or `null` | Not declared | 64 characters exactly |
| `nodes` | No | array of [GraphNode](#graphnode) | Not declared | At most 4096 items |
| `options` | No | [PlanningOptions](#planningoptions) | Not declared | No further constraint declared |
| `policy` | Yes | `string` | Not declared | 1 to 256 characters |
| `relation` | Yes | `string` | Not declared | 1 to 256 characters |
| `root` | Yes | [PlanningState](#planningstate) | Not declared | No further constraint declared |
| `session_id` | Yes | `string` | Not declared | At least 1 character |

## GraphNode

Schema: `GraphNode`.

Fields outside this object's declared properties are rejected by the schema.

| Field | Required | Type | Declared default | Constraints |
| - | - | - | - | - |
| `cache_key` | No | `string` or `null` | Not declared | At most 1024 characters |
| `children` | No | array of [GraphEdge](#graphedge) | Not declared | At most 256 items |
| `conditions` | No | map of `number` values | Not declared | No further constraint declared |
| `context` | No | object | Not declared | Additional properties allowed |
| `counterpart` | No | [PlanningObservation](#planningobservation) or `null` | Not declared | No further constraint declared |
| `id` | Yes | `string` | Not declared | 1 to 512 characters |
| `include_moments` | No | `boolean` | `false` | No further constraint declared |
| `include_positions` | No | `boolean` | `true` | No further constraint declared |
| `maximizing` | Yes | `boolean` | Not declared | No further constraint declared |
| `objects` | No | array of object or `null` | Not declared | At most 512 items |
| `policy_features` | No | object | Not declared | Additional properties allowed |
| `relations` | No | array of object | Not declared | At most 4096 items |
| `terminal_value` | No | `number` or `null` | Not declared | No further constraint declared |

## PlanningOptions

Schema: `PlanningOptions`.

Fields outside this object's declared properties are rejected by the schema.

| Field | Required | Type | Declared default | Constraints |
| - | - | - | - | - |
| `branch_width` | No | `integer` or `null` | Not declared | Minimum `1`; Maximum `256` |
| `cache_values` | No | `boolean` | `false` | No further constraint declared |
| `complementary_total` | No | `number` or `null` | Not declared | No further constraint declared |
| `exploration_probability` | No | `number` | `0` | Minimum `0`; Maximum `1` |
| `exploration_seed` | No | `integer` or `null` | Not declared | Minimum `0`; Maximum `9223372036854776000` |
| `extension_mode` | No | `string` | `all` | Values: `all`, `competitive`, `equilibrium` |
| `max_depth` | No | `integer` | `3` | Minimum `1`; Maximum `16` |
| `max_evaluations` | No | `integer` | `4096` | Minimum `1`; Maximum `100000` |
| `max_extensions` | No | `integer` | `0` | Minimum `0`; Maximum `8` |
| `max_transitions` | No | `integer` | `200000` | Minimum `1`; Maximum `1000000` |
| `neutral_value` | No | `number` | `0.5` | No further constraint declared |
| `recheck_pruned_branches` | No | `boolean` | `false` | No further constraint declared |
| `reuse_tree` | No | `boolean` | `false` | No further constraint declared |
| `stability_tolerance` | No | `number` | `0` | Minimum `0` |
| `temporal_discount` | No | `number` | `1` | Greater than `0`; Maximum `1` |
| `terminal_proof_bounds` | No | two-number array or `null` | Not declared | 2 items exactly |
| `timeout_seconds` | No | `number` | `30` | Minimum `1`; Maximum `300` |

## PlanningState

Schema: `PlanningState`.

Fields outside this object's declared properties are rejected by the schema.

| Field | Required | Type | Declared default | Constraints |
| - | - | - | - | - |
| `cache_key` | No | `string` or `null` | Not declared | At most 1024 characters |
| `conditions` | No | map of `number` values | Not declared | No further constraint declared |
| `context` | No | object | Not declared | Additional properties allowed |
| `counterpart` | No | [PlanningObservation](#planningobservation) or `null` | Not declared | No further constraint declared |
| `id` | Yes | `string` | Not declared | 1 to 512 characters |
| `include_moments` | No | `boolean` | `false` | No further constraint declared |
| `include_positions` | No | `boolean` | `true` | No further constraint declared |
| `maximizing` | Yes | `boolean` | Not declared | No further constraint declared |
| `objects` | No | array of object or `null` | Not declared | At most 512 items |
| `policy_features` | No | object | Not declared | Additional properties allowed |
| `relations` | No | array of object | Not declared | At most 4096 items |
| `terminal_value` | No | `number` or `null` | Not declared | No further constraint declared |

## GraphEdge

Schema: `GraphEdge`.

Fields outside this object's declared properties are rejected by the schema.

| Field | Required | Type | Declared default | Constraints |
| - | - | - | - | - |
| `action` | Yes | `string` | Not declared | 1 to 256 characters |
| `target` | Yes | `string` | Not declared | 1 to 512 characters |

## PlanningObservation

Schema: `PlanningObservation`.

Fields outside this object's declared properties are rejected by the schema.

| Field | Required | Type | Declared default | Constraints |
| - | - | - | - | - |
| `conditions` | No | map of `number` values | Not declared | No further constraint declared |
| `context` | No | object | Not declared | Additional properties allowed |
| `include_moments` | No | `boolean` | `false` | No further constraint declared |
| `include_positions` | No | `boolean` | `true` | No further constraint declared |
| `objects` | No | array of object or `null` | Not declared | At most 512 items |
| `policy_features` | No | object | Not declared | Additional properties allowed |
| `relations` | No | array of object | Not declared | At most 4096 items |

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

HTTP graph edges refer to successor node IDs through `target`. Streaming expansion returns child state descriptors instead. Keep evaluator selection and terminal values consistent with the intended perspective; [planning integration](https://docs.reilabs.org/docs/planning/integration.md) and [planning options](https://docs.reilabs.org/docs/planning/options.md) explain the observed behavior and remaining semantic limits.


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