Quickstart
Install, log in, drop a YAML config, run `reflex connect`.
End-to-end demo on a YAM bimanual rig and MolmoAct2-BimanualYAM. Same shape works for other YAML configs.
1. Install
pip install 'reflex-sdk[webrtc]'The [webrtc] extra adds aiortc, av, msgpack, numpy, Pillow — the
deps needed for the WebRTC inference transport. Plain pip install reflex-sdk
gets you the CLI but no target.kind: webrtc support.
On a fresh laptop:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv ~/reflex --python 3.11
source ~/reflex/bin/activate
uv pip install 'reflex-sdk[webrtc]'For a YAM bimanual arm you also need the i2rt driver:
git clone https://github.com/i2rt-robotics/i2rt.git ~/i2rt
cd ~/i2rt && uv pip install -e .
sudo ip link set can0 up type can bitrate 1000000
sudo ip link set can1 up type can bitrate 1000000See Installation for non-YAM hardware and macOS / Linux specifics.
2. Log in
reflex loginThis opens a browser to app.tryreflex.ai/cli/authorize?requestId=... — approve
the request and the CLI writes ~/.config/reflex/credentials.json with your
API key. On a headless / SSH machine the link is Cmd+Clickable; copy it into your
local browser if your terminal doesn't render OSC 8 hyperlinks.
reflex whoami
# Logged in to Reflex
#
# Organization: Acme Robotics
# Organization ID: org_...
# API key: laptop
# Dashboard: https://app.tryreflex.ai3. Drop a YAML config
robot.yaml — bimanual YAM with three SHM-broadcast cameras pointed at
the hosted MolmoAct2 worker:
mode: apply_actions
max_steps: 0
control_period_s: 0.2
stop_on_error: true
pipeline_inference: false
target:
kind: webrtc
base_model: molmoact2-bimanualyam
connect_timeout_s: 180 # allow for cold start
state_field: "state"
instruction_field: "prompt"
img_size: 256
hardware:
kind: yam_bimanual
config:
left: { channel: can1, gripper: linear_4310 }
right: { channel: can0, gripper: linear_4310 }
hz: 25
instruction: "pack the container and close the box"
home_duration_s: 4.0
cameras:
top: { kind: shm, name: top }
left: { kind: shm, name: left }
right: { kind: shm, name: right }Full field reference: Config reference.
base_model: molmoact2-bimanualyam lets the platform route you to a ready
worker and issue a scoped session credential automatically. To pin a specific
endpoint instead — useful for staging or self-hosted workers — set url:
directly.
4. Run
reflex connect --config robot.yamlWhat you'll see:
[reflex] starting session: mode=apply_actions cameras=[top, left, right]
[webrtc-client] worker waking — holding for ready signal...
[webrtc-client] datachannel open
[webrtc-client] connected session=sess_...
[reflex] hardware ready: connector=YamBimanualConnector ...
[reflex] step 0 │ apply ok
[reflex] step 1 │ apply ok
...The first connect on a cold worker can take up to a couple of minutes while the model loads; reconnecting shortly after a session is fast — you're routed back to a warm worker.
Ctrl-C any time. Arms home automatically; a second Ctrl-C escalates to a force-exit.
For driver-level logs (i2rt motor power-on, aioice ICE candidates, per-step
state/action vectors), add --verbose / -v.
What just happened
reflex connectparsed your yaml.- The SDK authorized a session and was routed to a ready worker (reusing a warm one if you'd recently connected).
- The WebRTC transport waited for the worker to report ready, then opened a DataChannel.
- After inference was confirmed reachable, the YAM connector powered the motors, started gravity-comp control loops, and calibrated the grippers.
- The cameras attached to their
/dev/shmsegments. - The runner loop: read observation (state + 3 camera frames) → send over
DataChannel → receive
(30, 14)action chunk → apply the first N steps to the arms at 25 Hz → repeat.