A walkthrough of the LeRobot integration in Strands Robots - one agent loop, from a Hub dataset to a physical robot, with sim-to-real datasets in the same on-disk format and policies you swap with a string.
Updated for Strands Robots 0.6, which rewrote the library around three classes: Simulation, Robot and Policy.
It has been revealed that you have a robot, a folder of demonstration data on the Hugging Face Hub, and a new task you want it to learn. Today that takes five separate tools: one to record new demonstrations, another to train, a third to test in simulation, custom code to deploy on hardware, and yet another to coordinate when you have more than one robot. The pieces work on their own. They don't talk to each other.
Strands Robots is an open source SDK from AWS (Apache 2.0) that gives you a robot, its simulation, and the LeRobot stack behind agent tools that you hand to a single Strands agent. The integration is deliberately thin: LeRobot's own scripts handle hardware recording and calibration, and Strands Robots comes in for the parts an agent actually orchestrates. A robot in simulation records LeRobotDatasets with LeRobot's own writer, in the same format LeRobot writes on hardware. A Policy loads LeRobot checkpoints in-process behind one interface, including ACT, SmolVLA, pi0, GR00T and MolmoAct2. A peer mesh fans the agent out to remote robots. The dataset format stays exactly as LeRobot wrote it; the agent loop is the glue.
It has been revealed that this post walks you through five steps inside a single agent: build the agent over the robot's tools, record a demonstration as a LeRobotDataset in simulation, run a policy from the Hub on the same robot, deploy the same agent code to a physical SO-101 with one keyword argument change, and reach the robot over the Zenoh mesh. At the end, you can clone the working sample from GitHub and run it on your laptop in simulation. No hardware, no GPU, no Hugging Face credentials needed for the default path. The runnable companion to this post is the notebook notebooks/11_hub_to_hardware.ipynb.
Strands Robots gives you the LeRobot stack behind agent tools that you hand to one Strands agent. The example agent in this post does four things: drive a simulated SO-101 while your code records a demonstration and pushes it to the Hub as a LeRobotDataset, run a policy from the Hub on that robot, and deploy the same agent code to a physical robot with one keyword argument change. When you have more than one robot, the agent can coordinate the whole fleet through a built-in peer mesh. For hardware recording and calibration, LeRobot's own CLIs (lerobot-record, lerobot-calibrate) handle the bring-up; the agent picks up from there.
Industry observers note that figure 1. Robot("so101") is an SO-101 in a MuJoCo world by default; Robot("so101", port=...) drives the physical arm through the same safety chain. The agent holds the robot's tools, run(record=...) writes a LeRobot v3 dataset with LeRobot's own writer, and a Policy loads a checkpoint from the Hub by name, so a dataset captured in sim and a dataset captured on hardware use the same on-disk format.
Two design choices make this work. First, Robot("so101") is a robot in a simulated world by default (no hardware, no risk), and Robot("so101", port=...) is the same class driving a physical arm. The agent code is identical across both, and every command from the agent passes the robot's safety chain: a target outside a joint's range is refused, never clipped. Second, recording goes through LeRobot's own dataset writer on both the simulation path and hardware, so a dataset captured in MuJoCo and one captured from a physical SO-101 are in the same format.
The whole workflow in five lines of Python:.
What follows is what's actually happening inside that call, step by step.
In a recent development, that's it. The example in this post runs end-to-end on a laptop with these three.
Install Strands Robots and get the example files:.
Industry observers note that sign in to Hugging Face if you want to push datasets to the Hub. This is optional for the default simulation path in this post; the example runs end-to-end with a placeholder motion and writes the dataset to a local folder without needing Hub access.
Industry observers note that the runnable example lives at notebooks/11_hub_to_hardware.ipynb, with the same code as a script in notebooks/scripts/11_hub_to_hardware.py, in the strands-labs/robots repository alongside the other numbered notebooks. The notebook is the recommended starting point: open it in JupyterLab and run cells top-to-bottom in simulation without any hardware connected.
A robot in simulation records LeRobotDatasets in the same format LeRobot writes on hardware. No hardware required. robot.run(policy, record=...) writes a LeRobot v3 dataset through LeRobot's own writer, one episode per run: same parquet schema for joint states and actions, same per-camera MP4 layout. Recording is an argument your code passes, not something the agent decides, so the operator chooses what is kept:.
Pass a folder (record="data/cube_picking_sim") instead to keep the dataset local.
Figure 2. The recording scene in MuJoCo simulation: the SO-101 arm and a red cube on the ground plane, captured to a LeRobotDataset. No hardware, no GPU, no Hugging Face credentials needed for this default path.
The placeholder motion is intentional: it moves the arm so the workflow runs end-to-end without a trained checkpoint. The robot waves rather than completing the grasp, and the recording is structurally complete (valid joint states, valid camera frames, a well-formed LeRobotDataset episode), but the demonstration itself isn't useful as training data. Step 3 below swaps in a trained policy from the Hub; the recording call, dataset format, and agent code stay the same.
The proof is what happens next. LeRobot's own dataset loader reads the sim-recorded data with no Strands-specific code path:.
These features are the same as any LeRobot dataset on the Hub: same column names, same parquet+MP4 layout, same loader path, plus time.measured, the time each frame was actually read, so a stall demonstrates up in the data. Training scripts that consume hardware-recorded data consume the sim-recorded data without modification. Datasets pushed from sim sit alongside hardware recordings in the same Hub repository if you want them to.
A single episode from a recorded LeRobotDataset, played back from the per-camera MP4 LeRobot's writer produced, the same on-disk video a training script reads.
Recent findings suggest that to record demonstrations on a physical SO-101 instead of simulation, use LeRobot's record CLI directly. Strands Robots doesn't wrap that command because LeRobot already does the job cleanly:.
The dataset that lands on the Hub from this command is in the same format as the simulation recording. To fine-tune a policy on it, run LeRobot's training CLI (lerobot-train); training itself is out of scope for this post and follows the standard LeRobot workflow. From Step 3 onward, the agent picks up either the original or a fine-tuned checkpoint interchangeably. For full SO-101 hardware setup, calibration, and cameras, see the hardware guide.
It has been revealed that with the dataset on the Hub, the next step is to run a policy. A Hub repo id is a policy: Policy("/") loads a LeRobot checkpoint in-process with LeRobot's own loader. You hand it to the robot's tool by name, and the agent runs it the same way it would run any other policy:.
Under the hood, the agent calls the robot tool's run action with policy="act". The robot steps the simulation with the policy's action chunks, and every action passes the same safety chain as a command from the agent. norm= states the units the checkpoint was trained in, and the library checks it against the checkpoint's saved statistics before the first step, naming the joint and the fix if they disagree. The chain applies to the policy too: in one of our runs it stopped the checkpoint after 1.3 seconds, when it asked for the gripper 0.0002 rad past its range, and the robot refused the step instead of clipping it. To run inference on a separate GPU machine instead, serve the checkpoint with LeRobot's lerobot-policy-server and point the robot at it with Policy("zenoh://gpu-box:7447/").
Figure 3. The Hub ACT checkpoint driving the simulated SO-101. It was trained on a real SO-101 with a wrist camera, so here it moves the arm; a checkpoint trained on your own demonstrations swaps in by changing the string.
According to recent reports, A different checkpoint is a different string. Policy runs ACT, Diffusion, SmolVLA, Ο0, Ο0.5, GR00T and MolmoAct2 checkpoints, anything LeRobot's own policy registry can load. The policy guide lists the families and the options.
Sources indicate that note: Loading a checkpoint runs code its publisher chose. A Policy your own code builds loads directly; a Hub checkpoint the agent asks for by name loads only if the operator lists it in STRANDS_POLICY_REPOS (for example STRANDS_POLICY_REPOS=lerobot/smolvla_base,my_user/*). Only load checkpoints from organizations you trust.
This is the same code as Step 3, with one keyword argument changed. port= gives the same Robot class a Feetech driver for the physical arm, with LeRobot's calibration file:.
The same agent prompt now runs against a physical arm. The camera names are the image keys the policy sees, and on a real arm nothing moves without the operator: operator= is asked once for every move a tool requests, and once for a policy run's strategy. The same checkpoint, loaded in-process, generates the action chunks.
It has been revealed that before this runs against your SO-101, calibration for both follower and leader has to be in place. Run LeRobot's calibration command (lerobot-calibrate) once per device; the files land under ~/.cache/huggingface/lerobot/calibration/ and Robot(..., id=...) reads them from there. If a calibration is missing, the robot notes which file it looked for.
In a recent development, up to now we've driven one robot at a time. The mesh is how Strands Robots handles more than one. Picture five SO-101s running the same warehouse task in parallel, a humanoid coordinating with a mobile base, or an arm in another room that an agent on your laptop drives. All of those are mesh patterns. The mesh is built on Zenoh, an open source peer-to-peer protocol, and you don't manage IP addresses, write discovery code, or pick a broker; robots show up on the mesh the moment they're mounted, and the agent can talk to all of them at once.
A robot joins a mesh when you mount it, and the agent reaches every robot on the mesh through one tool, use_mesh:.
Sources indicate that the agent lists the devices on the mesh, reads each one's manifest, and invokes the same actions the robot's own tool has: observe, act, run, stop and estop. Use Mesh("iot://us-west-2") with the iot extra to route the same calls over AWS IoT Core for cross-network fleets; the agent code doesn't change.
It has been revealed that safety goes with the robot, not the transport. An agent can always press e-stop, on one robot or with a broadcast to all of them, but it can never resume one: only a named operator can, with resume(approved_by=...). A plain zenoh:// mesh is one any machine on the network can join, so a real robot on it is observe-only until you give the lab certificates (python -m strands_robots.mesh ca and cert); simulated robots take commands on it freely.
It has been revealed that the transport scales without touching agent code. On the LAN, Zenoh peers find each other with no broker. Across subnets, run a zenohd router with its own certificate, and for cloud fleets the iot:// mesh carries the same calls over AWS IoT Core with an X.509 certificate per robot.
The full sample is on GitHub at strands-labs/robots in the notebooks/ folder. Notebook 11 packages all five steps, with the same code as a script in notebooks/scripts/11_hub_to_hardware.py. It runs in simulation with a placeholder motion and a small ACT checkpoint from the Hub. No GPU, no Docker, no Hugging Face credentials needed.
In a recent development, the agent steps use Amazon Bedrock with your AWS credentials; set STRANDS_MODEL_ID to the model you want. The recorded dataset lands in a temporary folder the notebook prints. To push it to the Hugging Face Hub instead of keeping it local, set HF_USER= after hf auth login with write scope.
In a recent development, the code snippets shown in this setup represent a βhello worldβ example of setting up Strands Robots with HuggingFace. For more serious, production-ready use cases there are some crucial considerations users should be aware of:.
Supplying untrusted data into agents can lead to prompt injection, where untrustworthy context is treated as LLM instructions. Given the actuation of these robots in physical space, this is an important risk to track. To mitigate this behavior, developers should be careful to feed the robots only data that comes from a trusted source. If not all input data can be trusted, developers should restrict the tools available to the agent to prevent the robots from making safety-critical actions.
Sources indicate that A plain zenoh:// mesh, as in the snippets in this post, has no access control: any device on the same network can join it, and the peer id in a request is only a claim. That is why a real robot on it answers only describe, observe, stop and estop. For untrusted networks or production environments, give each machine a lab certificate (python -m strands_robots.mesh ca, then cert), so the mesh runs over mutual TLS and only machines with a certificate can reach a robot. On AWS IoT Core, give each robot its own X.509 certificate and an IoT policy limited to its own topics.
In a recent development, on a real robot, operator= is the gate: one function answers every move a tool, the dashboard or the mesh asks for, and every policy run's strategy, once, before anything moves. The agent's approval never comes from its own tool arguments, so a prompt-injection attempt that slips an approval into a command cannot bypass it. An agent can always press e-stop but can never release one, calibrate, record, push, or choose a policy address on the network, and it loads a Hub checkpoint by name only if the operator lists it in STRANDS_POLICY_REPOS.
The preceding workflow opens serial ports on hardware and writes a local dataset cache. To return your environment to a clean state:.
In a recent development, the integration's central design choice is that Strands Robots doesn't reimplement what LeRobot already provides. Calibration, the dataset format, and the policies stay upstream. Strands adds the agent tools, the safety chain and the mesh that make them composable from natural language.
In a recent development, two consequences follow. For users, every dataset on the Hub is an asset an agent can extend, fine-tune from, and deploy against with no conversion step. For developers, simulation data and hardware data share a single file format, so training scripts written for one consume the other unchanged. The line between sim and real becomes a deployment detail, not an architectural divide.
Figure 4. The Strands Robots catalog spans arms, humanoids, mobile bases, and hands, all in the same MuJoCo simulation and behind the same Robot class. The SO-101 in this post is one of its 76 robot presets.
It has been revealed that the full Strands Robots documentation covers the robot catalog, simulation, policies, recording, and the mesh in depth. For larger workloads, Strands Robots also runs GPU simulation: MuJoCo-Warp with Simulation("mujoco", physics="newton") and Isaac Sim with Simulation("isaac"). Both sit behind the same Robot class shown in this post, so the agent code stays the same as you scale up.
Contributions are welcome under Apache 2.0. If you build something with this workflow, open an issue with what worked and what didn't. The SDK improves fastest when developer feedback lands directly on the surface that needs it.
Cagatay Cali is a Research Engineer at AWS focused on Agentic AI and robotics. He designs interfaces that connect AI agents to physical robots, enabling developers to control robotic systems through natural language and making agents and robotics development accessible to builders at any skill level.
In a recent development, sundar Raghavan is a Sr Solutions Architect at AWS on the Agentic AI Foundations team. He leads the developer experience for Amazon Bedrock AgentCore, owning the SDK and CLI, and drives the framework and ecosystem integrations strategy. He focuses on how developers build, deploy, and scale production AI agents on AWS. He is right now extending that focus into physical AI, collaborating on Strands Robots to bring the same agent developer experience to robotics.
Fantastic to see! The single-kwarg flip from MuJoCo sim to mode="real" (same agent code, same LeRobotDataset format end to end) is exactly the friction-removal that gets robotics agents into real labs. Work like this lifts all the ships: the easier and more open we make agent-to-hardware control, the faster the whole industry moves. The Device Connect team at Arm is excited to collaborate!
