TL;DR
EmbodyAgent is a three-stage post-training framework that transforms an open-weight 9B Vision-Language Model (VLM) into a high-performing embodied agent. By combining black-box teacher distillation, supervised fine-tuning (SFT), and online reinforcement learning (RL) over a unified Python code interface, it boosts task success from 0% to 84% while significantly improving execution efficiency.
What Problem Does This Paper Address?
While frontier Vision-Language Models (VLMs) like GPT-4o show impressive reasoning, they are often "black boxes" accessible only via APIs. Conversely, open-weight VLMs (like Qwen or Llama) are accessible but typically fail at complex, closed-loop robot manipulation tasks out of the box.
The authors identify three major hurdles in creating capable embodied agents:
- The Format Gap: Raw VLMs don't naturally follow the strict "interactive tool contracts" required to control a robot.
- The Teacher Gap: High-quality training data is hard to get because the best "teacher" models don't expose their internal weights or token probabilities for standard distillation.
- The Imitation Gap: Supervised imitation learning (SFT) often plateaus because the student model eventually encounters "out-of-distribution" states that the teacher never showed it how to handle.
Methods
EmbodyAgent tackles these issues with a three-stage "post-training stack" built around a unified think-then-code interface. Instead of outputting raw motor commands, the model writes Python programs that call two simple functions: env.observation() (to see) and env.action(a) (to move).
- Stage 1: Black-box Teacher Data Synthesis. The authors use a frontier model (Astra Medium) as a teacher. It interacts with the environment as a black box, forced to provide a "Chain-of-Thought" explanation before writing code. Only successful trajectories are kept, resulting in a clean dataset of 1,475 "think-then-code" targets.
- Stage 2: Multimodal SFT Distillation. An open-weight 9B VLM (Qwen3.5-9B) is fine-tuned on the teacher's data. Crucially, both the vision encoder and the language backbone are kept trainable, allowing the model to ground visual observations directly into executable code.
- Stage 3: Online Outcome-Based RL. To overcome the imitation gap, the student model is trained on its own rollouts using Group-Relative Policy Optimization (GRPO). The reward is simple: success on the task, minus a small penalty for code that causes runtime errors.
Datasets
The framework was evaluated on the LIBERO Spatial benchmark, which consists of 10 distinct robot manipulation tasks (e.g., picking up a bowl and placing it on a plate). The authors used a strict evaluation protocol with disjoint initial-state splits for training, validation, and testing to ensure the agent wasn't just memorizing specific scenarios.
Key Insights and Ideas
- Primitive-Free Control: Unlike many prior works that rely on a library of pre-defined skills (like
pick_up()oropen_drawer()), EmbodyAgent writes raw control loops. This demonstrates that VLMs can handle the "perception-planning-control" loop entirely through code. - The Self-Reinforcing Error Loop: The authors discovered a unique failure mode in RL for code-writing agents. If a model generates buggy code, that error message enters its conversation history. In subsequent turns, the model might "learn" to condition on its own errors, leading to a death spiral of repeated failures.
- Efficiency Emergence: Interestingly, RL didn't just make the agent more successful; it made it more efficient. The agent learned to "batch" its actions, executing longer control loops before stopping to check the camera again.
Key Results
- Massive Success Gains: The base 9B VLM had a 0/100 success rate on held-out test states. After SFT, this rose to 14/100, and after Stage 3 RL, it jumped to 84/100.
- Efficiency Boost: The median number of model calls per episode dropped from 36 (after SFT) to just 11 (after RL).
- Local Independence: The final 9B model operates entirely locally, running 14x faster than the original black-box teacher API while achieving higher success rates than the teacher's raw collection rate.
Limitations and Future Work
- Scope: The study is currently limited to one simulation suite (LIBERO Spatial). The authors note that extending this to broader manipulation suites and real-world robots is a natural next step.
- Sparse Rewards: While RL was highly effective, some tasks (like Task 4 in the benchmark) remain challenging due to the difficulty of discovering success through random exploration in sparse-reward environments.
- Ablations: Future work could more deeply investigate the specific impact of the "think-then-code" structure versus other prompting or architectural choices.
Summary updated