Config reference
Every YAML field accepted by `reflex connect --config <file>`.
A connect config is a YAML file with three required sections and a handful of session-level knobs. Minimum viable config:
mode: dry_run
target:
kind: webrtc
base_model: molmoact2-bimanualyam
hardware:
kind: yam_bimanual
config:
left: { channel: can1, gripper: linear_4310 }
right: { channel: can0, gripper: linear_4310 }Run with:
reflex connect --config robot.yamlSession-level fields
| Field | Type | Default | Notes |
|---|---|---|---|
mode | "dry_run" or "apply_actions" | "dry_run" | dry_run runs the loop but does not write actions to the robot. Use it to validate the pipeline before powering motors. |
max_steps | int | 0 | 0 means run until interrupted. |
control_period_s | float | 0.0 | Minimum seconds per loop iteration. 0.2 ≈ 5 Hz wall-clock cap on the runner. |
stop_on_error | bool | true | When false, transient inference / apply errors trigger connector.safe_stop but the loop continues. |
pipeline_inference | bool | true | When true (default), the next inference runs in a background thread while the current chunk is being applied — roughly doubles the effective control rate when apply ≈ infer. Set false for strictly serial loops while debugging. |
heartbeat_interval_s | float | 10.0 | Seconds between heartbeat callbacks. |
target — inference transport
The transport that takes observations and returns action chunks.
target.kind: webrtc
DataChannel to a hosted GPU worker. The recommended default for production.
| Field | Type | Default | Notes |
|---|---|---|---|
url | string | — | Worker URL. Mutually exclusive with base_model — set one or the other. |
base_model | string | — | Platform-routed model identifier (e.g. molmoact2-bimanualyam). The platform assigns a worker and issues a scoped session credential; you're connected to a low-latency region. |
timeout_s | float | 60.0 | Per-call inference timeout. |
connect_timeout_s | float | 60.0 | Total budget for signaling + ICE/DTLS handshake. Bump to ~180 if the worker is prone to cold starts. |
img_size | int | 256 | Square resize applied to each camera frame before send. Smaller is faster on the wire but the worker upsamples server-side, so picking the worker's preferred size avoids the round-trip. |
camera_field_map | mapping | {top, left, right} | Local channel name → wire key. Override when the model expects different camera names. |
state_field | string | "state" | Wire key for the proprio state vector. |
instruction_field | string | "prompt" | Wire key for the language instruction. |
extra_payload | mapping | {} | Merged into every observation. Useful for model-specific knobs (num_steps, etc.). |
streaming | bool | false | Use the sustained-DataChannel streaming client instead of the per-call client. Experimental. |
target.kind: edge
Plain HTTPS POST to a local or remote endpoint. Useful for local dev / Thor edge boxes.
| Field | Type | Default | Notes |
|---|---|---|---|
url | string | — | http://localhost:8080/infer style. |
timeout_s | float | 30.0 |
target.kind: platform
Authenticated WebSocket flow. Older protocol, kept for compatibility; new
robots should use webrtc.
hardware — robot connector
hardware:
kind: <connector_kind>
config:
# connector-specific kwargshardware.kind: yam_bimanual
i2rt YAM bimanual arms over SocketCAN. Requires i2rt installed in the same venv.
| Field | Type | Default | Notes |
|---|---|---|---|
left.channel / right.channel | string | required | SocketCAN interface name (can0, can1). |
left.gripper / right.gripper | string | — | Gripper model (linear_4310 is typical). |
hz | int | 30 | Control-loop rate on the motor chain. |
zero_gravity_mode | bool | false | If true, motors stay in gravity-comp; actions aren't applied. |
instruction | string | "" | Default language prompt — overridable per-call from the model side. |
home_duration_s | float | 4.0 | Time over which the arms move to the home pose at startup. |
home_pose | list[float] | per-arm zeros + gripper at 1.0 rad | 7-DOF target pose (matches gello_software start_joints). |
chunk_boundary_max_delta | float | 0.02 | Max per-joint delta allowed between consecutive chunks. Larger jumps are clipped. |
chunk_apply_horizon | int | 0 | Number of steps to apply from each chunk. 0 = entire chunk. |
action_step_delay_s | float | 1/hz | Wall delay between motor commands. |
hardware.kind: subprocess
Anything else — shell-based connector. The runner spawns scripts and pipes JSON to/from them:
| Field | Type | Default | Notes |
|---|---|---|---|
observe_command | string | required | Command that prints one observation JSON per line. |
action_command | string | required | Command that reads one action chunk JSON per line on stdin. |
safe_stop_command | string | — | Optional emergency-stop command. |
command_timeout_s | float | 2.0 | Per-call wallclock budget. |
safe_stop_timeout_s | float | 5.0 |
cameras — observation sources
Optional. Each key is a logical channel name, the value is {kind, ...}.
Logical channel names flow into target.camera_field_map to map onto the
model's expected camera keys.
cameras:
top: { kind: shm, name: top }
left: { kind: shm, name: left }
right: { kind: shm, name: right }cameras.<name>.kind: v4l2 (alias webcam)
| Field | Type | Default | Notes |
|---|---|---|---|
device | string or int | 0 | /dev/video0, 0, etc. |
width / height | int | camera default | |
fps | int | camera default |
cameras.<name>.kind: realsense
| Field | Type | Default | Notes |
|---|---|---|---|
serial | string | first device | Optional RealSense serial number for multi-camera rigs. |
width / height | int | 640 / 480 | |
fps | int | 30 | |
stream | string | "color" | "color" or "depth". |
cameras.<name>.kind: shm
Pre-broadcast frames from a shared-memory segment. Multi-consumer safe.
| Field | Type | Default | Notes |
|---|---|---|---|
name | string | required | Maps to /dev/shm/reflex_cam_<name>. |
wait_s | float | 5.0 | Seconds to wait at startup for the broadcaster to attach. |
The broadcaster (publisher) is not part of the SDK — author your own that grabs from RealSense / V4L2 / Camera SDK and writes raw HWC uint8 frames into the SHM segment.
Reference configs
Production configs that ship in the repo:
| File | Notes |
|---|---|
examples/yam_bimanual_molmoact2.yaml | YAM bimanual + MolmoAct2, no specific worker preset. |
examples/yam_bimanual_molmoact2_BASELINE.yaml | SHM cameras + the BASELINE MolmoAct2 worker. |
examples/yam_bimanual_molmoact2_LOSSLESS.yaml | Lossless image variant. |
examples/yam_bimanual_molmoact2_MODAL.yaml | Multi-region failover. |
Pull one directly:
curl -O https://raw.githubusercontent.com/reflex-inc/reflex/main/examples/yam_bimanual_molmoact2_BASELINE.yaml
reflex connect --config yam_bimanual_molmoact2_BASELINE.yaml