Skip to main content
Adapt-1 proposes numeric controls and updates its retained state from the execution you report. Keep the same learner across attempts so later proposals can use that experience. This guide continues the two-actuator contract and standard-library Python helper in Schemas and configuration. Your application supplies the planar environment and execution hooks.

Configure the acquisition stage

Create and configure the Domain once for a fresh run. Reuse its ID across compatible attempts.

Request one sequence

POST to https://rei-neuroadapt-api.reilabs.org/api/v1/domains/{domain_id}/trajectory/propose: Choose one request form. Each exploratory request opens a decision that must be observed or cancelled before issuing another in this example’s single-pending configuration.
These numeric inputs illustrate the four-state/two-goal schema. In the runner, replace them with the actual reset observation and requested goal. Read decision_id and actions from the response. actions is a nonempty matrix with one row per proposed command and action_dimensions columns. Record execution separately after applying the proposed controls.

What carries into the next attempt

Acquisition can use earlier executions as the basis for a new proposal. A revision may preserve useful early commands and change a continuation or specific control coordinates. Save the complete proposal and any returned parent or edit diagnostics with the resulting execution. Save the proposal separately from the applied controls and measured states. Execution may stop early or apply bounds, so the next update must use the actual trace.

Implement the application adapter

Implement these functions in your application: For this example, normalize each actuator command to [-1, 1]. Keep the physical mapping and 0.5-second hold duration fixed. Pad a proposal shorter than eight commands with neutral [0.0, 0.0] commands before execution. These are real applied commands and belong in the returned trace. Preserve the original proposal separately. Store physical commands alongside the native numeric coordinates so the actual applied operation is reconstructable.

Align the observation arrays

For T commands actually executed: Validate the T/T+1 alignment in the runner before sending. For an early physical stop, return only the executed prefix. If no command executed, preserve the pending decision for reconciliation or supported cancellation. Keep invalid measurements separate from a valid physical attempt with a poor outcome.

Connect the loop

Use the adapter hooks above with the request helper from the configuration guide. The loop validates the executed prefix before admitting its outcome.
Send this observation body to POST /domains/{domain_id}/trajectory/observe, relative to the production base. Report neutral padding only when it actually executed. A safety stop takes precedence over completing the eight-slot window. Validate outcome range and direction in measure_outcome. json.dumps(..., allow_nan=False) in the shared transport rejects non-finite values before dispatch. When safety logic changes an action, record the change and its reason alongside the proposal and actual execution.

Revisit an acquired context

The optional context workflow asks the learner for a retained acquisition reference:
Send it to POST /domains/{domain_id}/trajectory/context. Read response.request; when non-null, use request.record_id to restore the associated environment context and supply that same ID as acquisition_reference in the next proposal. Maintain a mapping from returned native record IDs to local reset specifications. Use ordinary reset sampling when that mapping is unavailable.

Continue the same world between windows

For a short-window controller, replace the reset in acquire_once with a measurement of the continuing environment. After reporting the executed block, wait for its acknowledgement before requesting the next proposal from a new observation. Preserve the application episode identity until the real reset boundary. The same T action rows and T + 1 state rows rule applies to each block. The execution-window pattern explains observation timing and terminal prefixes.

Continue

Stop acquisition at the application-owned budget boundary, reconcile pending work, and export a stable retained source for selection, deletion, and ordering. To use the acquired state directly, see Retained use and recovery.