Reflex Docs
Guides

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

Session-level fields

FieldTypeDefaultNotes
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_stepsint00 means run until interrupted.
control_period_sfloat0.0Minimum seconds per loop iteration. 0.2 ≈ 5 Hz wall-clock cap on the runner.
stop_on_errorbooltrueWhen false, transient inference / apply errors trigger connector.safe_stop but the loop continues.
pipeline_inferencebooltrueWhen 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_sfloat10.0Seconds 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.

FieldTypeDefaultNotes
urlstringWorker URL. Mutually exclusive with base_model — set one or the other.
base_modelstringPlatform-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_sfloat60.0Per-call inference timeout.
connect_timeout_sfloat60.0Total budget for signaling + ICE/DTLS handshake. Bump to ~180 if the worker is prone to cold starts.
img_sizeint256Square 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_mapmapping{top, left, right}Local channel name → wire key. Override when the model expects different camera names.
state_fieldstring"state"Wire key for the proprio state vector.
instruction_fieldstring"prompt"Wire key for the language instruction.
extra_payloadmapping{}Merged into every observation. Useful for model-specific knobs (num_steps, etc.).
streamingboolfalseUse 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.

FieldTypeDefaultNotes
urlstringhttp://localhost:8080/infer style.
timeout_sfloat30.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 kwargs

hardware.kind: yam_bimanual

i2rt YAM bimanual arms over SocketCAN. Requires i2rt installed in the same venv.

FieldTypeDefaultNotes
left.channel / right.channelstringrequiredSocketCAN interface name (can0, can1).
left.gripper / right.gripperstringGripper model (linear_4310 is typical).
hzint30Control-loop rate on the motor chain.
zero_gravity_modeboolfalseIf true, motors stay in gravity-comp; actions aren't applied.
instructionstring""Default language prompt — overridable per-call from the model side.
home_duration_sfloat4.0Time over which the arms move to the home pose at startup.
home_poselist[float]per-arm zeros + gripper at 1.0 rad7-DOF target pose (matches gello_software start_joints).
chunk_boundary_max_deltafloat0.02Max per-joint delta allowed between consecutive chunks. Larger jumps are clipped.
chunk_apply_horizonint0Number of steps to apply from each chunk. 0 = entire chunk.
action_step_delay_sfloat1/hzWall delay between motor commands.

hardware.kind: subprocess

Anything else — shell-based connector. The runner spawns scripts and pipes JSON to/from them:

FieldTypeDefaultNotes
observe_commandstringrequiredCommand that prints one observation JSON per line.
action_commandstringrequiredCommand that reads one action chunk JSON per line on stdin.
safe_stop_commandstringOptional emergency-stop command.
command_timeout_sfloat2.0Per-call wallclock budget.
safe_stop_timeout_sfloat5.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)

FieldTypeDefaultNotes
devicestring or int0/dev/video0, 0, etc.
width / heightintcamera default
fpsintcamera default

cameras.<name>.kind: realsense

FieldTypeDefaultNotes
serialstringfirst deviceOptional RealSense serial number for multi-camera rigs.
width / heightint640 / 480
fpsint30
streamstring"color""color" or "depth".

cameras.<name>.kind: shm

Pre-broadcast frames from a shared-memory segment. Multi-consumer safe.

FieldTypeDefaultNotes
namestringrequiredMaps to /dev/shm/reflex_cam_<name>.
wait_sfloat5.0Seconds 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:

FileNotes
examples/yam_bimanual_molmoact2.yamlYAM bimanual + MolmoAct2, no specific worker preset.
examples/yam_bimanual_molmoact2_BASELINE.yamlSHM cameras + the BASELINE MolmoAct2 worker.
examples/yam_bimanual_molmoact2_LOSSLESS.yamlLossless image variant.
examples/yam_bimanual_molmoact2_MODAL.yamlMulti-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