Ai Agents 5 min read

How to Run a Streaming Data Loop With Strands Agents

Learn how to configure Strands Agents, Hugging Face Storage Buckets, and LeRobot to record, train, and deploy robotic policies in a continuous loop.

The new Strands Agents integration with Hugging Face Storage Buckets and LeRobot creates a continuous streaming data loop for robotics. Instead of manually copying datasets between collection environments and training clusters, you can record demonstrations directly to mutable cloud buckets, train on streaming data, and deploy policies back to hardware from a single environment. This architecture removes the infrastructure overhead typically associated with maintaining separate data collection and deployment stacks.

Installation and Setup

The required tools are distributed via the strands-robots package. This open-source SDK, released under the Apache 2.0 license, exposes robotics abstractions and the LeRobot stack as AgentTools. You can install the package with its simulation and mesh dependencies using uv.

bash uv pip install “strands-robots[sim-mujoco,lerobot,mesh]”

The installation includes the core SDK required to interface with both physical hardware and MuJoCo simulation environments. Because the SDK leverages the standard uv package manager, dependency resolution handles the underlying computer vision and reinforcement learning libraries required by LeRobot.

The Robot() Factory Abstraction

Strands Agents utilize a unified Robot() factory interface to abstract the underlying hardware or simulation environment. This design allows you to write your control and teleoperation scripts once and execute them across different targets by changing a single parameter.

The factory supports physical hardware configurations, such as the SO-101 and SO-100 arms, as well as virtual counterparts in MuJoCo. By standardizing the interface, the SDK ensures that the episodes recorded in simulation perfectly match the format expected by the physical robot, reducing the domain gap when moving from simulated tests to real-world deployment. You can consult the Strands Agents documentation for the exact parameter keys corresponding to your specific hardware setup.

Configuring Hugging Face Storage Buckets

To close the streaming data loop, the system relies on Hugging Face Storage Buckets. Unlike standard dataset repositories on the Hugging Face Hub, which use a Git-based architecture, these buckets are S3-compatible, non-versioned object storage containers.

Buckets exist in the standard hf:// namespace, making them compatible with existing Hugging Face API clients. They are powered by Xet-backed storage, which performs content-addressable deduplication at the storage layer. As your AI agents collect thousands of episodes, the Xet backend prevents you from paying for redundant byte transfers. This deduplication addresses the primary cost bottleneck in long-term robot learning, where minor checkpoint variations and highly repetitive video frames rapidly inflate storage and egress costs.

Because buckets drop the overhead of Git history, they handle the rapid, continuous modification required by a streaming loop. You can push growing robotic datasets, checkpoints, and logs at high frequency without stalling the repository or triggering strict rate limits.

Implementing the Recording Phase

The first step in the workflow is data collection. Whether your agent operates via teleoperation or runs autonomously in simulation, it pushes the collected demonstrations directly to the storage bucket.

The system enforces the use of the LeRobotDataset format (v3). This format is the standard across the more than 90,000 datasets currently hosted on the Hugging Face Hub. By writing directly to LeRobotDataset v3, your agent structures the episode data—including joint states, actions, and camera observations—exactly as the training scripts expect it. There is no intermediate conversion or ETL pipeline required.

Streaming Training to VLA Models

Once data begins populating the bucket, the training phase initiates. The critical advantage of this architecture is streaming. The training script reads batches directly from the bucket over the network, bypassing the need to copy massive multi-terabyte datasets to the local GPU file system before starting a run.

The SDK natively supports integrating Vision-Language-Action (VLA) models. The environment is verified to support recent state-of-the-art architectures, including NVIDIA GR00T 1.7, Pi0, MolmoAct2, and SmolVLA. As the training loop consumes the streamed data, it generates updated policy checkpoints and writes them back to the same storage bucket. This approach pairs well with infrastructure that supports real-time training to LeRobot.

Deployment and the Continuous Loop

The final phase pulls the updated checkpoint from the bucket and deploys it back to the robot via the Strands agent. Because the Robot() factory standardizes the execution environment, the new policy can be loaded into the hardware immediately.

This creates a daily improvement loop. The hardware runs the new policy, handles edge cases, and logs failures or corrections. These new recordings are pushed back to the bucket, the training cluster pulls the fresh data during its next epoch, and a new checkpoint is generated.

Tradeoffs and Limitations

While the streaming data loop removes data transfer friction, it introduces specific constraints regarding version control. Hugging Face Storage Buckets are explicitly non-versioned. You lose the ability to perform standard Git-based diff operations or roll back to historical commits of your dataset via the repository interface.

If you need strict provenance tracking for compliance or plan to evaluate and test AI agents against immutable baselines, you must manage dataset versioning manually by writing to explicitly named folders or separate buckets for each epoch.

Additionally, streaming data directly to GPUs requires robust network bandwidth. If your training cluster suffers from high latency or throttled connections to the Hugging Face infrastructure, the storage I/O bottleneck will stall your GPU utilization, negating the time saved by skipping the initial dataset download.

Next Steps

Start by initializing a basic MuJoCo simulation environment using the strands-robots package. Verify your Hugging Face authentication token is configured locally with write access to your designated bucket namespace before initiating your first teleoperation recording session.

Get Insanely Good at AI

Get Insanely Good at AI

The book for developers who want to understand how AI actually works. LLMs, prompt engineering, RAG, AI agents, and production systems.

Keep Reading