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

# Adapt-1 quickstart

> Make a first direct Core call, then choose the Adapt-1 gateway that matches the required outcome.

For most integrations, add a bearer token, choose the route that returns the result you need, and send the smallest valid payload. **Omit learning settings unless the workflow has a measured need for specialized behavior.** Adapt-1 resolves the defaults.

Adapt-1 returns structured Core results that application code can validate and use directly. Generated language is optional.

<Info>
  **Default path:** no labeled dataset, demonstrations, solved trajectories, or learner tuning is required before the first operation. A Domain is optional. When one is useful, define only the public task interface the application already exposes.
</Info>

If you already know the desired result, use [Ways to use Adapt-1](/docs/neuroadapt/goals) to choose the shortest workflow.

## Base URL

```text theme={null}
https://rei-neuroadapt-api.reilabs.org
```

The versioned API is served under `/api/v1`. Two compatibility prefixes are also available:

* `/public/rei-ai-bowtie/v4`
* `/rei-ai-bowtie/v4`

## Authentication and session scope

Send your Unit API Key as a bearer token:

```http theme={null}
Authorization: Bearer <secretToken>
```

On hosted UAT, the authentication proxy binds the request to the identity resolved from the token and replaces any body `session_id` with that identity's internal identifier. Use unique `domain_id` values and explicit `run_id` metadata to isolate runs under one token.

```json theme={null}
{
  "session_id": "ignored"
}
```

The public health endpoints (`/health`, `/healthz`, `/readyz`, and `/version`) do not require authentication. `GET /admission` is authenticated operational telemetry.

## Workflow selection

| Desired result                                                                    | Gateway                               | Read this field                                                                                                           |
| --------------------------------------------------------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Task-local structure, hypotheses, predicted observations, or scoped learned state | `/api/v1/domains/*`                   | `items`, `ranked_hypotheses`, `missing_evidence`, `predicted_observations`, or `policy_scores` as documented for the goal |
| Online interval or scalar prediction                                              | `/api/v1/domains/{domain_id}/adapt/*` | `prediction.<output_key>`                                                                                                 |
| Adaptive continuity, retained evidence, and supporting relationships              | `/api/v1/memory/*`                    | `memory_context`, `confidence_score`, and optional `reasoning`                                                            |
| Health and version information                                                    | `/health`, `/healthz`, `/version`     | Status/version response                                                                                                   |

These Adapt-1 gateways return structured Core results. Your application can validate, execute, display, or pass their JSON output to downstream logic directly.

## Adaptive-policy loop

The shortest documented adaptive loop keeps language generation out of the path. Create a domain with the supported `adaptive_interval_policy` template, begin from a declared adaptive state, send ordered observations, and read the current contract-defined prediction.

```text theme={null}
POST /api/v1/domains
POST /api/v1/domains/{domain_id}/adapt/reset
POST /api/v1/domains/{domain_id}/adapt/events
POST /api/v1/domains/{domain_id}/adapt/predict
```

`adapt/events` changes the online policy state and returns the current prediction. `adapt/predict` reads the same result without adding another observation. Consume `prediction.<output_key>` directly in application code.

<Note>
  `adaptive_interval_policy` is one exposed structured-output contract. It does not define the limits of Domains, Core, or Adapt-1. See the [Adaptive policy contract](/docs/neuroadapt/adaptive-domains-structured-predictions) for its supported configuration and response shape.
</Note>

## Continuity loop

A different Core path shows how a later call can reason with a constraint recorded by an earlier call.

<Steps>
  <Step title="Check the service">
    ```bash theme={null}
    curl -fsS https://rei-neuroadapt-api.reilabs.org/healthz
    ```
  </Step>

  <Step title="Record an operating constraint">
    ```bash theme={null}
    curl -fsS -X POST https://rei-neuroadapt-api.reilabs.org/api/v1/memory/store \
      -H "Authorization: Bearer YOUR_SECRET_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "session_id": "ignored",
        "user_message": "Production deployments require two approvals.",
        "ai_message": "Recorded as an operating constraint.",
        "context": { "source": "quickstart" }
      }'
    ```
  </Step>

  <Step title="Query the current state">
    ```bash theme={null}
    curl -fsS -X POST https://rei-neuroadapt-api.reilabs.org/api/v1/memory/query \
      -H "Authorization: Bearer YOUR_SECRET_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "session_id": "ignored",
        "user_message": "What constraint governs production deployments?",
        "top_k": 10,
        "include_reasoning": true
      }'
    ```

    Read `memory_context`, `confidence_score`, and the optional `reasoning` object. For the expanded evidence and connection view, call `POST /api/v1/memory/explain`.
  </Step>
</Steps>

## Input mapping

Adapt-1 does not require one universal input format. The selected API path defines the request format for that call. If your application already produces that format, send the input directly; when the source format differs, add a boundary mapping only for the fields that need translation.

The boundary may name public interface semantics such as coordinates, available actions, action meanings, and native outcome types. It should expose only information available to the application at that point in the workflow, without encoding hidden roles, the preferred procedure, private target coordinates, or the outcome mapping Adapt-1 is expected to form.

* Application input enters through the selected Adapt-1 gateway.
* Optional format mapping belongs at the application boundary; it may translate public semantics but should not solve the task.
* Adapt-1 forms or revises task-relevant structure and returns the route-defined machine-readable result.
* Your application validates, displays, executes, or routes the returned object.

Normal Domain events and the interval-policy routes expose different contracts. Use `/api/v1/domains/{domain_id}/events` and `/query` for domain-shaped evidence and reasoning; use `/adapt/events` and `/adapt/predict` for the documented interval-policy result.

## Transition events

Most workflows do not need custom transition configuration. Use this section only when the application intentionally defines a structured state/action learner view.

For structured transition learning, the Domain and its events define the learner view. They determine how Core can reuse evidence.

1. Store the complete operational record outside the learner view. Include the before state, intervention, and after state.
2. Build the learner view only from observations available before the consequence and the proposed intervention.
3. Keep privileged state, preferred actions, solver output, and application-only judgments out of transition inputs and observation-only targets.
4. Confirm that the transition learner receives each stored event. A successful write does not prove learner admission.
5. Expect abstention when a query has no eligible support or insufficient support.

Use [Design Domains for transition learning](/docs/neuroadapt/design-transition-domains) only when you intentionally need custom input paths, grouping, target shape, or support controls.

## Route reference

| Goal                                           | Exact route                                      |
| ---------------------------------------------- | ------------------------------------------------ |
| Record a domain event                          | `POST /api/v1/domains/{domain_id}/events`        |
| Query domain state                             | `POST /api/v1/domains/{domain_id}/query`         |
| Explain a domain result                        | `POST /api/v1/domains/{domain_id}/explain`       |
| Submit outcome feedback                        | `POST /api/v1/domains/{domain_id}/feedback`      |
| Update the interval policy with an observation | `POST /api/v1/domains/{domain_id}/adapt/events`  |
| Read the current interval prediction           | `POST /api/v1/domains/{domain_id}/adapt/predict` |
| Reset interval-policy state                    | `POST /api/v1/domains/{domain_id}/adapt/reset`   |

Do not substitute `POST /api/v1/domains/{domain_id}/events` for `POST /api/v1/domains/{domain_id}/adapt/events`, `POST /api/v1/domains/{domain_id}/clear` for `POST /api/v1/domains/{domain_id}/adapt/reset`, or `POST /api/v1/domains/{domain_id}/query` for `POST /api/v1/domains/{domain_id}/adapt/predict`. Each route has a different contract.

## Service checks

| Check                                   | UAT endpoint                                               | Authentication |
| --------------------------------------- | ---------------------------------------------------------- | -------------- |
| Basic health                            | `GET https://rei-neuroadapt-api-uat.reilabs.org/health`    | Not required   |
| Liveness                                | `GET https://rei-neuroadapt-api-uat.reilabs.org/healthz`   | Not required   |
| Readiness and derived-state warmup      | `GET https://rei-neuroadapt-api-uat.reilabs.org/readyz`    | Not required   |
| Deployed version and schema information | `GET https://rei-neuroadapt-api-uat.reilabs.org/version`   | Not required   |
| Request-admission telemetry             | `GET https://rei-neuroadapt-api-uat.reilabs.org/admission` | Required       |

The readiness response is not interchangeable with liveness: use `readyz` when a caller needs to know whether derived state has warmed up. Treat `admission` as authenticated operational telemetry and honor `Retry-After` when it reports capacity pressure.\n\n## Production identity boundary

The production app maps the bearer token to the effective Neuroadapt identity. A body `session_id` is useful for request compatibility and client-side correlation, but it cannot access another API key's state. When returned, treat `session_identity.effective_session_id` as authoritative.

Domain definitions, evidence, decisions, policy state, transition state, structural state, and adaptive state are owner-scoped. Use a separate API key or agent identity when state must be independently isolated.

For endpoint-level guidance, see [Continuity across calls](/docs/neuroadapt/build-an-assistant-with-persistent-context), [Domain-aware behavior](/docs/neuroadapt/build-a-domain-aware-assistant), and [Spatial Vision](/docs/neuroadapt/spatial-vision).
