Loading video...

Video Failed to Load

Go Home

Robotics: coding agents’ next frontier. So how good are they? We introduce CaP-X: an open-source framework and benchmark for coding agents, where they write code for robot perception and control, execute it on sim and real robots, observe the outcomes, and iteratively improve code reliability. From NVIDIA Berkeley AI...

179,196 views • 5 months ago •via X (Twitter)

22 Comments

Max Fu's profile picture
Max Fu5 months ago

At the core of CaP-X is CaP-Gym: an open-source simulation playground for robot agents spanning 187 community standard tasks: robosuite, LIBERO-PRO, and BEHAVIOR. It is designed to be easy to extend with new environments and skills, while a web-based chat UI and robot visualizer powered by Viser make it easy to inspect and interact with agents.

Max Fu's profile picture
Max Fu5 months ago

Built on top of the CaP-Gym infrastructure, CaP-Bench can measure how far coding models can push robot control, and what is still missing. The best model we evaluated reaches 32.3% average zero-shot success, while human experts reach 88.5%.

Max Fu's profile picture
Max Fu5 months ago

To close this gap, we built CaP-Agent0, a training-free agentic framework built on three scaffolds: text-based visual differencing described by a multimodal model, skill libraries, and parallel reasoning. Scene changes are turned into text, reusable functions are distilled from successful runs, and multiple candidate solutions are explored in parallel. Together, these ingredients can significantly improve success rates and bring coding agents closer to human-level performance on several manipulation tasks.

Max Fu's profile picture
Max Fu5 months ago

We also present CaP-RL, where we use GRPO to train Qwen2.5-Coder-7B directly from environment rewards obtained by executing robot programs in simulation. Because CaP-X uses code as the interface for robot control, the resulting model can be deployed in both simulation and on real robots. We find that post-training significantly improves agentic coding performance, bringing the model closer to human experts.

Max Fu's profile picture
Max Fu5 months ago

We believe the path to future robotic intelligence includes both data-driven methods and coding agents. To help push that future forward, CaP-X is fully open-sourced under the MIT license. We welcome the community to extend it with new environments, skills, models, and agent scaffolding. This was a massive team effort, and I am deeply thankful to the incredible collaborators who made it possible: @uynitsuj @k_elrefai @ethankou24 @HaoruXue @_wenlixiao @RavenHuang4 @guanzhi_wang @drfeifei @GuanyaShi @jiajunwu_cs Shankar Sastry @yukez @Ken_Goldberg @DrJimFan Paper: Code: Project page:

Justin Yu's profile picture
Justin Yu5 months ago

We encourage the community to take our open source code and integrate their own simulators and deploy on real robots as we have done with Robosuite, LIBERO, Behavior, and on the Agibot and Franka Panda!

Tony Zhao's profile picture
Tony Zhao5 months ago

Congratulations Max and Haoru!

Awais's profile picture
Awais5 months ago

32.3% zero-shot vs 88.5% human expert — that gap is massive but the approach is right. Code as the interface for robot control is fundamentally more debuggable, interpretable, and transferable than end-to-end VLA models. The GRPO training on Qwen2.5-Coder-7B with environment rewards is the same technique that's dominating agentic RL papers this week (Gen-Searcher, etc). This is becoming the default training recipe for tool-using agents. The fact that simulation-trained models transfer to real robots through code is the key insight most people will miss in this paper. Follow @drawais_ai for daily AI paper breakdowns and resources.

mrkelly's profile picture
mrkelly5 months ago

I learned this the hard way. The sim-to-real gap is rarely just a software problem.

Thomas Tao's profile picture
Thomas Tao5 months ago

The sim-to-real loop is the interesting part. Pure code evals miss where agents usually break.

Jing Wang's profile picture
Jing Wang5 months ago

Congrats bro, really hot stuff!

Vaishak Kumar's profile picture
Vaishak Kumar5 months ago

Hi Max, great work. Do you think it might be worth citing our work on very similar settings?

Sanskar Pandey's profile picture
Sanskar Pandey5 months ago

@berkeley_ai Great work Max!

Yuichi SUMIYA's profile picture
Yuichi SUMIYA5 months ago

実は3/13、GTC前に発表してました。巨人と方向性が合ってて良かった。 頑張るぞー。

Lukas Die Kunst's profile picture
Lukas Die Kunst5 months ago

CaP-X's iterative control mirrors UAV stabilization algorithms I work with daily. German robotics engineers: our banks reject this innovation, while UAE venture capital funds it.

Suzanne Jin's profile picture
Suzanne Jin5 months ago

I’d love to train a robot, but I have none. Is it possible to provide a platform where people around the world can train and monitor a robot remotely?

Simon's profile picture
Simon5 months ago

I suppose there are a lot of niches in robotics where code rather than AI will remain the way to go so AI agents specializing in coding for such robots makes sense. Hope it yields positive results.

Igor Lessio - Robots/acc - AIFlow Labs's profile picture
Igor Lessio - Robots/acc - AIFlow Labs5 months ago

Super FUN paper to materialize. We found some interesting things happening using @MiniMax_AI 2.7 as model. Great job Max

Nurvai - The Data Layer for Physical AI's profile picture
Nurvai - The Data Layer for Physical AI5 months ago

Interesting to see coding agents evaluated through executable robot behavior instead of just code quality. Does this start shifting robotics progress toward better software abstractions, rather than only better models or hardware?

Iqbal's profile picture
Iqbal5 months ago

How fast can it adapt to be a world model ?

echo's profile picture
echo5 months ago

Congrats on the release. The 'execute, observe, iterate' loop is the right structure. We've been thinking about skipping the policy entirely, using a semantic scene description and a deterministic solver.

Sebastian Vermeulen's profile picture
Sebastian Vermeulen5 months ago

CaP-X is a smart benchmark approach, letting coding agents iterate on real robot outcomes. Curious how you think about the perception gap when the visual domain shifts dramatically. If a robot trained on household scenes encounters an industrial workspace or a surgical environment, how far does the pretrained visual encoder get before it needs domain-specific data?

Related Videos

New short course: Building Code Agents with Hugging Face smolagents! Learn how to build code agents in this course, created in collaboration with Hugging Face, and taught by Thomas Wolf, its co-founder and CSO, and m_ric, Hugging Face’s Project Lead on Agents. Tool-calling agents use LLMs to generate multiple function calls sequentially to complete a complex sequence of tasks. They generate one function call, execute it, observe, reason, and decide what to do next. Code agents take a different approach. They consolidate all these calls into a single block of code, letting the LLM lay out an entire action plan at once, which can be executed efficiently to provide more reliable results. You’ll learn how to code agents using smolagents, a lightweight agentic framework from Hugging Face. Along the way, you’ll learn how to run LLM-generated code safely and develop an evaluation system to optimize your code agent for production. In detail, you’ll learn: - How agentic systems have evolved, gaining greater levels of agency over time—and why code agents are a next step. - How code agents write their actions in code. - When code agents outperform function-calling agents. - How to run code agents safely in your system using a constrained Python interpreter and sandboxing using E2B. - To trace, debug, and assess the code agent to optimize its behaviours for complex requests. - How to build a research multi-agent system that can find information online and organize it into an interactive report. By the end of this course, you’ll know how to build and run code agents using smolagents, and deploy them safely with a structured evaluation system in your projects. Please sign up here!

Andrew Ng

127,724 views • 1 year ago