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

# Machina

> Use Adapt-1 to learn continuous-control sequences from measured execution outcomes.

Machina extends Adapt-1 Preview with **continuous-control sequence learning**. Adapt-1 proposes numeric commands through your permitted control interface and uses measured outcomes to revise sequences across attempts. The resulting executions remain available for later use.

Your application measures observations and executes the commands through its actuator mapping. Machina uses Adapt-1’s contextual and temporal learning in this trajectory and procedural-control workflow.

<CardGroup cols={2}>
  <Card title="Configure your first control task" icon="terminal" href="/docs/machina/configuration">
    Define numeric inputs and controls, then create a trajectory Domain.
  </Card>

  <Card title="Choose an execution pattern" icon="route" href="/docs/machina/execution-patterns">
    Choose command timing, observation boundaries, and how acquired routines fit together.
  </Card>
</CardGroup>

<span id="where-this-could-fit" />

## Control applications

Use Machina to acquire and refine control behavior for robots, machines, and interactive environments. Your integration supplies the controls, observations, and measured outcomes.

| Application                     | Role for Machina                                                            | Your integration supplies                                             |
| ------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| Repeatable equipment operations | Acquire and adjust a numeric routine for a measured task                    | Actuator commands, observations, timing, and a completion measure     |
| Robot task development          | Learn coordinated commands and corrections for changed starting conditions  | Sensing, a fixed actuation interface, and measured execution          |
| Interactive simulation          | Learn control behavior through repeated attempts or short execution windows | An instrumented environment, permitted controls, and outcome feedback |

Define a measurable task and evaluate retained behavior in the environment where your application will use it.

The [use cases](/docs/neuroadapt/goals) page also covers Adapt-1 workflows that use predictions, policy choices, or retained evidence.

## What your application sends and receives

| You provide                                     | Adapt-1 returns                                 | You report after execution                                           |
| ----------------------------------------------- | ----------------------------------------------- | -------------------------------------------------------------------- |
| Current state and goal                          | An ordered matrix of numeric controls           | Actual applied controls, measured states, and an outcome             |
| Acquired executions and comparison contexts     | Candidates for selection or structural revision | Each candidate's measured objectives on each context                 |
| Current context and a retained refinement state | Offsets for the acquired base sequence          | Comparison outcomes during learning; local results during frozen use |

A command is one row of control values applied together. The horizon limits the number of rows in a sequence, and control width specifies the values in each row. For example, eight two-coordinate commands contain sixteen scalar outputs. Your executor sets the duration of each command.

## Learn through execution

<Steps>
  <Step title="Acquire a sequence">
    Request controls, execute them, and return what actually happened. Later attempts can revise retained executions, including a useful prefix followed by a different continuation. Start with [sequence acquisition](/docs/machina/acquisition).
  </Step>

  <Step title="Test structural changes">
    Compare acquired executions on repeatable contexts. Test removing spans or changing the order of control changes, then carry the selected execution forward. Use [selection, reduction, and ordering](/docs/machina/structural-stages).
  </Step>

  <Step title="Refine for the current context">
    Preserve the acquired base and learn bounded corrections from pre-action observations. Use [contextual refinement](/docs/machina/refinement), including optional context normalization and precision settings when corrections vary across operating conditions.
  </Step>

  <Step title="Reuse or continue learning">
    Execute retained behavior with learning stopped, or resume compatible practice. Keep the same Domain identity, base, and executor contract. See [retained use and recovery](/docs/machina/retained-use).
  </Step>
</Steps>

Your application invokes the stages through the API as the task requires. A structural stage may retain its input unchanged. Evaluate refinement against the acquired base.

## Define the executor contract

| Your application supplies                                       | Adapt-1 learns through interaction                             |
| --------------------------------------------------------------- | -------------------------------------------------------------- |
| Observable state, goal, permitted controls, and outcome meaning | Useful control values and their coordination across a sequence |
| Input measurement, fixed controllers, and actuator mapping      | Revisions supported by measured execution outcomes             |
| Command timing, bounds, termination, and any task decomposition | Context-dependent corrections and retained task behavior       |

The executor maps each command to the declared operation. Adapt-1 acquires which commands to issue and how to coordinate them. The [execution patterns](/docs/machina/execution-patterns) explain target values, rates, timing, and context-dependent corrections.

[Mechanisms](/docs/neuroadapt/architecture) places acquired procedures and contextual corrections alongside Core's other forms of learning.

## Choose when observations can change the controls

| Pattern                 | When a new observation enters                            |
| ----------------------- | -------------------------------------------------------- |
| Whole-attempt sequence  | Before the attempt; learning can update the next attempt |
| Short execution windows | Between command blocks while the environment continues   |
| Contextual execution    | Before applying corrections to a retained base           |
| Composed routines       | At each handoff, with environment state carried forward  |

During a committed sequence, low-level controllers apply the commands already proposed by Adapt-1. A new Adapt-1 proposal requires another request at an observation boundary. See [execution windows](/docs/machina/execution-patterns#short-execution-windows) for the integration loop.

<Info>
  A frozen contextual policy computes corrections for the current observation using unchanged learned state. Executing the base directly repeats the acquired sequence. See [retained use](/docs/machina/retained-use) for evaluation and reconnect checks.
</Info>

## Connect the right API

The numeric workflow uses `POST /domains/{domain_id}/trajectory/{operation}` under the Adapt-1 production API. Its configuration and observation bodies are specific to the selected mechanism.

| Goal                                      | Mechanism                              | Guide                                                         |
| ----------------------------------------- | -------------------------------------- | ------------------------------------------------------------- |
| Acquire numeric sequences                 | `episode_credit`                       | [Acquire a sequence](/docs/machina/acquisition)               |
| Select or restructure acquired executions | `confirmed_execution`                  | [Select, reduce, and order](/docs/machina/structural-stages)  |
| Learn context-dependent offsets           | `contextual_execution`                 | [Refine by context](/docs/machina/refinement)                 |
| Choose named discrete actions             | Sequential Discovery's Domain contract | [Sequential Discovery](/docs/neuroadapt/discovery-sequential) |

Start with [Schemas and configuration](/docs/machina/configuration) for authentication, request bodies, and the shared Python helper. The guides use a compact numeric example for the API shapes. Your application supplies the environment hooks.
