Skip to content

Cloud Inference

Run your policy on Adamo’s hosted GPUs to drive your robot remotely. The robot streams its cameras and state, and receives actions on its control channels.

robot.inference(policy: str, *, regions: list[str] = [], **arguments) -> Inference

robot.inference runs a policy on Adamo’s GPUs and drives your robot with it. policy is a path you saved weights or a state at, or the name of a model Adamo serves:

with robot.inference("my-fine-tuned-policy/final", task="stack four cubes") as run:
run.wait()

Saved weights know which tracks and topics to read and where to publish, so they need only a task. A served model without its own mapping also takes images, state, action and frame_rate:

robot.inference(
"physical-intelligence/pi0.5-libero", task="pick up the black bowl and place it on the plate",
images=["cam"], state=["proprioception/joints"], action=["control/openpi.action"], frame_rate=20,
)
ModelArgumentsDescription
physical-intelligence/pi0.5task, images, state, action, frame_ratepi0.5 (Physical Intelligence) base model.
physical-intelligence/pi0.5-liberotask, images, state, action, frame_ratepi0.5 (Physical Intelligence) fine-tuned on LIBERO.
physical-intelligence/pi0.5-droidtask, images, state, action, frame_ratepi0.5 (Physical Intelligence) fine-tuned on DROID for the Franka. It reads an exterior and a wrist camera and a state of 7 joint positions and the gripper position, and its actions are 7 joint velocities and a gripper position, at 15 Hz.
abc/dit-bottlestaskABC-DiT for the bimanual YAM trained on the ABC sim.
robocurve/pi0.5-yamtask, images, state, action, frame_ratepi0.5 fine-tuned by robocurve for bimanual YAM.
allenai/MolmoAct2-BimanualYAMtask, images, state, action, frame_rateMolmoAct2 (AllenAI) fine-tuned for bimanual YAM.
allenai/MolmoAct2-DROIDtask, images, state, action, frame_rateMolmoAct2 (AllenAI) fine-tuned for the DROID Franka.
allenai/MolmoAct2-SO100_101task, images, state, action, frame_rateMolmoAct2 (AllenAI) fine-tuned for SO-100/101.
vernerobotics/v0.5-liberotask, images, state, action, frame_rateVerne V0.5 (Verne Robotics) fine-tuned on the LIBERO simulator. It reads the wrist and agent-view cameras, upright, and a state of the hand pose the controller is driving to (position, then axis-angle rotation) and the gripper, 1 open and 0 closed. Its actions are the hand pose to reach next and the gripper, in the same layout, at 20 Hz. Turn each target into LIBERO’s end-effector delta from the measured hand pose, as Verne’s LIBERO example does.
vernerobotics/v0.5-robotwintask, images, state, action, frame_rateVerne V0.5 (Verne Robotics) fine-tuned on the RoboTwin 2.0 simulator’s aloha-agilex robot. It reads the left wrist, right wrist and head cameras and a state of each arm’s 6 joints and gripper, left then right, then the left and right end-effector poses as RoboTwin gives them (position, then quaternion w first). Its actions are each arm’s 6 joints and gripper, at 50/3 Hz (frame_rate=50 / 3).
black-forest-labs/flux-3-action-droidtask, images, state, action, frame_rateFLUX 3 Action (Black Forest Labs), a world action model fine-tuned on DROID for the Franka. It reads the wrist, left exterior and right exterior cameras, in that order, and a state of 7 joint positions and the gripper closed fraction, and its actions are 7 joint positions and the gripper closed fraction, at 15 Hz. It does not use real-time chunking. FLUX Kommunity License.
black-forest-labs/flux-3-action-so101task, images, state, action, frame_rateFLUX 3 Action (Black Forest Labs) fine-tuned for SO-101, a base to adapt to a task rather than a zero-shot policy. It reads a scene and a wrist camera, in that order, and a state of 5 joint positions in degrees and the gripper in percent, as LeRobot reads a calibrated SO-101, and its actions are the same 6 values. Run it at frame_rate=30: it conditions on the last 8 ticks and the actions it sent. It does not use real-time chunking. FLUX Kommunity License.
openwam/OpenWAM-Alpha-LIBEROtask, images, state, action, frame_rateOpenWAM-α fine-tuned on LIBERO. It reads the agent view and wrist cameras, turned upright as in openpi’s LIBERO example, and the same state and actions as physical-intelligence/pi0.5-libero: the end-effector position and axis-angle and the two finger positions, then end-effector deltas and a gripper command, at 20 Hz.
openwam/OpenWAM-Alpha-RoboTwintask, images, state, action, frame_rateOpenWAM-α fine-tuned on the RoboTwin 2.0 simulator’s aloha-agilex robot. It reads the head, left wrist and right wrist cameras, in that order, and the same state as vernerobotics/v0.5-robotwin. Its actions are each arm’s end-effector pose and gripper, left then right, as RoboTwin’s take_action(action, action_type="ee") takes them.
runwayml/praxis-1-droidtask, images, state, action, frame_ratePraxis-1 (Runway), a world action model fine-tuned on DROID for the Franka. It reads an exterior and a wrist camera, in that order, cropped to 16:9, and a state of the flange pose in the robot base frame (position in metres, then quaternion w first) and the gripper closed fraction. Its actions are the commanded flange pose and gripper in the same 8 values, at 15 Hz. Apache 2.0.
runwayml/praxis-1-yamtask, images, state, action, frame_ratePraxis-1 (Runway) fine-tuned for bimanual YAM. It reads a top, a left wrist and a right wrist camera, in that order, cropped to 16:10, and a state of each arm’s tool pose in the rig frame (position in metres, then quaternion w first) and gripper (0 open), left then right. Its actions are the commanded poses and grippers in the same 16 values, at 15 Hz. Apache 2.0.

A long job is a sequence of steps, and a policy trained on single steps does best when it is given one at a time: pick up the red cube, then place it in the red box. run.set_task gives the running policy its next step without restarting it, so a planner, such as a vision-language model watching the cameras, can steer the robot through the job.

with robot.inference("sort-cubes/gr00t-pick-place/final", task="pick up the red cube") as run:
for task in ["place the red cube in the red box", "pick up the blue cube", "place the blue cube in the blue box"]:
wait_until_done()
run.set_task(task)

wait_until_done stands for your own check, for example a vision-language model asked about the latest frame. set_task returns once the policy has taken the new task, and raises if the run stops first. The policy does not wait for its current chunk to run out: it starts a chunk for the new task at once, so the robot changes course after one inference without stopping. A model with real-time chunking conditions that chunk on the actions the robot is still executing.

The task is the robot’s state task, on {robot}/state/task: robot.inference(task=...) sets it when the run starts and set_task changes it. A policy you run on your own GPU reads its task there:

session.subscribe(f"{ROBOT}/state/task", callback=lambda sample: latest.update(task=sample.payload.decode()))

Every action travels from the GPU to the robot, so a distant GPU adds that distance to every step. By default the run takes a GPU on the robot’s continent, and looks further out only when none is free there. To keep it closer, list the regions it may use, nearest first:

robot.inference("my-fine-tuned-policy/final", task="stack four cubes", regions=["uk", "eu", "global"])

The run tries London, then Europe, then global, which is anywhere. Without global, it waits until one of the listed regions has a GPU.

The regions are us, us-east, us-central, us-south, us-west, eu, eu-west, eu-north, eu-south, ap, ap-northeast, ap-southeast, ap-south, ap-melbourne, jp, au, uk, ca, me, sa, af, mx and global.

The policy publishes one action per frame at frame_rate:

  • An action key that names a topic, such as left/joint_cmd, is published under control/: control/left/joint_cmd, in the field action.
  • An action key that names a field of a control channel, such as control/joint_cmd.positions, is published in that field.
  • Every message also carries capture_time_us, the capture time of the newest frame the policy saw.
{"capture_time_us": 1791899263877871, "action": [0.12, 0.58, 0.57, -0.11, 0.07, 0.0, 0.95]}

The policy holds the robot like a teleoperator in the web app. When a teleoperator takes control there, the run ends.

  • real_time_chunking=True guides a chunk to agree with the actions still queued, so the robot moves on without a jump (real-time chunking, Black et al. 2025). OpenWAM policies don’t take it.
Inference memberDescription
status()A dict: policy ("waiting", "loading", "ready", then "stopped"), run, last_stop, policy_error, start_pending.
wait()Blocks until the run stops. Raises RuntimeError if the policy failed, for example because the robot does not publish one of its keys.
set_task(task)Gives the policy a new task and returns once the policy has taken it. See Changing the task.
stop()Stops the run. Leaving the with block or robot.close() also stops it.
idThe run’s id.

status()["run"] reports progress while the policy drives the robot:

FieldDescription
published_countActions published so far.
stepControl ticks since the run started, one per frame at frame_rate.
observation_msTime to gather the last observation.
observation_age_msAge of the last observation’s frames.
inference_ms, max_inference_msThe last inference, and the longest of the last 100.
remaining_ms_at_arrivalHow much of the previous chunk was left when the last one arrived.
trimmed_step_countActions of the last chunk skipped because their time had passed.
held_step_countSteps that repeated the last action because the chunk ran out.

The web app shows the same numbers live. Open the latency breakdown on the robot’s page while the policy drives it: the Policy section shows where the model runs, how old its observations are, how long each inference takes, and how old the frames behind the robot’s current actions are.

The same calls are available over HTTP with your organization API key:

Terminal window
API=https://api.adamohq.com/api/inference
INFERENCE_ID=$(curl -X POST $API/start -H "X-API-Key: $ADAMO_API_KEY" -H 'content-type: application/json' \
-d '{"robot_name": "yam-london", "policy": "my-fine-tuned-policy/final", "arguments": {"task": "stack four cubes"}, "regions": ["uk", "eu", "global"]}' | jq -r .inference_id)
curl "$API/status?inference_id=$INFERENCE_ID" -H "X-API-Key: $ADAMO_API_KEY"
curl -X POST $API/stop -H "X-API-Key: $ADAMO_API_KEY" -H 'content-type: application/json' \
-d "{\"inference_id\": \"$INFERENCE_ID\"}"

To run a policy on your own machine instead, connect with the Python SDK, read the robot’s cameras and state, and publish actions on its control channel yourself. A complete server that does this for the ABC DiT policy, with real-time chunking and a FastAPI front end, is deploy/adamo_server.py in Shade5/abc. The steps below are a minimal version of it.

Install the SDK with NumPy support (pip install 'adamo[video]', 1.0.18 or later) and set ADAMO_API_KEY. Video decoding links against GStreamer’s core libraries; on Debian or Ubuntu, sudo apt-get install gstreamer1.0-plugins-base.

Open one video_receiver per camera track and keep the newest frame of each. max_queued_frames=1 drops stale frames when the policy is slower than the camera, so the policy always sees the latest image:

import threading
import adamo
import numpy as np
ROBOT = "abc-sim"
CAMERAS = {"top": "head", "left": "wrist_left", "right": "wrist_right"} # policy camera -> track
session = adamo.connect() # reads ADAMO_API_KEY
latest = {}
def read_camera(cam: str, track: str) -> None:
with session.video_receiver(ROBOT, track, max_queued_frames=1) as receiver:
while True:
try:
frame = receiver.recv(timeout=1.0)
except TimeoutError:
continue
latest[cam] = frame.rgba[..., :3].copy() # uint8 (H, W, 3)
for cam, track in CAMERAS.items():
threading.Thread(target=read_camera, args=(cam, track), daemon=True).start()

For a GPU policy, pass output=adamo.VideoOutput(format="rgba", memory="cuda") and read frame.image through DLPack to keep frames on the GPU. See Receive RGBA in CUDA memory.

Subscribe to the robot’s state key. A robot that publishes joints as in Publishing sends a big-endian u64 timestamp in microseconds, then one float32 per joint:

def on_joints(sample: adamo.Sample) -> None:
count = (len(sample.payload) - 8) // 4
latest["state"] = np.frombuffer(sample.payload, ">f4", count=count, offset=8).astype(np.float32)
state_sub = session.subscribe(f"{ROBOT}/proprioception/joints", callback=on_joints)

Callbacks run on an SDK thread, so keep them short. To find the keys a robot publishes, subscribe to f"{ROBOT}/**" for a few seconds and print each sample.key.

Claim the robot as an operator, the way the web app does: publish acquired on {robot}/control/json/operator_control, then a heartbeat every second while the policy drives it, and released when it stops. The web app then shows the policy as the robot’s operator, and a robot that enforces the ownership lease accepts its actions. Watch the same key, and stop sending actions when another operator acquires the robot:

import json
import uuid
from adamo import Priority
OWNERSHIP = f"{ROBOT}/control/json/operator_control"
operator = {"userId": "my-policy", "sessionId": uuid.uuid4().hex, "displayName": "My policy"}
ownership = session.publisher(OWNERSHIP, priority=Priority.DATA_HIGH, reliable=True)
in_control = threading.Event()
def announce(event: str) -> None:
ownership.put(json.dumps({
"version": 1,
"active": event != "released",
"event": event,
"operator": operator,
"timestampMs": session.fabric_now_us() / 1000,
}).encode())
def on_ownership(sample: adamo.Sample) -> None:
msg = json.loads(sample.payload)
other = msg.get("operator", {}).get("sessionId") != operator["sessionId"]
if other and msg.get("event") == "acquired":
in_control.clear() # someone took over; stop sending actions
def heartbeat() -> None:
for _ in adamo.Rate(1):
if in_control.is_set():
announce("heartbeat")
ownership_sub = session.subscribe(OWNERSHIP, callback=on_ownership)
threading.Thread(target=heartbeat, daemon=True).start()

Also hold session.announce_control(robot, controller, session_id) for as long as the policy drives the robot. It declares the token an operate tab holds while in control, so the operate page shows who is driving, and the data service files the time under that controller: with "policy", a robot recorded with the default HUMAN | POLICY mask keeps recording while the policy drives it, rather than treating the time as unattended. Pass the sessionId of your operator_control claim. The returned ControlAnnouncement holds the token until you call close() or leave its with block, and closes with the session. Step 4 declares it right after acquired and closes it when the policy stops or loses control.

Publish actions on the robot’s control channel with a publisher. express=True and Priority.REAL_TIME send each action without batching and ahead of bulk traffic. The ABC sim takes adamo.JointState JSON on control/joint_state; send whatever message your robot’s control handler reads.

from adamo import JointState
JOINT_NAMES = [*(f"left_joint_{i}" for i in range(6)), "left_gripper",
*(f"right_joint_{i}" for i in range(6)), "right_gripper"]
EXECUTE_STEPS = 16 # actions run from each chunk before the next inference
actions_pub = session.publisher(f"{ROBOT}/control/joint_state", priority=Priority.REAL_TIME, express=True)
policy = load_my_policy() # your model: observation dict -> (horizon, 14) action chunk
announce("acquired")
in_control.set()
control = session.announce_control(ROBOT, "policy", operator["sessionId"])
rate = adamo.Rate(30)
try:
while in_control.is_set():
if not {"state", *CAMERAS} <= latest.keys():
rate.sleep() # wait for the first frame of every camera and the first state
continue
obs = {"state": latest["state"], "images": {cam: latest[cam] for cam in CAMERAS}}
chunk = policy.infer(obs)
for action in chunk[:EXECUTE_STEPS]:
if not in_control.is_set():
break
actions_pub.put(JointState(names=JOINT_NAMES, positions=action.tolist()).to_json())
rate.sleep()
finally:
control.close()
if in_control.is_set():
announce("released")
session.close()

This loop pauses the robot while each chunk is computed. To keep it moving, run inference on its own thread and start the next chunk a few steps before the current one runs out, conditioning it on the actions still queued (real-time chunking), as adamo_server.py does. That server also reopens a camera receiver after a connection error, stops the run when a camera sends no frames, and reports camera ages, inference latency and who holds control at GET /status.

A policy that drives a robot well in one place can stall in another: a farther GPU adds network time, a slower one adds inference time, and a camera that drops frames feeds the policy old images. To see this while you watch the robot, publish your loop’s timings on {robot}/stats/inference, as plain JSON, about once a second. The web app adds a Policy section to the robot’s latency breakdown while the topic is live, and hides it 3 s after the last message.

Every field is optional; the web app shows the ones you send:

FieldDescription
policy, taskThe policy’s name and the task it runs.
owner"model" while the policy drives, "human" while an operator has taken over.
hostWhere the policy runs: provider, region and gpu, for example {"provider": "On-prem", "region": "London", "gpu": "RTX 4090"}.
relay_rtt_msRound trip from your machine to its relay, from session.relay_rtt(). With the robot’s own relay round trip, it gives the model-to-robot leg.
frame_rateThe rate actions should reach the robot, in Hz.
observation_age_msHow old the oldest frame in the last observation was when inference started.
observation_msTime to gather that observation.
inference_ms, max_inference_msThe last inference, and the longest recent one.
inference_rate_hzInferences in the last second.
action_age_msMean age of the frames behind the actions sent in the last second, at the moment each was sent. The web app adds the model-to-robot leg and shows it as glass-to-action.
publish_rate_hzActions sent in the last second.
remaining_ms_at_arrivalHow much of the previous chunk was left when the last one arrived.
inference_delay_steps, chunk_lengthThe real-time chunking delay the last inference was given, and the length of the current chunk.
trimmed_step_count, held_step_countActions skipped because their time had passed, and steps that repeated the last action because the chunk ran out, in the last second.
camerasPer track: age_ms, the age of its newest frame, and fps, frames received in the last second.
statePer state topic: age_ms, the time since its last message.

Glass-to-action is to a policy what glass-to-glass is to a teleoperator: how old the world was when the robot acted on it. Times are on the fabric clock, so they compare across machines. Keep each frame’s capture time in step 1:

captured = {}
def read_camera(cam: str, track: str) -> None:
...
latest[cam] = frame.rgba[..., :3].copy()
captured[cam] = frame.capture_time_us

Then time each inference in step 4 and publish once a second from a thread:

import time
metrics = {"policy": "my-policy", "host": {"provider": "On-prem", "region": "London", "gpu": "RTX 4090"}, "frame_rate": 30}
def publish_metrics() -> None:
for _ in adamo.Rate(1):
rtt = session.relay_rtt()
metrics["relay_rtt_ms"] = None if rtt is None else rtt * 1000
session.put(f"{ROBOT}/stats/inference", json.dumps(metrics).encode())
threading.Thread(target=publish_metrics, daemon=True).start()
# in the loop of step 4
capture_time_us = min(captured[cam] for cam in CAMERAS)
metrics["observation_age_ms"] = (session.fabric_now_us() - capture_time_us) / 1000
started = time.monotonic()
chunk = policy.infer(obs)
metrics["inference_ms"] = (time.monotonic() - started) * 1000

Policies Adamo hosts publish every field above.