
Record, train, and deploy robot policies with Strands Agents and Storage Buckets

This post walks through a continuous robot data loop built with Strands Robots, LeRobot, and Hugging Face Storage Buckets.
The loop records demonstrations, syncs them to a mutable Storage Bucket with byte-level deduplication (via Xet), trains a policy by streaming the dataset directly from the Hub (no local download), and deploys the checkpoint back to hardware.
All stages use the same on-disk LeRobot format, and the same Robot() factory drives both recording and inference.
Step 1 records a LeRobotDataset from simulation or hardware, then syncs it to a bucket with sync_dataset_to_bucket().
Step 2 covers Storage Buckets: content-defined chunking means only changed bytes upload on subsequent syncs—1% change in a 500 MB file re-uploads ~5.5 MB.
Step 3 trains via stream_dataset(), which returns frames decoded from remote MP4 and Parquet shards, usable in a PyTorch DataLoader. The LeRobot trainer also accepts repo_type=bucket directly.
Step 4 deploys the checkpoint with mode=”real” and records new demonstrations back into the same bucket. A sample notebook at examples/notebooks/05_streaming_data_loop.
ipynb runs the full loop in simulation with no GPU or credentials required.
The post also notes security boundaries: prompt injection, training data trust, scoped tokens, and that buckets retain no revisions.
The loop is designed for iterative collection and training, with versioned dataset repositories used for published artifacts.
Provider names like lerobot_local, groot, and cosmos3 share a common TrainSpec/Trainer lifecycle. Streaming works on macOS with Homebrew’s ffmpeg.
Byte-level deduplication from Xet reduces repeated upload costs, and pre-warmed CDN reads reach ~1,086 MB/s measured in Hugging Face’s benchmarks.

