Recursive Video In-Context Learning for Agentic Robot

Wenrui Bao, Xinxin Liu, Bingxin Xu, Yuzhang ShangarXiv 2026

TL;DR

Recursive Video In-Context Learning (RV-ICL) is a training-free method that allows LLM-based robot agents to navigate a hierarchical representation of a demonstration video. By recursively fetching specific, high-resolution clips only when needed—such as right before a delicate grasp or after a failure—agents can learn the "how" of a task without overwhelming their context windows, leading to significant performance gains in complex, long-horizon manipulation.

What Problem Does This Paper Address?

Modern robot systems often use Large Language Models (LLMs) as a "deliberative layer" to plan tasks and call low-level vision-language-action (VLA) policies. While these agents can improve over time using text-based memory, text is notoriously bad at describing spatial and temporal nuances. A text memory can record that a grasp failed, but it cannot easily convey how to approach a specific handle or how high to lift an object.

Demonstration videos capture these details perfectly, but they are difficult to integrate into an LLM's context. A full video is too long and slows down every reasoning turn, while a few fixed keyframes often skip the critical "contact details" (the exact moment of a grasp or release) that determine success. The authors identify a fundamental mismatch: what an agent needs to see changes throughout the episode, shifting from a high-level task structure during planning to fine-grained motion details during execution.

Methods

The core of the paper is Recursive Video In-Context Learning (RV-ICL). Instead of treating a demonstration as a static prompt, RV-ICL treats it as a navigable environment organized into a four-level hierarchy:

  1. $L_0$ (Task Keyframes): A fixed set of frames spanning the whole task, providing a visual overview.
  2. $L_1$ (Phases): Textual descriptions of intervals between sub-events (e.g., "approach," "carry," "push").
  3. $L_2$ (Moments): A text index of short windows around specific sub-events like "grasp 1" or "release 1."
  4. $L_3$ (Clips): Short, 20-frame high-resolution sequences from the third-person or wrist camera.
Figure 2: Architecture of RV-ICL on RPent. Each demonstration is segmented offline at its sub-events into a four-level hierarchy. During an episode the LLM agent acts through the harness. Robot tools execute on the environment, and read-only demonstration tools load a level of the hierarchy into the agent’s context. The agent reads the coarse levels (L0–L2) before planning and loads a clip whenever its current sub-goal needs more detail.

The agent follows a "coarse-to-fine" strategy. Before acting, it reads $L_0$ through $L_2$ to ground its plan. During execution, it "re-enters" the hierarchy to request specific $L_3$ clips only when it reaches a critical sub-goal or when a step goes wrong. This recursive access keeps the LLM's context window manageable while providing high-detail information exactly when it is relevant.

Datasets

The authors evaluated RV-ICL on two challenging benchmarks based on the LIBERO suite:

  • LIBERO-PRO: Focuses on distribution shifts, including instruction redirection (changing the goal) and position swaps of objects.
  • LIBERO-Plus: Tests robustness across seven dimensions of perturbation, such as changes in lighting, background, camera viewpoint, and sensor noise.

They specifically highlighted results on LIBERO-10, the longest-horizon suite in the benchmark, which requires chaining multiple complex sub-tasks.

Key Insights and Ideas

  • Demonstration as a Queryable Tool: Rather than forcing the model to "watch" the whole video upfront, the authors provide the agent with read-only tools (view_task_video, view_demo_clip). This allows the agent to decide what information is worth its "context budget."
  • The "Right Part at the Right Time": Ablation studies showed that providing the full video actually decreased performance compared to text-only baselines because the model got lost in the noise. RV-ICL’s hierarchy acts as an index that helps the model find the signal.
  • Failure Diagnosis via Re-entry: One of the most powerful "aha moments" is how the agent uses the hierarchy to recover. If a grasp fails, the agent can explicitly call for the "grasp moment" clip from the demonstration, compare it to its own failed attempt, and adjust its approach (e.g., "the demonstrator grabbed the handle further to the left").
An example of an agent diagnosing a failed grasp by re-entering the hierarchy to view the successful demonstration clip.

Key Results

  • Overall Success: On LIBERO-PRO, RV-ICL raised the success rate of the state-of-the-art HarnessVLA from 92.6% to 96.5%. On LIBERO-Plus, it improved success from 86.7% to 95.8%.
  • Long-Horizon Tasks: The gains were most dramatic in the LIBERO-10 suite, where RV-ICL outperformed the baseline by up to 12 percentage points.
  • Robustness: The method proved highly resilient to environmental changes. For instance, under "changed lighting" conditions, success jumped from 76.5% to 94.1%. This suggests that learning the relative motion and contact points from a video is more robust than relying on absolute coordinates or text descriptions.

Limitations and Future Work

  • Sub-event Detection: The current system relies on gripper and joint states to segment the video into phases. This works for pick-and-place but might fail for "continuous" tasks like wiping a table or pouring liquid, which would require more sophisticated VLM-based segmenters.
  • Context Growth: While recursive access saves context initially, every retrieved clip stays in the context for the rest of the episode. For extremely long tasks with dozens of re-entries, the context cost could still become prohibitive.
  • Single Demonstration: The system currently assumes one successful demonstration is available. Future work could explore how to navigate multiple, potentially conflicting demonstrations or how to handle demonstrations that only partially overlap with the current goal.

Summary updated

BibTeX
@misc{bao2026recursive,
  author = {Wenrui Bao and Xinxin Liu and Bingxin Xu and Yuzhang Shang},
  title = {{Recursive Video In-Context Learning for Agentic Robot}},
  year = {2026},
  eprint = {2610.06843},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.06843},
}
Figure