---
title: 'GaP: A Graph-as-Policy Multi-Agent Self-Learning Harness For Variational Automation Tasks'
authors: ['Kaiyuan Chen', 'Shuangyu Xie', 'Letian Fu', 'Justin Yu', 'William Pacini', 'Sandeep Bajamahal', 'Hudson Kim', 'Jaimyn Drake', 'Daehwa Kim', 'Haoru Xue', 'Jonathan Francis', 'Christian Juette', 'Peter Schaldenbrand', 'Muhammet Yunus Seker', 'Ruwan Wickramarachchi', 'Uksang Yoo', 'Guanzhi Wang', 'Adithyavairavan Murali', 'Balakumar Sundaralingam', 'S. Shankar Sastry', 'Yuke Zhu', 'Linxi "Jim" Fan', 'Spencer Huang', 'Ken Goldberg']
date: 2026-11-05
categories: ['cs.RO', 'cs.AI', 'cs.CL', 'cs.LG']
tags: ['multi_agent']
source_id: '2607.05369'
source_url: 'https://arxiv.org/abs/2607.05369'
description: 'For robots to work reliably in commercial and industrial applications, recent advances in agentic coding systems have potential to combine interpretable robot programming with the open-world...'
keywords: ['cs.RO', 'cs.AI', 'cs.CL', 'cs.LG', 'Graph-as-Policy', 'Multi-Agent', 'Self-Learning']
canonical: 'https://dailyreading.cc/records/arxiv_2607.05369'
---
# GaP: A Graph-as-Policy Multi-Agent Self-Learning Harness For Variational Automation (VA) Tasks
Kaiyuan Chen3*,*∗ Shuangyu Xie3*,*∗ Letian Fu3 Justin Yu3 William Pacini3 Sandeep Bajamahal3 Hudson Kim3 Jaimyn Drake3 Daehwa Kim3 Haoru Xue3 Jonathan Francis1 Christian Juette1 Peter Schaldenbrand1 Muhammet Yunus Seker1 Ruwan Wickramarachchi1 Uksang Yoo3 Guanzhi Wang2 Adithyavairavan Murali2 Balakumar Sundaralingam2 S. Shankar Sastry3 Spencer Huang2 Yuke Zhu2 Linxi "Jim" Fan2 Ken Goldberg3 1 Bosch 2 NVIDIA 3 University of California, Berkeley ∗ equal contribution

Figure 1: GaP system architecture. Given a "Variational Automation (VA)" task specification, GaP uses a multiagent harness for coding tools such as Claude [1](#page-11-0) and Gemini [2](#page-11-0) to automatically generate computation graphs that include "skill" nodes from a Modular Open Robot Skill Library (MORSL), which includes model-based procedures (e.g. ROS [3](#page-11-0)) and model-free policies (e.g. GraspGen [4](#page-11-0)). GaP then orchestrates self-learning using simulation (e.g. RoboSimStudio [5](#page-11-0)) to iteratively refine the graph, which can then be interpreted without the agents on an edge device for persistent execution over time. Bottom: 8 Variational Automation Benchmark Tasks (4 Sim and 4 Real).
Abstract: For robots to work reliably in commercial and industrial applications, can recent advances in agentic coding systems combine interpretable robot programming with the open-world adaptability of model-free policies? We focus on "Variational Automation" (VA), a class of tasks that have larger variations in object geometry and pose than fixed automation. Model-free policies often struggle to close the reliability gap for VA tasks, which must be executed persistently and reliably in commercial and industrial applications. Motivated by prior work on Task and Motion Planning (TAMP) and the Robot Operating System (ROS), we introduce Graph-as-Policy (GaP), a multi-agent coding harness that generates directed computation graphs with perception, planning, and control nodes from a Modular Open Robot Skill Library (MORSL). GaP then generates an internal simulation environment to rehearse task instances with different graphs in parallel to iteratively refine the graph structure and parameters to improve success rates and throughput. Evaluation with 8 new open VA task benchmarks, 4 in
simulation and 4 in real-world, suggests that GaP can achieve success rates that significantly outperform baselines. Details, code, and data will be posted online:
Keywords: Agentic Coding, Automation, Self-Learning
## 1 Introduction
A majority of robot learning research focuses on generalist robotics, where a robot must perform a broad variety of tasks. Most of this research has focused on model-free end-to-end Vision-Language-Action (VLA) models [6,](#page-11-0) [7,](#page-11-0) [8,](#page-11-0) [9,](#page-11-0) [10,](#page-11-0) [11](#page-11-0). However, fully generalist robots struggle to achieve commercial / industrial levels of reliability [12](#page-11-0) and there is increasing interest in how robot learning could be useful for more specialized task classes [13](#page-11-0). In this paper, we identify a class of "Variational Automation (VA)" tasks that differ from "fixed automation" (which blindly repeats the same motions, e.g., spot welding or spray painting). In VA tasks, a robot persistently performs varying instances of a task with non-trivial variation in the geometry and pose of objects (e.g., to sort packages, make coffee in a cafe, or build sandwiches in a commercial kitchen). Today, fixed automation in logistics, service, agriculture, and manufacturing [14,](#page-11-0) [15,](#page-12-0) [16,](#page-12-0) [17](#page-12-0) is set up and tuned by humans using rigorous, classical engineering methods. This provides high reliability and throughput, and human effort can be justified when amortized over years of repetitive performance. However, even more human effort is required to set up and tune VA systems for reliable performance.
Recent advances in Large Language Models (LLM) [18,](#page-12-0) [19,](#page-12-0) [20](#page-12-0) and Vision-Language Models (VLM) [21,](#page-12-0) [22,](#page-12-0) [23,](#page-12-0) [24,](#page-12-0) [25](#page-12-0) are rapidly improving agentic coding [26](#page-12-0), semantic reasoning [27](#page-12-0) and zero-shot generalization [28](#page-12-0). Agentic coding for robotics has the potential to integrate modelbased and model-free paradigms to rapidly generate interpretable and reliable robot control systems. Agentic coding is new and advancing rapidly, but remains prone to hallucinations and constraint violations. Thus, a primary challenge is to develop effective methods for "steering" coding agents to produce desired outputs. Coding agents are controlled with a "harness" – a body of text provided as a prompt to the agents that describe available software resources, constraints, and performance metrics [29](#page-12-0). The harness also provides interfaces that allow the LLM to compile, execute, and manage generate-execute-observe-evaluate loops.
The use of LLM coding agents for robotics was explored as early as 2022 with a series of papers on Code-as-Policy (CaP) [30,](#page-13-0) [31](#page-13-0). General coding agents have improved dramatically since then by training on increasingly large coding datasets. The recent CaP-X paper provides an open suite of CaP benchmarks, agents, and encouraging results using coding agents that were state-of-the-art as of January 2026 [32](#page-13-0). These single-agent CaP approaches are somewhat unstructured, prompting the coding agent to generate free-form python code. For more complex tasks, the context window can grow sufficiently large so that it is difficult for the agent to obey constraints and converge on reliable code. Individual agents are also prone to hallucinations and "cheating", where they make up nonexistent skills or create trivial success metrics to artificially "solve" robot coding tasks. These challenges are exacerbated with *multi-agent* coding systems, where multiple agents operate in parallel.
To address these issues, we propose Graph-as-Policy (GaP), a harness structure that encapsulates modular robot functions into independent "nodes" in a directed graph that can be managed by a hierarchical multi-agent system where optimizing each node can be assigned to a specific agent. This structure also helps limit the size of each agent's context window and separates the graph generation from the graph testing to reduce incentives for individual coding agents to "cheat" in order to achieve requested objectives. GaP is inspired in part by the architecture of robot Task and Motion Planning (TAMP) systems [33,](#page-13-0) [34,](#page-13-0) [35](#page-13-0) which use graphical hierarchies to ensure safety and the Robot Operating System (ROS)[3](#page-11-0) which is based on a computation graph structure. Graphical models support modularity, reuse, and composability of functions in non-robotic and robotic applications. In GaP, a robot policy is a computation graph composed of atomic "skill" nodes, such as retrieving a camera frame, running inference on a perception model, or planning and executing a motion trajectory.
Given a VA task description, GaP starts with an Orchestration Agent that partitions a VA task into functional segments and instructs appropriate Skill Agents to synthesize localized, functional subgraphs of atomic nodes for its assigned segment. The orchestrator then aggregates and wires these subgraphs together into an executable computation graph. GaP then initiates a multi-agent self-learning harness that coordinates LLM and VLM agents to autonomously generate, simulate, evaluate, robot computation graphs in a loop with sampled task instances to increase a weighted combination of success rate and throughput until the combination reaches a plateau. The resulting computation graph is then sent to an edge-based graph interpreter for repeated execution on the robot.
To evaluate GaP, we present 8 new open VA benchmarks. The first 6 – based loosely on persistent commercial applications – are (I-a,b) Fulfill Grocery Orders, (II-a,b) Pack Grocery Items, and (III-a,b) Make Popcorn, where 'a' is in sim and 'b' is in real. These 6 ongoing tasks use common kitchen items and one Franka robot arm from the LIBERO [36](#page-13-0) benchmark. The other two VA benchmarks – based loosely on datacenter and industrial applications – are (IV) Insert USB-C Cables, and (V) Wash Crates. Results suggest that GaP can achieve success rates that significantly outperform baselines, including *π*0*.*5 [10](#page-11-0) and MolmoAct2 [9](#page-11-0).
This paper makes the following contributions: (1) the VA task class for robot learning with 8 open VA benchmarks; (2) a computation graph structure for agentic robotics; (3) GaP, an implemented multi-agent harness that autonomously decomposes natural language specifications to collaboratively generate robot computation graphs; (4) an open, evolving Modular Open Robot Skill Library (MORSL) with 51 initial skills; (5) a self-learning approach to graph rehearsal and optimization using internal simulations built with RoboSimStudio [5](#page-11-0); and (6) Experimental data comparing GaP with TAMP, model-free, and other baselines and simulations on the first 6 VA benchmarks, and performance results from GaP on the other 2 VA benchmarks.
## 2 Related Work
Variational Automation. The term "automation" is commonly used to describe robot systems that persistently perform repetitive tasks over hours, weeks, months, or years for logistics, manufacturing, healthcare, service, agriculture, and other applications. To be successful, commercial and industrial automation must achieve desired throughput (units per hour: success rate divided by cycle time) at a cost that will provide a desired return on investment. Accordingly, research in automation extends research in robotics by focusing on reliability, cost, safety, ease of use, and other factors required for successful production deployment.
In this paper, we propose "Variational Automation (VA)" as a class of tasks that differ from Generalist Robotics (GR) and Fixed Automation (FA). In FA, a robot persistently performs identical instances of a task with objects of identical geometry. In box stacking, for example, FA would consist of moving identical boxes from a common initial pose on a conveyor belt into a fixed pallet arrangement. In FA, variations in the environment and object shape and pose are minimal.
For GR, a robot performs a variety of different tasks (e.g., placing groceries into a refrigerator, or domestic cleaning, folding, kitchen pick-and-place) in different homes, where environments vary considerably and objects have variable geometry and highly variable initial poses. Recent robot learning research predominantly targets highly unstructured Generalist Robotics (GR), such as household robots executing diverse chores across novel environments using a single generalist model-free VLA policies [37,](#page-13-0) [38,](#page-13-0) [6,](#page-11-0) [7,](#page-11-0) [10](#page-11-0).
In VA, by contrast, a robot persistently performs varying instances of the task: the boxes have variable geometry (different SKUs), arrive in a distribution of varying initial poses, and must be densely packed into varying pallet arrangements. As most robot learning research focuses on GR, and robot learning may not be required for FA, we focus on robot learning for VA, aiming to reduce the human effort required to set up VA systems.
Modular Robot Control Methods. Early robotic systems programmed policies using classical modular components. The Shakey robot [39](#page-13-0) in the late 1960s decomposed its architecture into 3 functional components: sensing, planning, and execution [40](#page-13-0). System architectures like the Robot Operating System (ROS) [3](#page-11-0) utilize explicit directed graphs to route data, manage dependencies, and ensure reliable execution. Concurrently, Task and Motion Planning (TAMP) [33,](#page-13-0) [34](#page-13-0) approaches jointly solve discrete task planning and continuous motion planning problems, enabling the satisfaction of constraints involving both high-level action sequencing and low-level geometric feasibility. Behavior Trees (BTs) [41](#page-13-0) encode reactive task logic and failure recovery, and recent work shows LLMs can generate BTs with high success rates [42](#page-13-0). GaP combines the typed dataflow topology of the ROS computation graph with the reactive task logic and failure recovery of BTs, enabling (a) static type checking and verification, (b) explicit failure recovery loops, and (c) simulation-guided graph optimization.
Code-as-Policy (CaP) uses agents to write robot control code, suggesting an alternative to manual coding of model-based methods and pure end-to-end learning of model-free policies [30](#page-13-0). Extensions such as ALGARA [43](#page-13-0), CaP-X [32](#page-13-0), CodeDiffuser [44](#page-13-0), GRAPPA [45](#page-13-0), and Maestro [46](#page-13-0) use more recent LLMs to generate robot code. Similarly, systems like TiPToP [35](#page-13-0) incorporate LLMs with classical robot TAMP [47,](#page-14-0) [48,](#page-14-0) [49,](#page-14-0) [50](#page-14-0); TAMP can achieve general open-vocabulary manipulation and transfer to new tasks with minimal tuning, and TiPToP integrates Gemini perception, M2T2 grasp planning, and cuTAMP. GaP explores an alternative modular architecture that specializes a persistent graph to a VA task class.
Code-as-Policy (CaP) is an alternative to manual coding of model-based methods and pure end-to-end learning of model-free policies [30](#page-13-0), ALGARA [43](#page-13-0), and CodeDiffuser [44](#page-13-0) utilized LLMs for openvocabulary script generation to generate robot code. GaP tempers the flexibility of CaP approaches by introducing a graph structure, allowing GaP to harness the open-world adaptivity of pretrained LLM coding agents while maintaining a structured, interpretable graph structure to support persistent Variational Automation.
Self-Improving Agentic Workflows For Robotic Control. Outside of robotics, Large Language Models (LLMs) have demonstrated exceptional capabilities in dynamic coding, complex software integration, and API orchestration [51,](#page-14-0) [18,](#page-12-0) [52,](#page-14-0) [53,](#page-14-0) [1,](#page-11-0) [2](#page-11-0). By embedding these capabilities into structured agentic workflows, LLMs can autonomously synthesize solutions for open-ended tasks [54](#page-14-0). A foundational example is Voyager [55](#page-14-0), which uses LLMs to iteratively write, refine, and execute Minecraft game playing skills to continually expand a curated library of reusable skills. In these frameworks, a "skill" is typically defined as a discrete function with strict semantic contracts. Recent literature has begun to explore the iterative optimization of agentic systems through language-based failure reasoning [56](#page-14-0) and multi-agent prompt optimization frameworks [57,](#page-14-0) [58](#page-14-0).
To improve code generation quality and performance, CaP-X [32](#page-13-0) used a VLM to provide feedback before and after execution (i.e. Visual Differencing), but the VLM can suffer from hallucinations and cannot handle geometric and numerical information such as motion feasibility. Building on the structure of Blox-Net [59](#page-14-0), which uses physical experiments to improve LLM-generated task plans, GaP uses multiple LLM agents to generate a robot computation graph and iteratively improve it using simulation experiments.
## 3 Problem Formulation
Assumptions For Variational Automation tasks that will be repeated over extended periods, we assume the workcell environment, robot, and sensors are known and fixed. Furthermore, we assume the range of potential objects and the range of initial object poses are known. These assumptions are part of the VA setting rather than oracle information: unlike generalist robotics, VA tasks are defined by a known workcell and bounded operating envelope, allowing systems to use object models, calibrated sensors, and reusable automation skills when available. Because object meshes and pose ranges are part of the task input, the internal simulation is instantiated directly from them without scene reconstruction, system identification, or domain randomization.
**Variational Automation Task Class** We formalize a Variational Automation (VA) Task using the tuple $\mathcal{T} = \langle \mathcal{L}, \mathcal{E}, \mathcal{R}, \mathcal{O}, \mathcal{X}, \mathcal{B}, \mathcal{J} \rangle$ :
- £, Language Space: Natural language instructions and semantic descriptors that describe desired task behavior, providing high-level context for decomposing the task into segments.
- $\mathcal{E}$ , is a known stationary workspace environment (e.g., workcell) that establishes world frame $\mathcal{W}$ and occupancy map $\mathcal{M}_E$ , providing the support surfaces that constrain the feasible pose space of all entities to the non-colliding subset of SE(3).
- $\mathcal{R}$ , is the robot and sensor configuration, specifying the robot URDF, joint limits, gripper configuration, camera spec, and camera placement.
- $\mathcal{O}$ , Object Set: The set of all possible objects in the task, comprising both rigid objects $\{o_i\}$ with 3D models $\mathcal{M}_i$ and articulated entities $\{\kappa_j\}$ (e.g., drawers, knobs) with defined kinematic joint limits $[\theta_{\min}, \theta_{\max}]$ .
- $\mathcal{X}$ , State Space: The product space of the robot joint configurations, the SE(3) poses of all rigid objects, and the kinematic states of articulated entities: $\mathcal{X} = \mathcal{C}_{robot} \times SE(3)^n \times \mathbb{R}^m$ .
- $\mathcal{B}$ , Belief Space: Describes the distribution of objects and poses in instances of the task. A specific instance is sampled $\mathbf{x}_i \sim p(\mathbf{x} \mid \mathcal{X})$ , introducing variations such as: (i) *Structured Priors*: Position sampled uniformly over a volume $\mathcal{V}$ ( $\mathbf{x}_i \sim \text{Uniform}(\mathcal{V})$ ) and orientation ranges, and (ii) *Empirical Distributions*: Multi-modal distributions estimated from real-world demonstrations or perception (e.g., point cloud registration).
- $\mathcal{J}$ , Reward function: A multi-objective reward function used to evaluate success and efficiency, defined as: $\mathcal{J} = w_s \cdot \mathbb{I}(\text{success}) + w_t \cdot \Phi$ where $\mathbb{I}(\cdot)$ is the success indicator, $\Phi$ is the throughput (success rate / cycle time), and $w_s$ , $w_t$ are weighting factors.
Given a task $\mathcal{T}$ , a task instance $\tau_i = \langle o_i, x_i \rangle$ is drawn from $\mathcal{O}$ and $\mathcal{B}$ respectively.
**Policy Representation via Directed Execution Graphs** Graph-as-policy (GaP) represents a robot policy $\pi(a \mid \mathbf{x}, \mathcal{T})$ as a directed computation graph $\mathcal{G} = (V, E)$ to complete all task instances $\forall \tau_i = \langle o_i \subseteq \mathcal{O}, x_i \sim \mathcal{B} \rangle \in \mathcal{T}$ . The graph $\mathcal{G}$ consists of modular, atomic functional units called *nodes*, connected by edges that dictate both data flow and execution logic. The components are defined as follows: **Nodes** (V): Each node $n \in V$ represents a functional primitive for manipulation, perception, or a segment of executable code. Each node encapsulates a single, well-defined robotic operation with a typed input/output signature. Nodes can be grouped into **skills**, a natural-language specification that instructs an LLM agent how to configure and compose a set of atomic nodes on the execution graph for a defined sub-task. **Edges** (E): A directed edge $e = (n_i, n_j) \in E$ represents a data or logic dependency. Data edges route a producer node's output to a consumer node's input (e.g., feeding the output of an object-centering node into a planar-surface-orienting node) and implicitly induce execution order through their dependencies; independent branches may execute concurrently. Control edges are condition branches and carry a predicate over node outputs.
**Problem Definition** Given a task class $\mathcal{T} = \langle \mathcal{L}, \mathcal{E}, \mathcal{R}, \mathcal{O}, \mathcal{X}, \mathcal{B}, \mathcal{J} \rangle$ , GaP must synthesize a robust execution graph $\mathcal{G}^*$ that generalizes across the entire belief space $\mathcal{B}$ . Formally, for any task instance $\tau_i \in \mathcal{T}$ and given a real-time scene observation $\mathcal{I}$ (comprising multi-view image sets from static and wrist cameras), the graph executor interprets the computation graph $\mathcal{G}^*$ by invoking its skill nodes and following its data and control edges. This execution induces a closed-loop robot policy $\pi_G(a \mid \mathcal{I})$ , which maps observations and graph state to robot actions in order to achieve the goal state specified by $\mathcal{L}$ . We define the optimized graph $\mathcal{G}^*$ as one that maximizes performance across all instances in the variational class: $\mathcal{G}^* = \arg\max_{\mathcal{G}} \mathbb{E}_{x_i \sim \mathcal{B}} \left[ \mathcal{J}(\pi(a \mid \mathcal{I}, \mathcal{G})) \right]$ .
The optimized graph is then sent to an edge-based interpreter for repeated execution on the robot.
## 4 Graph-as-Policy
The GaP architecture is illustrated in Figure 1. As an example, consider the Make Popcorn VA task. Given a natural language specification and geometric object models, the multi-agent GaP harness
first partitions the high-level objective into semantic segments such as 'turn on the knob', 'pick up the popcorn pan', etc. Next, drawing from the Modular Open Robot Skill Library (MORSL), GaP maps these segments into atomic robotic skills to synthesize an initial computation graph $\mathcal{G}$ . During self-learning, the computation graph is evaluated using an internal simulation to iteratively refine the execution graph topology and node parameters prior to deployment. The optimized robot computation graph is then sent to an external interpreter for repeated execution on the physical robot.
## 4.1 Modular Open Robot Skill Library (MORSL)
The MORSL library uses agentic tool-use conventions (e.g., Anthropic's Skill.md [60]) with extensions for graph declarations. Each skill declares its inputs, outputs, semantic parameters, and pre-conditions, so the agent can decide both when to invoke it and how to wire it into the graph. Examples of the 51 initial MORSL skills include perception (SAM2 [61]/3 [62], Grounding DINO [63], OWL-ViT [64], Molmo [65], general-purpose VLM [23, 66]; 15 skills), grasp planning (Contact GraspNet [67], GraspGen [4], M2T2 [68]; 5 skills), motion planning (cuRobo [69] and cuRobov2 [70]; 8 skills), 2D and 3D vision utilities with NumPy and OpenCV (e.g., DBSCAN for point cloud processing; 15 skills), and 8 additional verification and control primitives including (\*) Cartesian Linear Motion Planning with CuRobo; (\*) Robot Operating System (ROS) Translator; (\*) Visuomotor Interactive Perception Policies. The full catalog can be found in the Appendix A.
## 4.2 Self-Learning through Internal Simulation Rehearsal
To iteratively learn to improve a graph using task instances, we execute the computation graph, provide feedback, update the graph, and iterate. As described in self-learning Algorithm 2, GaP uses RoboSim-Studio [5], an agentic toolkit for physics-1 based simulation of robot manipulation tasks, to instantiate the internal simulation that renders the visualization for the perception nodes, simulates physics, and com-sputes contacts. To generate feedback, GaP 6 registers the robot and object state before and after each rehearsing node, together with contact queries between the robot and specified in self-luming that the computation of the perception nodes, simulates physics, and com-sputes contacts. To generate feedback, GaP 6 registers the robot and object state before and after each rehearsing node, together return $\mathcal{G}^* \leftarrow \mathcal{G}_M$
## **Self-Learning-Algorithm 1** Rehearsal-based Graph Optimization
```
Input: \mathcal{T} = \langle \mathcal{L}, \mathcal{E}, \mathcal{R}, \mathcal{O}, \mathcal{X}, \mathcal{B}, \mathcal{J} \rangle, Iterations M, Parallel Rollouts N
Output: Optimized Task Graph G
Initialization: \mathcal{G}_0 \leftarrow \operatorname{Graph\_Init}(\mathcal{L})
// Initial graph from
language
\mathcal{S} \leftarrow \text{Build\_Scene}(\mathcal{G}, \{\mathcal{G}_i\})
// Instantiate sim environment
\textbf{for } j \leftarrow 1 \textbf{ to } M \textbf{ do}
// Step 1: Scene Variational Sampling
\{\hat{s}_i\}_{i=1}^N \sim \mathcal{B}
// Sample N instances
// Step 2: Parallel Rehearsal
for i \leftarrow 1 to N do in parallel
\tau_i \leftarrow \text{Rehearsal}(\hat{s}_i, \mathcal{G}_{i-1})
// Rollout policy
F_i \leftarrow \text{Analyze Failure}(\tau_i, \mathcal{G}, \{\mathcal{G}_i\})
// Step 3: Graph Refinement
\mathcal{G}_j \leftarrow \text{Graph\_Update}(\{F_1, \ldots, F_N\})
// Optimize via LLM
```
objects, to compute differences and infer the motion outcome. The optimization process begins with task instance sampling, where the system generates N parallel task instances $\{\tau_i\}_{i=1}^N$ . These task instances are instantiated by sampling from the belief space $\mathcal{B}$ , which represents the probability distribution over potential object poses, initial states, and kinematic configurations within the workspace $\mathcal{E}$ . GaP generates the initial graph $\mathcal{G}_0$ through multi-agent harness. Then, a parallel rehearsal starts across these N scenes to evaluate graph performance. In instances where the rollout fails to meet success criteria, GaP analyzes the physical execution data to isolate geometric root causes within the occupancy or articulated entities. The graph is updated by the agents with Graph Update using a typed action set: (1) set a node's declared inputs, such as perception prompts; (2) rewire node inputs and outputs; (3) rewrite an inline Python script, such as format transformations and arithmetic; (4) swap skill nodes; and (5) verify the result with static type checking and simulation. Proposed updates that degrade success rate or cycle time on 100 fresh task instances are rejected, and the loop iterates until performance reaches a plateau or terminates with failure reasons.
## 5 Experiments
## 5.1 Simulation and Real-World Variational Automation Benchmarks
We present 8 VA benchmark tasks, including 4 in simulation and 4 in real-world. Six of these are inspired by LIBERO [36](#page-13-0), the de facto standard for evaluating VLA policies in simulation.
Benchmark (I-a,b): Fulfill Grocery Orders (Sim and Real) Each instance of this task involves locating a designated target item and placing it into the basket. The original LIBERO [36](#page-13-0) benchmark did not vary the position of the (*objects*) which allows for overfitting to the demonstration examples. To address this, the LIBERO-Pro [71](#page-15-0) evaluation suite swaps target and basket object positions at test time (*object swap*). We introduce four extensions for our VA Benchmarks: 1) *X-Y 20*×*20 cm*2 , where the position of each object varies uniformly within a 20×20 *cm*2 zone centered around the original LIBERO object pose; 2) *basket swap*, which swaps the target item and basket location; 3) *permutation*, which swaps target item and distractor item positions; and *mixed all* including all three variation types. The physical benchmark directly mirrors this setup. To avoid object collisions during task instance generation, we utilize Minkowski sum [72](#page-15-0) operations to ensure item singulation. The real version of this benchmarks uses a Franka arm with wrist camera and real items from a grocery store.
Benchmark (II-a,b): Pack Grocery Items (Sim and Real) We modify Benchmark I-a,b to create multi-object pick-and-place tasks, as in a grocery checkout line, where the robot is assigned to pack 6 objects into a container without needing to identify or select any specific items. We quantify the success rate as the number of items (out of 6) placed into the basket after 6 grasping attempts.
Benchmark (III-a,b): Make Popcorn (Sim and Real) We use the LIBERO frypan, stove, and knob assets to create a manipulation task that requires the robot to sequentially turn on a stove, pick up the pan handle, place it on the stove, remove the pan, and turn off the stove. For the real version of this benchmark, we use the Franka Robot arm with wrist-camera, a portable stove from Amazon and Jiffy-Pop popcorn.
Benchmark (IV): Insert USB-C Cables (Real) This benchmark task requires a UR5 robot arm with the ZED Mini wrist camera to execute a series of USB-C cable insertions and extractions in a bank of 7 sockets. The robot uses internal force torque feedback to probe the insertion when the target port goes beyond the camera's field of view. The benchmark includes two varying conditions. First, we vary the pose of the cable ports, testing three distances in 5 *cm* increments and three angles in 15° increments. Second, we vary the text prompt to specify five distinct goals: targeting individual ports, inserting in ascending order, descending order, odd-indexed ports, and even-indexed ports.
Benchmark (V): Wash Crates (Sim) This simulation benchmark simulates a real industrial cratewashing use case where two Franka robot arms must cooperatively grasp a crate by narrow slits on its sides, lift it off a stack, flip it, and place it onto a washing machine table. Each instance varies the initial pose of the crate, varying yaw rotations of up to ±15◦ and horizontal displacements of up to ±2*.*5 *cm*. The benchmark provides a language instruction *"Cooperatively lift the top crate off the stack with both Franka arms, flip it over, and place it on the washing machine table,"*. (Fig. [6\)](#page-10-0).
## 5.2 Baselines
Each cell in Table 1 represents the outcome from trials with 100 task instances of Benchmarks I-a and II-a (in simulation) for a total of over 5000 simulation trials. We run CaP-X [32](#page-13-0) which uses a single agent and is given only an image of the initial task instance and natural language instructions. We note that this is not a fair comparison as GaP is designed for Variational Automation where environment geometry is known (but object location is unknown), so the performance of CaP-X serves as an ablation of GaP with a single agent and without self-learning. We evaluate VLA models *π*0*.*5 [10](#page-11-0) and MolmoAct2 [9](#page-11-0) with official checkpoints finetuned on the LIBERO training dataset. We also evaluate TipTop [35](#page-13-0), a modular open-vocabulary planning system for robotic manipulation based on TAMP. We configure this from the github code with the default configuration of 128 particles for
Table 1: Success Rates for 5500 trials, 100 task instances per table cell. Results on Benchmarks I-a and II-a: Fulfill Grocery Orders and Pack Grocery Items. The first two columns are the original LIBERO [36](#page-13-0) with negligible pose variation, and LIBERO-PRO with slightly larger pose variation [71](#page-15-0) . We introduce the VA Grocery Order Fulfillment benchmark that includes larger object positional variance (X-Y 20×20 *cm*2 ), swapping target and basket positions (basket swap), permuting all item locations, and everything combined (mixed all). We also introduce the Grocery Packing benchmark that requires picking all objects and placing them in the basket. In rows 5 and 6, GaP navigates the robot wrist camera above the target object and then switches to MolmoAct2 and *π*0*.*5 VLA policies.
| | LIBERO | LIBERO-Pro | Fulfill Grocery Orders | | | Pack Grocery Items | | |
|-----------------|--------|-------------|------------------------|-------------|-------------|--------------------|-------|--------|
| Method | object | object swap | X-Y 20×20 cm2 | basket swap | permutation | mixed all | fixed | varied |
| CaP-X | - | 0.22 | 0.07 | 0.05 | 0.11 | 0.10 | 0.01 | 0.01 |
| π0.5 | 0.96 | 0.24 | 0.78 | 0.15 | 0.20 | 0.20 | 0.17 | 0.18 |
| MolmoAct2 | 0.97 | 0.43 | 0.90 | 0.26 | 0.10 | 0.20 | 0.18 | 0.18 |
| TipTop | 0.22 | 0.22 | 0.29 | 0.24 | 0.31 | 0.24 | 0.34 | 0.46 |
| π0.5 w/GaP | 0.85 | 0.60 | 0.79 | 0.32 | 0.50 | 0.39 | 0.67 | 0.66 |
| MolmoAct2 w/GaP | 0.70 | 0.62 | 0.84 | 0.58 | 0.39 | 0.66 | 0.59 | 0.59 |
| GaP | 0.95 | 0.95 | 0.95 | 0.97 | 0.93 | 0.97 | 0.99 | 0.98 |
cuTAMP [73](#page-15-0) with a 60-second planning timeout. We warm up the cuTAMP cache before measuring the execution time. Rows 5 and 6 represent combinations of GaP with VLA models, where GaP generates an initial robot motion to center the wrist camera over the target object (bringing the VLA into distribution).
For GaP and CaP-X, we use Gemini-3.1-Flash-Lite for LLM agents and VLM with a temperature of 0.1. For Benchmarks I and II, GaP does not perform self-learning because the first graph generated achieves high performance.
## 5.3 Benchmarks I and II: Fulfill Grocery Orders and Pack Grocery Items
## 5.3.1 Simulation Results
GaP achieves significantly better positional robustness compared to baselines. As shown in Table 1, while baseline VLA models (*π*0*.*5, MolmoAct2) achieve high success rates on LIBEROobject without pose variation, their performance drops as low as 0.20 for LIBERO-PRO with positional variance. In contrast, GaP maintains robust success rates across all variations. We find that TipTop [35](#page-13-0) cannot generate motion plans for many of these benchmark task instances because M2T2 [68](#page-15-0), cuRobo [69](#page-15-0), and cuTAMP [73](#page-15-0) cannot plan feasible solutions.
VLA policies can benefit from GaP. Performance for *π*0*.*5 w/GaP and MolmoAct2 w/GaP suggest that GaP can enhance robustness of existing VLA models as shown in rows 5 and 6 of Table 1. As VLA policies struggle with positional perturbation of target objects, GaP uses the wrist camera and interactive perception skills to reliably identify the target object and uses linear cartesian motion skills to navigate the arm and wrist camera to a pre-grasp pose above the target object. The GaP computation graph then hands over execution to the VLA policy, staging it from a more favorable observation and producing more than a twofold improvement in success rates.
Table 2: Physical Benchmark on Benchmarks I-b, II-b, and III-b. We report success rate and completion time. Sub-tasks (→) are reported per benchmark. On average, the completion time of single pick-and-place for TipTop is 95 seconds, and GaP is 67 seconds.
| Success Rate | TipTop | GaP |
|------------------------|--------|-------|
| Fulfill Grocery Orders | 8/25 | 25/25 |
| → object | 3/5 | 5/5 |
| → 20x20 | 2/5 | 5/5 |
| → basket swap | 1/5 | 5/5 |
| → tall basket | 0/5 | 5/5 |
| → permutation | 2/5 | 5/5 |
| Pack Grocery Items | 10/30 | 28/30 |
| Make Popcorn | 0/20 | 18/20 |
#### 5.3.2 Real Physical Experiment Results
GaP transfers well from Sim to Real. As shown in Table 2, for the Fulfill Grocery Orders benchmark, GaP achieves a perfect
success rate of 25/25 (100%), while TipTop succeeds in only 8/25 trials. Both GaP and TipTop accurately identify the objects. However, TipTop [35](#page-13-0) fails because M2T2 [68](#page-15-0), cuRobo [69](#page-15-0), and cuTAMP [73](#page-15-0) combined cannot find feasible motion plans for cubic-shaped objects, tall baskets, or varied object orientations. In terms of execution time, GaP perceives the item and basket in parallel
using 14.1 seconds to generate oriented bounding boxes, and 36.4 seconds for descending, grasping, and transporting the items.
#### 5.4 Ablation Studies
For Fulfilling Grocery Orders and Packing Grocery Items, the full GaP system achieves robust success rates (0.93–0.99). We ablate as follows: (1) Graphless generation forces the LLM to perfectly inline low-level service interfaces, such as method names and request schemas, from memory. Consequently, even when the high-level logic is correct, minor syntax or interface mismatch errors inevitably terminate the trial. So replacing the structured graph output with a single LLM that generates raw Python scripts collapses the success rate to zero. (2) Condensing GaP's specialized authoring agents into a single LLM also drops success rates to zero, with all trials failing static structural verification prior to execution, because a single LLM agent struggles to simultaneously manage global data flow, local logic, and verification, frequently introducing dangling references or node collisions. Furthermore, even with iterative feedback, a single LLM tends to oscillate between mistake classes without converging. (3) Graph validation improves graph connectivity. For each configuration in Fulfill Grocery Orders, some task segmentation agents emit a first-attempt subgraph that fails static type/edge checks and would crash at runtime, for example, some graphs wire the input and output of the transport phase in drop-pose computation to the release phase and other is in checkpoint verification. GaP's graph validation verifies the wiring and effectively ensures the graph edge connectivity.
## 5.5 Benchmark III a, b: Make Popcorn in sim and real
The Make Popcorn task requires the robot to grasps the stove knob and rotate it to turn on the burner, then the robot must find and pick up the handle of the JiffyPop popcorn pan, place it on the stove burner, wait, and then turn off the stove.

GaP generates a graph using GraspGen [4](#page-11-0), knob turning skills and other object localization and grasping skills from Benchmark 1 and 2. The
Figure 2: Self-Learning for Making Popcorn Benchmark. Pan pose variations (left) drive a 10-iteration sequence of graph updates; (blue, left axis) iteration phases shaded by class of edit.
initial graph is able to turn on and off the knob but unable to pick and place the pan properly with only a 33% success rate.
Self-Learning significantly increases success rate. As shown in the Fig. 2, self-learning proceeds through three stages: (1) from iteration 1 to 3, the majority of failures come from pan grasping failure, where the simulator feedback reports that the Franka gripper is not in contact with the object pan, so GaP replaces the GraspGen grasp skill with a skill that mixes GraspGen with an oriented bounding box grasp planner. (2) In iteration 4, GaP recognizes that the pan should be grasped by the handle, thereby adjusting the perception algorithm prompts to localize the pan handle. (3) In iterations 4-8, GaP finetunes the offset of pan placement due to the changed grasping strategy to align the pan with the stove surface.
The resulting policy achieves 94% in simulation with variations in pan position and orientation, and achieves a 90% (18/20) success rate in real physical trials as shown in Table [2.](#page-7-0) The two physical failures resulted from one inverse kinematics (IK) error during linear Cartesian motion, and one misgrasp caused by accumulated kinematic error.
#### 5.6 Self-Learning to Reduce Cycle Time
Since GaP saturates the success rate on Benchmarks I–III, we additionally run self-learning with the throughput term of J to reduce cycle time. As shown in Fig. [3](#page-9-0) and Table [3,](#page-9-0) the LLM agent reduces cycle time by up to 57% with no success rate trade-off. It adjusts perception algorithms

Figure 3: Self-Learning for Cycle Time on Benchmarks I–III. Per-iteration cycle time (left axis) and success rate (right axis). Accepted graph updates are colored by edit class: perception (blue), motion parameters (green), and graph topology (purple); updates that degrade success rate or cycle time on 100 fresh task instances are rejected.
Table 3: Success rate and throughput before and after self-learning on Benchmarks I–III (simulation). TiPToP w/ MORSL replaces TiPToP's perception and grasp planning with MORSL skills.
| | | Success Rate ↑ | | | | Throughput (cycles/hr) $\uparrow$ | | |
|---------------------------|--------|--------------------|------------------|------------------|------------------|-----------------------------------|--|--|
| Benchmark | ТіРТоР | TiPToP
w/ MORSL | GaP
(Initial) | GaP
(Learned) | GaP
(Initial) | GaP
(Learned) | | |
| I. Fulfill Grocery Orders | 0.24 | 0.53 | 0.97 | 0.97 | 49.7 | 124.1 | | |
| II. Pack Grocery Items | 0.34 | 0.60 | 0.97 | 0.97 | 7.3 | 16.2 | | |
| III. Make Popcorn | 0.00 | 0.00 | 0.33 | 0.94 | 30.5 | 76.6 | | |
(e.g., using a cheaper detector for the basket), tunes motion parameters (e.g., control settling steps), and modifies graph topology (e.g., reusing perception results across nodes); proposals that degrade success rate or cycle time on 100 fresh task instances are rejected by the internal simulation. Table 3 also reports TiPToP equipped with MORSL perception and grasp planning skills: TAMP benefits from the higher-quality MORSL skills, while GaP further improves performance with flexible motion primitives and self-learning. In terms of practical cost, graph generation takes fewer than 30 LLM calls to Gemini (about \$0.01 and 1 s latency); self-learning wall-clock time is dominated by simulation (about 15 minutes per iteration and up to 150 minutes in total for Make Popcorn); and no agent is involved once the graph is deployed.
#### 5.7 Benchmark IV: Insert USB-C Cables (Real)

Figure 4: Seven-ports cable insertion setup.
Table 4: USB-C Cable insertion variations and results over 130 total insertion trials. Success rates (SR) and execution time in seconds (ET). \*Excludes extraction phase.
| Variation | SR (Per trial) | SR (All) | ET (All) |
|------------------|-------------------|----------|----------|
| In: | sertion Goal Con | dition | |
| Individual port* | 5/5 | - | 26.0 |
| Ascending order | 32/35 | 2/5 | 247.0 |
| Descending order | 32/35 | 4/5 | 223.2 |
| Odd index port | 20/20 | 5/5 | 136.8 |
| Even index port | 14/15 | 4/5 | 104.6 |
| | Position/Orientat | ion | |
| -15°* | 4/5 | - | 24.0 |
| 15°* | 5/5 | - | 25.6 |
| -5 cm* | 5/5 | - | 29.4 |
| 5 cm* | 4/5 | - | 28.0 |
For cable insertion benchmark evaluation, we utilize the computation graph generated by GaP, which operates via four modular ROS execution nodes: align to port, touch port, insert, extract. The robot first aligns to establish contact, generating a $1 \times 1$ cm2 grid of insertion candidates. The insert node then evaluates these positions, requiring >3 mm of progress at <10.0 N of force, and confirms successful insertion when the depth exceeds 6 mm at 30.0 N. Finally, the extract node safely pulls the cable using a 2.0 Hz wiggling motion while maintaining lateral forces below 20.0 N. This entire policy requires approximately 30 seconds per insertion.
**GaP** provides flexibility to integrate with ROS nodes for robust, accurate task completion. Across 130 insertion trials, GaP achieved a 0.93 success rate (121/130). A detailed breakdown is

Figure 5: Left: ROS computation graph that is hand-engineered using traditional ROS nodes and topics. Middle: GaP can leverage nodes in ROS and generate a compatible graph using atomic skill sets, align to port, touch port, insert, and extract. Right: GaP can also use these nodes inside a subgraph for a long-horizon task, such as inserting the cable into even-numbered ports.
provided in Table [4.](#page-9-0) GaP generated the correct workflows for all five text prompts, successfully handling long-horizon tasks with variations in position and orientation. Through this integration with ROS, GaP ensures both robust task execution and strong generalization across diverse positional variations and goal conditions. Some of the corresponding graphs generated by GaP are shown in Figure [B.1.](#page-17-0)
#### 5.8 Benchmark V: Wash Crates (Simulation)
We compare GaP with a hand-engineered execution graph authored by an expert, representing the conventional manual engineering effort required in such settings. We run both policies over 150 trials sampled from the pose distribution, and additionally measure sustained throughput over a 3-hour continuous execution window.
GaP closely matches an expert hand-engineered solution. As reported in Table 5, GaP achieves a 0*.*953 (143*/*150) success rate against the hand-engineered graph's 0*.*987 (148*/*150), with similar average cycle times (179*.*13 s vs. 176*.*47 s). Over the 3-hour throughput run both policies attempted 59 trials, of which GaP completed 55 and the hand-engineered graph 58, corresponding to 18*.*33 and 19*.*33 successes per hour, respectively. These results suggest that GaP can autonomously produce coordinated bimanual policies whose reliability and throughput approach those of a manually hand-tuned baseline.
Table 5: Wash Crates benchmark, 150 trials. Success rate (SR), average cycle duration (s), and sustained throughput (successes/hr) over a 3-hour continuous run.
| Method | SR | Avg(Dur) | Throughput |
|-----------------|------|----------|------------|
| Hand-Engineered | 0.99 | 176 | 19 |
| GaP | 0.95 | 179 | 18 |
| | | | |
Table 6: Industrial crate-washing setup.
## 6 Conclusion
Agentic robotics has potential to build on rapidly-advancing LLM models to provide a bridge between Good Old Fashioned Engineering (GOFE) and model-free VLA policies. As shown in the Ablation experiments, GaP's graph-structured agentic robotics facilitates modularity, multi-agent integration, and self-learning. As robot applications become more complex and skill libraries grow, more sophisticated agent harnessing will be required.
Limitations. Although in experiments, GaP improves success rates significantly over baselines, execution reliability is not yet at industry levels and additional self-learning and parameter tuning is required. Similarly, GaP execution times are still well below industry standards of 500 units per hour (7 seconds per instance); more work is required to reduce VLM inference requests and IK motion planning time during execution. Also, the 8 VA benchmarks focus on quasi-static pick-and-place
operations – only Cable Insertion (IV) requires force sensing. More work is required to apply GaP to tasks with deformable objects, dynamic forces, and moving targets.
## References
- [1] Anthropic. Claude 3.5 Sonnet. , June 2024.
- [2] K. Kavukcuoglu. Gemini 2.5: Our most intelligent AI model. [https://blog.google/](https://blog.google/technology/google-deepmind/gemini-model-thinking-updates-march-2025/) [technology/google-deepmind/gemini-model-thinking-updates-march-2025/](https://blog.google/technology/google-deepmind/gemini-model-thinking-updates-march-2025/), Mar. 2025.
- [3] S. Macenski, T. Foote, B. Gerkey, C. Lalancette, and W. Woodall. Robot operating system 2: Design, architecture, and uses in the wild. *Science robotics*, 7(66):eabm6074, 2022.
- [4] A. Murali, B. Sundaralingam, Y.-W. Chao, J. Yamada, W. Yuan, M. Carlson, F. Ramos, S. Birchfield, D. Fox, and C. Eppner. Graspgen: A diffusion-based framework for 6-dof grasping with on-generator training. In *Proceedings of the IEEE International Conference on Robotics and Automation (ICRA)*. IEEE, 2026.
- [5] K. Chen, S. Xie, U. Yoo, X. Zhu, C. Magner, A. Zhu, D. Kim, E. Heiden, E. Coumans, M. Macklin, S. Huang, and K. Goldberg. RoboSimStudio: An interactive toolkit for rapid Real2Sim of robot manipulation tasks. *arXiv preprint arXiv:2610.18835*, 2026. URL [https:](https://arxiv.org/abs/2610.18835) [//arxiv.org/abs/2610.18835](https://arxiv.org/abs/2610.18835).
- [6] M. Kim, K. Pertsch, S. Karamcheti, T. Xiao, A. Balakrishna, S. Nair, R. Rafailov, E. Foster, G. Lam, P. Sanketi, Q. Vuong, T. Kollar, B. Burchfiel, R. Tedrake, D. Sadigh, S. Levine, P. Liang, and C. Finn. Openvla: An open-source vision-language-action model. *arXiv preprint arXiv:2406.09246*, 2024.
- [7] P. I. Team. *π*0: A vision-language-action flow model for general robot control. *arXiv preprint arXiv:2410.24164*, 2024.
- [8] O. X.-E. Co-Authors. Open X-Embodiment: Robotic learning datasets and RT-X models. In *2024 IEEE International Conference on Robotics and Automation (ICRA)*, pages 6892–6903. IEEE, 2024.
- [9] H. Fang, J. Duan, D. Clay, S. Wang, S. Liu, W. Huang, X. Fan, W.-C. Tsai, S. Chen, Y. R. Wang, et al. Molmoact2: Action reasoning models for real-world deployment. *arXiv preprint arXiv:2605.02881*, 2026.
- [10] K. Black, N. Brown, J. Darpinian, K. Dhabalia, D. Driess, A. Esmail, M. R. Equi, C. Finn, N. Fusai, M. Y. Galliker, et al. *π*0*.*5: a vision-language-action model with open-world generalization. In *9th Annual Conference on Robot Learning*, 2025.
- [11] M. Zawalski, W. Chen, K. Pertsch, O. Mees, C. Finn, and S. Levine. Robotic control via embodied chain-of-thought reasoning. In *Conference on Robot Learning*, pages 3157–3181. PMLR, 2025.
- [12] J. Gao, S. Belkhale, S. Dasari, A. Balakrishna, D. Shah, and D. Sadigh. A taxonomy for evaluating generalist robot manipulation policies. *IEEE Robotics and Automation Letters (RA-L)*, 2026.
- [13] K. Goldberg. Should robot generalists get off their high horse?, 2026. Available online.
- [14] E. Solowjow, I. Ugalde, Y. Shahapurkar, J. Aparicio, J. Mahler, V. Satish, K. Goldberg, and H. Claussen. Industrial robot grasping with deep learning using a programmable logic controller (plc). In *2020 IEEE 16th International Conference on Automation Science and Engineering (CASE)*, pages 97–103, 2020. [doi:10.1109/CASE48305.2020.9216902.](http://dx.doi.org/10.1109/CASE48305.2020.9216902)
- [15] S. Adebola, T. Sadjadpour, K. El-Refai, W. Panitch, Z. Ma, R. Lin, T. Qiu, S. Ganti, C. Le, J. Drake, and K. Goldberg. Automating deformable gasket assembly. In *2024 IEEE 20th International Conference on Automation Science and Engineering (CASE)*, pages 4146–4153. IEEE, 2024.
- [16] S. Xie, K. Goldberg, and D. Song. Energy efficient planning for repetitive heterogeneous tasks in precision agriculture. In *2025 IEEE International Conference on Robotics and Automation (ICRA)*, pages 7139–7145, 2025. [doi:10.1109/ICRA55743.2025.11128083.](http://dx.doi.org/10.1109/ICRA55743.2025.11128083)
- [17] S. Adebola, R. Parikh, M. Presten, S. Sharma, S. Aeron, A. Rao, S. Mukherjee, T. Qu, C. Wistrom, E. Solowjow, and K. Goldberg. Can machines garden? systematically comparing the alphagarden vs. professional horticulturalists. In *2023 IEEE International Conference on Robotics and Automation (ICRA)*, pages 11779–11785, 2023. [doi:10.1109/ICRA48891.2023.](http://dx.doi.org/10.1109/ICRA48891.2023.10161497) [10161497.](http://dx.doi.org/10.1109/ICRA48891.2023.10161497)
- [18] Q. Team. Qwen3. 5-omni technical report. *arXiv preprint arXiv:2604.15804*, 2026.
- [19] A. Yang, A. Li, B. Yang, B. Zhang, B. Hui, B. Zheng, B. Yu, C. Gao, C. Huang, C. Lv, et al. Qwen3 technical report. *arXiv preprint arXiv:2505.09388*, 2025.
- [20] D. Guo, D. Yang, H. Zhang, J. Song, P. Wang, Q. Zhu, R. Xu, R. Zhang, S. Ma, X. Bi, et al. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. *arXiv preprint arXiv:2501.12948*, 2025.
- [21] A. Radford, J. W. Kim, C. Hallacy, A. Ramesh, G. Goh, S. Agarwal, G. Sastry, A. Askell, P. Mishkin, J. Clark, G. Krueger, and I. Sutskever. Learning transferable visual models from natural language supervision. In M. Meila and T. Zhang, editors, *Proceedings of the 38th International Conference on Machine Learning*, volume 139 of *Proceedings of Machine Learning Research*, pages 8748–8763. PMLR, 18–24 Jul 2021.
- [22] F. Bordes, R. Y. Pang, A. Ajay, A. C. Li, A. Bardes, S. Petryk, O. Manas, Z. Lin, A. Mah- ˜ moud, B. Jayaraman, et al. An introduction to vision-language modeling. *arXiv preprint arXiv:2405.17247*, 2024.
- [23] G. R. Team, S. Abeyruwan, et al. Gemini robotics: Bringing ai into the physical world, 2025. URL .
- [24] W. Huang, C. Wang, R. Zhang, Y. Li, J. Wu, and L. Fei-Fei. Voxposer: Composable 3d value maps for robotic manipulation with language models. In *Conference on Robot Learning*, pages 540–562. PMLR, 2023.
- [25] C. Ning, K. Fang, and W.-C. Ma. Prompting with the future: Open-world model predictive control with interactive digital twins. In *Proceedings of Robotics: Science and Systems (RSS)*, 2025.
- [26] Anthropic. Claude 3.5 Sonnet. , June 2024.
- [27] K. Chen, S. Xie, Z. Ma, P. R. Sanketi, and K. Goldberg. Robo2vlm: Improving visual question answering using large-scale robot manipulation data. In *The Thirty-ninth Annual Conference on Neural Information Processing Systems Datasets and Benchmarks Track*, 2025.
- [28] Y. Ji, H. Tan, J. Shi, X. Hao, Y. Zhang, H. Zhang, P. Wang, M. Zhao, Y. Mu, P. An, et al. Robobrain: A unified brain model for robotic manipulation from abstract to concrete. *CVPR*, 2025.
- [29] Anthropic. Harness design for long-running application development. [https://www.](https://www.anthropic.com/engineering/harness-design-long-running-apps) [anthropic.com/engineering/harness-design-long-running-apps](https://www.anthropic.com/engineering/harness-design-long-running-apps), Mar. 2026.
- [30] J. Liang, W. Huang, F. Xia, P. Xu, K. Hausman, B. Ichter, P. Florence, and A. Zeng. Code as policies: Language model programs for embodied control. In *2023 IEEE International conference on robotics and automation (ICRA)*, pages 9493–9500. IEEE, 2023.
- [31] G. Yin, Y. Li, Y. Wang, D. Mcconachie, P. Shah, K. Hashimoto, H. Zhang, K. Liu, and Y. Li. CodeDiffuser: Attention-Enhanced Diffusion Policy via VLM-Generated Code for Instruction Ambiguity. In *Proceedings of Robotics: Science and Systems*, LosAngeles, CA, USA, June 2025. [doi:10.15607/RSS.2025.XXI.072.](http://dx.doi.org/10.15607/RSS.2025.XXI.072)
- [32] M. Fu, J. Yu, K. El-Refai, E. Kou, H. Xue, H. Huang, W. Xiao, G. Wang, F.-F. Li, G. Shi, et al. Cap-x: A framework for benchmarking and improving coding agents for robot manipulation. *arXiv preprint arXiv:2603.22435*, 2026.
- [33] L. P. Kaelbling and T. Lozano-Perez. Hierarchical task and motion planning in the now. In ´ *2011 IEEE international conference on robotics and automation*, pages 1470–1477. IEEE, 2011.
- [34] C. R. Garrett, R. Chitnis, R. Holladay, B. Kim, T. Silver, L. P. Kaelbling, and T. Lozano-Perez. ´ Integrated task and motion planning. *Annual review of control, robotics, and autonomous systems*, 4(1):265–293, 2021.
- [35] W. Shen, N. Kumar, S. Chintalapudi, J. Wang, C. Watson, E. S. Hu, J. Cao, D. Jayaraman, L. P. Kaelbling, and T. Lozano-Perez. TiPToP: A modular open-vocabulary planning system for ´ robotic manipulation. *arXiv preprint arXiv:2603.09971*, 2026.
- [36] B. Liu, Y. Zhu, C. Gao, Y. Feng, Q. Liu, Y. Zhu, and P. Stone. Libero: Benchmarking knowledge transfer for lifelong robot learning. *Advances in Neural Information Processing Systems*, 36: 44776–44791, 2023.
- [37] S. Levine, C. Finn, T. Darrell, and P. Abbeel. End-to-end training of deep visuomotor policies. *Journal of Machine Learning Research*, 17(39):1–40, 2016.
- [38] C. Chi, Z. Xu, S. Feng, E. Cousineau, Y. Du, B. Burchfiel, R. Tedrake, and S. Song. Diffusion policy: Visuomotor policy learning via action diffusion. *The International Journal of Robotics Research*, 44(10-11):1684–1704, 2025.
- [39] N. J. Nilsson. *Artificial intelligence: a new synthesis*. Elsevier, 1998.
- [40] N. J. Nilsson. *Principles of artificial intelligence*. Morgan Kaufmann, 2014.
- [41] M. Colledanchise and P. Ogren. ¨ *Behavior Trees in Robotics and AI: An Introduction*. CRC Press, 2018.
- [42] R. A. Izzo, G. Bardaro, and M. Matteucci. BTGenBot: Behavior tree generation for robotic tasks with lightweight LLMs. *arXiv preprint arXiv:2403.12761*, 2024.
- [43] N. Cote, J. Drake, and S. Chitta. Agentic language-grounded adaptive robotic assembly. In *The first CVPR workshop on 3D Vision Language Models (VLMs) for Robotics Manipulation: Opportunities and Challenges*, 2024.
- [44] G. Yin, Y. Li, Y. Wang, D. Mcconachie, P. Shah, K. Hashimoto, H. Zhang, K. Liu, and Y. Li. CodeDiffuser: Attention-Enhanced Diffusion Policy via VLM-Generated Code for Instruction Ambiguity. In *Proceedings of Robotics: Science and Systems*, LosAngeles, CA, USA, June 2025. [doi:10.15607/RSS.2025.XXI.072.](http://dx.doi.org/10.15607/RSS.2025.XXI.072)
- [45] A. Bucker, P. Ortega-Kral, J. Francis, and J. Oh. Grappa: Generalizing and adapting robot policies via online agentic guidance. *IEEE Robotics and Automation Letters*, 2026.
- [46] J. Shi, R. Yang, K. Chao, B. S. Wan, Y. S. Shao, J. Lei, J. Qian, L. Le, P. Chaudhari, K. Daniilidis, et al. Maestro: Orchestrating robotics modules with vision-language models for zero-shot generalist robots. In *NeurIPS 2025 Workshop on Space in Vision, Language, and Embodied AI*, 2025.
- [47] S. Wang, M. Han, Z. Jiao, Z. Zhang, Y. N. Wu, S.-C. Zhu, and H. Liu. LLM3: Large Language Model-based Task and Motion Planning with Motion Failure Reasoning. In *2024 IEEE/RSJ international conference on intelligent robots and systems (IROS)*, pages 12086–12092. IEEE, 2024.
- [48] A. Curtis, N. Kumar, J. Cao, T. Lozano-Perez, and L. P. Kaelbling. Trust the proc3s: Solving ´ long-horizon robotics problems with llms and constraint satisfaction. In *Conference on Robot Learning*, pages 1362–1383. PMLR, 2025.
- [49] Z. Yang, C. Garrett, D. Fox, T. Lozano-Perez, and L. P. Kaelbling. Guiding long-horizon task ´ and motion planning with vision language models. In *2025 IEEE International Conference on Robotics and Automation (ICRA)*, pages 16847–16853. IEEE, 2025.
- [50] N. Kumar, W. Shen, F. Ramos, D. Fox, T. Lozano-Perez, L. P. Kaelbling, and C. R. Garrett. ´ Open-world task and motion planning via vision-language model generated constraints. *IEEE Robotics and Automation Letters*, 2026.
- [51] B. Wu, A. Jones, A. Renault, H. Tay, J. Noble, N. Picard, S. Jiang, et al. Introducing advanced tool use on the claude developer platform, 2024.
- [52] X. Hou, Y. Zhao, S. Wang, and H. Wang. Model context protocol (mcp): Landscape, security threats, and future research directions. *ACM Transactions on Software Engineering and Methodology*, 2025.
- [53] OpenAI. GPT-4o System Card. , Aug. 2024.
- [54] J. Zhang, J. Xiang, Z. Yu, F. Teng, X. Chen, J. Chen, M. Zhuge, X. Cheng, S. Hong, J. Wang, et al. Aflow: Automating agentic workflow generation. In *International Conference on Learning Representations*, volume 2025, pages 34040–34077, 2025.
- [55] G. Wang, Y. Xie, Y. Jiang, A. Mandlekar, C. Xiao, Y. Zhu, L. Fan, and A. Anandkumar. Voyager: An open-ended embodied agent with large language models. *Transactions on Machine Learning Research*, 2024.
- [56] T. Zehle, T. Heiß, M. Schlager, M. Aßenmacher, and M. Feurer. promptolution: A unified, modular framework for prompt optimization. In *Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 3: System Demonstrations)*, pages 282–296, 2026.
- [57] L. A. Agrawal, S. Tan, D. Soylu, N. Ziems, R. Khare, K. Opsahl-Ong, A. Singhvi, H. Shandilya, M. J. Ryan, M. Jiang, et al. Gepa: Reflective prompt evolution can outperform reinforcement learning. In *First Workshop on Foundations of Reasoning in Language Models*, 2025.
- [58] Y. Lee, J. Boen, and C. Finn. Feedback descent: Open-ended text optimization via pairwise comparison. *arXiv preprint arXiv:2511.07919*, 2025.
- [59] A. Goldberg, K. Kondap, T. Qiu, Z. Ma, L. Fu, J. Kerr, H. Huang, K. Chen, K. Fang, and K. Goldberg. Blox-net: Generative design-for-robot-assembly using vlm supervision, physics, simulation, and a robot with reset. In *2025 International Conference on Robotics and Automation (ICRA)*. IEEE, 2025.
- [60] Anthropic. Equipping agents for the real world with Agent Skills. [https://www.anthropic.](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills) [com/engineering/equipping-agents-for-the-real-world-with-agent-skills](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills), Oct. 2025.
- [61] N. Ravi, V. Gabeur, Y.-T. Hu, R. Hu, C. Ryali, T. Ma, H. Khedr, R. Radle, C. Rolland, ¨ L. Gustafson, et al. Sam 2: Segment anything in images and videos. In *International Conference on Learning Representations*, volume 2025, pages 28085–28128, 2025.
- [62] N. Carion, L. Gustafson, Y.-T. Hu, S. Debnath, R. Hu, D. Suris, C. Ryali, K. V. Alwala, H. Khedr, A. Huang, J. Lei, T. Ma, B. Guo, A. Kalla, M. Marks, J. Greer, M. Wang, P. Sun, R. Radle, T. Afouras, E. Mavroudi, K. Xu, T.-H. Wu, Y. Zhou, L. Momeni, R. Hazra, S. Ding, ¨ S. Vaze, F. Porcher, F. Li, S. Li, A. Kamath, H. K. Cheng, P. Dollar, N. Ravi, K. Saenko, ´ P. Zhang, and C. Feichtenhofer. Sam 3: Segment anything with concepts, 2025. URL [https:](https://arxiv.org/abs/2511.16719) [//arxiv.org/abs/2511.16719](https://arxiv.org/abs/2511.16719).
- [63] S. Liu, Z. Zeng, T. Ren, F. Li, H. Zhang, J. Yang, Q. Jiang, C. Li, J. Yang, H. Su, et al. Grounding dino: Marrying dino with grounded pre-training for open-set object detection. In *European Conference on Computer Vision*, pages 38–55. Springer, 2024.
- [64] M. Minderer, A. Gritsenko, A. Stone, M. Neumann, D. Weissenborn, A. Dosovitskiy, A. Mahendran, A. Arnab, M. Dehghani, Z. Shen, et al. Simple open-vocabulary object detection. In *European conference on computer vision*, pages 728–755. Springer, 2022.
- [65] M. Deitke, C. Clark, S. Lee, R. Tripathi, Y. Yang, J. S. Park, M. Salehi, N. Muennighoff, K. Lo, L. Soldaini, et al. Molmo and pixmo: Open weights and open data for state-of-the-art vision-language models. In *2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)*, pages 91–104. IEEE, 2025.
- [66] A. Kamath, J. Ferret, S. Pathak, N. Vieillard, R. Merhej, S. Perrin, T. Matejovicova, A. Rame,´ M. Riviere, L. Rouillard, et al. Gemma 3 technical report. ` *arXiv preprint arXiv:2503.19786*, 4, 2025.
- [67] M. Sundermeyer, A. Mousavian, R. Triebel, and D. Fox. Contact-graspnet: Efficient 6-dof grasp generation in cluttered scenes. In *2021 IEEE international conference on robotics and automation (ICRA)*, pages 13438–13444. IEEE, 2021.
- [68] W. Yuan, A. Murali, A. Mousavian, and D. Fox. M2t2: Multi-task masked transformer for object-centric pick and place. In *7th Annual Conference on Robot Learning*, 2023.
- [69] B. Sundaralingam, S. K. S. Hari, A. Fishman, C. Garrett, K. Van Wyk, V. Blukis, A. Millane, H. Oleynikova, A. Handa, F. Ramos, et al. Curobo: Parallelized collision-free robot motion generation. In *2023 IEEE International Conference on Robotics and Automation (ICRA)*, pages 8112–8119. IEEE, 2023.
- [70] B. Sundaralingam, A. Murali, and S. Birchfield. curobov2: Dynamics-aware motion generation with depth-fused distance fields for high-dof robots. *arXiv preprint arXiv:2603.05493*, 2026.
- [71] X. Zhou, Y. Xu, G. Tie, Y. Chen, G. Zhang, D. Chu, P. Zhou, and L. Sun. Libero-pro: Towards robust and fair evaluation of vision-language-action models beyond memorization. *[arXiv preprint arXiv:2510.03827]*, 2025.
- [72] H. Minkowski. *Geometrie der Zahlen*. B.G. Teubner, Leipzig, 1896.
- [73] W. Shen, C. Garrett, N. Kumar, A. Goyal, T. Hermans, L. P. Kaelbling, T. Lozano-Perez, and ´ F. Ramos. Differentiable gpu-parallelized task and motion planning. In *Robotics science and systems*. Robotics; Science and Systems, 2025.
- [74] A. Pun, K. Deng, R. Liu, D. Ramanan, C. Liu, and J.-Y. Zhu. Generating physically stable and buildable brick structures from text. In *ICCV*, 2025.
## Appendix
## Contents
| A | More Related Work | | | | | | | | |
|---|-------------------|-------------------------------------------------------|----|--|--|--|--|--|--|
| B | | Integrating ROS with GaP in Cable Insertion Benchmark | | | | | | | |
| C | | Sample Generated Graphs | 19 | | | | | | |
| | C.1 | Fulfill Grocery Orders | 19 | | | | | | |
| | C.2 | Pack Grocery Items | 19 | | | | | | |
| | C.3 | Fulfill Grocery Orders with VLA Policy
| 20 | | | | | | |
| | C.4 | Wash Crates | 20 | | | | | | |
| | C.5 | Make Popcorn | 21 | | | | | | |
| D | | MORSL Library | 21 | | | | | | |
| | D.1 | Composite and atomic skills
| 22 | | | | | | |
| | D.2 | Primitive skills (one per gRPC method)
| 23 | | | | | | |
| E | | Self-Learning | 32 | | | | | | |
| | E.1 | Pseudo-code | 32 | | | | | | |
| | E.2 | Sample Feedback
| 32 | | | | | | |
| F | | Sample LLM Prompts and Outputs | 33 | | | | | | |
| | F.1 | Behavior Agent Prompt | 33 | | | | | | |
| | F.2 | Behavior Agent Output | 39 | | | | | | |
| | F.3 | Skill Agent Prompt
| 40 | | | | | | |
| G | | Sample Generation Outputs | 52 | | | | | | |
## A More Related Work
Definition for Generalist Robotics (GR) In FA, variations in the environment and object shape and pose are minimal. For GR, on the other hand, a robot performs a variety of different tasks (e.g., placing groceries into a refrigerator, or domestic cleaning, folding, kitchen pick-and-place) in different homes, where environments vary considerably and objects have variable geometry and highly variable initial poses. Recent robot learning research predominantly targets highly unstructured Generalist Robotics (GR), such as household robots executing diverse chores across novel environments using a single generalist model-free VLA policies [37,](#page-13-0) [38,](#page-13-0) [6,](#page-11-0) [7,](#page-11-0) [10](#page-11-0).
Self-Improving Agentic Workflows. Outside of robotics, Large Language Models (LLMs) have demonstrated exceptional capabilities in dynamic coding, complex software integration, and API orchestration [51,](#page-14-0) [18,](#page-12-0) [52,](#page-14-0) [53,](#page-14-0) [1,](#page-11-0) [2](#page-11-0). By embedding these capabilities into structured agentic workflows, LLMs can autonomously synthesize solutions for open-ended tasks [54](#page-14-0). A foundational example is Voyager [55](#page-14-0), which uses LLMs to iteratively write, refine, and execute Minecraft game playing skills to continually expand a curated library of reusable skills. In these frameworks, a "skill" is typically defined as a discrete function with strict semantic contracts. Recent literature has begun to explore the iterative optimization of agentic systems through language-based failure reasoning [56](#page-14-0) and multi-agent prompt optimization frameworks [57,](#page-14-0) [58](#page-14-0). To improve code generation quality and performance, CaP-X [32](#page-13-0) used a VLM to provide feedback before and after execution (i.e. Visual Differencing), but the VLM can suffer from hallucinations and cannot handle geometric and numerical information such as motion feasibility. Building on the structure of Blox-Net [59](#page-14-0) and BrickGPT [74](#page-15-0), which uses physical experiments to improve LLM-generated task plans, GaP uses multiple LLM agents to generate a robot computation graph and iteratively improve it using simulation experiments.
## B Integrating ROS with GaP in Cable Insertion Benchmark
We demonstrate how GaP can integrate the ROS through a cable insertion benchmark. Four nodes (*align to port*, *touch port*, *insert*, *extract*) are exposed to GaP through an intermediate skill interface that manages and triggers the ROS nodes sequentially. Upon receiving a call from the Behavior Graph, the skill interface instantiates a temporary "orchestrator" node to handle communication with the target ROS node, waiting until it receives a success, failure, or data signal. This execution status is then returned to the Behavior Graph, which determines the next workflow step and triggers subsequent ROS nodes accordingly.
GaP provides flexibility to integrate with ROS nodes for robust, accurate task completion. In our experiment, we create a computation graph using GaP with five different prompts: 1. individual port insertion "Insert the cable into port X." (X: 1,2,4,5,7), 2. "Insert the cable into ports in ascending order", 3. "Insert the cable into ports in descending order", 4. "Insert the cable into odd-indexed

Figure B.1: Left: ROS computation graph that is hand-engineered using traditional ROS nodes and topics. Middle: GaP can leverage nodes in ROS and generate a compatible graph using atomic skill sets, align to port, touch port, insert, and extract. Right: GaP can also use these nodes inside a subgraph for a long-horizon task, such as inserting the cable into even-numbered ports.
ports", 5. "Insert the cable into even-indexed ports". Across 130 insertion trials, GaP achieved a 0.93 success rate (121/130). A detailed breakdown is provided in Table [4.](#page-9-0) Some of the corresponding graphs generated by GaP are shown in Figure [B.1.](#page-17-0) The framework successfully connected atomic skills to complete the core insertion task and demonstrated the capacity to generate subgraphs using these skills to handle extended long-horizon tasks. The GaP-created graph is comparable to an expert-engineered baseline graph built using traditional ROS nodes and topics (see the side-by-side comparison in Figure [B.1](#page-17-0) left and middle).
We identified three main failure modes in our insertion policy. First, when the initial vision-based insertion candidate fails, the system falls back to a contact-based search within a 1 × 1 *cm*2 area in 2 mm steps. If the initial vision estimate falls outside this search zone, the brute-force probing ultimately fails. Second, successful insertion requires precise alignment with the housing; inaccurate depth estimation occasionally results in only a partial insertion. Lastly, variable lighting conditions or shadows cast by the robot and housing can cause the initial port detection to fail.
## C Sample Generated Graphs
## C.1 Fulfill Grocery Orders

#### C.2 Pack Grocery Items

## C.3 Fulfill Grocery Orders with VLA Policy

#### C.4 Wash Crates

#### C.5 Make Popcorn

### D MORSL Library
The system is built from a single kind of component, the *skill*. Every skill is declared by the same metadata schema — a name, a description, and its typed inputs and outputs. Higher-level *composite* skills are materializable subgraphs authored by composing other skills; *atomic* skills are single classes; and *primitive* skills are individual gRPC methods, each wrapping one model invocation or geometric routine. All skills share a common type system (Se3Pose, OrientedBoundingBox, PointCloud, Mask, Image, Trajectory, JointState, ...), which is what lets them compose freely. In the input lists below, defaults are given in parentheses and the universal caller-context field is omitted.
## D.1 Composite and atomic skills
#### Perception.
## **perception single**
Description. Fast single-path detection: broad detect + a VLM crop tournament + segmentation + depthto-3D fusion, closed by an OBB fit. Best for uncluttered scenes with visually distinct targets.
Inputs. object name (literal)
Outputs. obb: OrientedBoundingBox, mask: Mask, cloud: PointCloud
#### **perception multi**
Description. Three detectors run on the same observation and a VLM disambiguator picks the best mask on disagreement. Most robust, but slower; single-shot only.
Inputs. object name (literal)
Outputs. obb: OrientedBoundingBox, mask: Mask
## **perception any**
Description. Lightweight one-shot set-of-marks pick. Returns "not found" cleanly when the VLM replies "none", the right choice for clean-all-items loops.
Inputs. object name (literal)
Outputs. obb: OrientedBoundingBox, mask: Mask, cloud: PointCloud
## **perception subpart**
Description. Hierarchical perception: detect the parent, crop to its box, segment the named subpart inside the crop, uncrop and fuse depth. For affordances that occupy few full-image pixels (pan handle, drawer pull, mug rim).
Inputs. parent prompt, subpart prompt (literals)
Outputs. obb: OrientedBoundingBox, mask: Mask, cloud: PointCloud
#### **track object**
Description. Long-running tracker: seeds on the first frame via text prompt, then polls the observation stream and advances the tracker until the workflow signals termination, freeing tracker state on exit.
Inputs. text prompt; observation stream
Outputs. a stream of tracked-mask snapshots
#### Grasping.
#### **grasp curobo obb**
Description. Collision-aware grasping: plans a collision-free trajectory to one of several top-down OBB grasp candidates. The default when the OBB centroid is graspable.
Inputs. target obb: OrientedBoundingBox, target mask: Mask
Outputs. ee pose at grasp: Se3Pose, grasp pose: Se3Pose
#### **grasp moe**
Description. Mixture-of-experts grasping: a diffusion sampler and a dense OBB sweep feed one discriminator; the top-K union is planned. Use when the OBB centroid is not the graspable point (bowl rim, handle, off-center).
Inputs. target obb: OrientedBoundingBox, target mask: Mask, target cloud: PointCloud Outputs. ee pose at grasp: Se3Pose
#### **grasp short axis**
Description. Deterministic geometry-locked grasp: the finger axis snaps to the OBB's shorter horizontal axis so the jaws close across the narrow dimension of an elongated target. An optional base OBB slides the grasp along a handle.
Inputs. target obb: OrientedBoundingBox, target mask: Mask, base obb: OrientedBoundingBox (optional)
Outputs. ee pose at grasp: Se3Pose, grasp pose: Se3Pose
## **grasp direct ik**
Description. Planner-free grasping: pre-rotate to the grasp orientation above the target, descend straight down, close. For uncluttered scenes or platforms without a motion planner.
Inputs. target obb: OrientedBoundingBox
Outputs. (grasp completion only)
## Transport, policy, and bimanual.
## **transport to drop**
Description. Moves a held object above a destination container and releases it. An optional VLM-grounded step localizes a natural-language sub-region ("the left compartment") before the drop pose is computed.
Inputs. container obb, container mask, target obb, target mask, ee pose at grasp Outputs. (placement completion only)
#### **run policy**
Description. Runs a learned VLA policy in closed loop, reading the observation stream each window, until a VLM termination check fires or max windows is reached.
Inputs. observation stream; max windows
Outputs. (policy rollout completion)
#### **bimanual crate lift**
Description. Two-arm crate lift: both arms side-grasp the crate's handle bars and raise it in lock-step, in a fixed phase order (open→approach→insert→close→lift→settle).
Inputs. (none — waypoints are baked parameters)
Outputs. done: bool, final left world pos, final right world pos
#### D.2 Primitive skills (one per gRPC method)
#### Detection and segmentation.
#### **grounding dino.Detect**
Description. Zero-shot object detection from a text prompt; returns boxes, labels, and confidence scores.
Inputs. image: Image; text prompt (period-separated phrases); box threshold (0.20); text threshold (0.20)
Outputs. detections: [ box: BoundingBox2D, label, score ]
#### **owlvit.Detect**
Description. Open-vocabulary object detection from a list of text queries; an alternative to grounding dino.
Inputs. image: Image; text queries: string[]; score threshold (0.05)
Outputs. detections: [ box: BoundingBox2D, label, score ]
#### **sam3.SegmentText**
Description. Segment all instances matching a text description.
Inputs. image: Image; text prompt
Outputs. masks: Mask[], scores: float[], boxes: BoundingBox2D[]
## **sam3.SegmentPoint**
Description. Segment the object under a single pixel coordinate.
Inputs. image: Image; pixel x, pixel y Outputs. masks: Mask[], scores: float[]
### **sam3.SegmentBox**
Description. Segment within a bounding box, optionally refined by a foreground point.
Inputs. image: Image; box: BoundingBox2D; pixel x/pixel y + use point (false, optional foreground point)
Outputs. masks: Mask[], scores: float[]
#### **sam2.SegmentBox**
Description. Box-prompted segmentation (lighter SAM2 backend).
Inputs. image: Image; box: BoundingBox2D; max masks (0 = unlimited)
Outputs. masks: Mask[], scores: float[]
## **sam2.SegmentPoint**
Description. Point-prompted segmentation (lighter SAM2 backend).
Inputs. image: Image; pixel x, pixel y Outputs. masks: Mask[], scores: float[]
#### **sam3 tracker.InitTracker**
Description. Initialize a stateful tracker session seeded with one frame and a prompt.
Inputs. image: Image (first frame); one of text / box / point (pixel x,pixel y,use point); object name
Outputs. tracker id, initial mask: Mask, initial box, score, object present
## **sam3 tracker.UpdateTracker**
Description. Advance an existing tracker session by one frame.
Inputs. tracker id; image: Image (new frame)
Outputs. mask: Mask, box, confidence, object present
#### **sam3 tracker.CloseTracker**
Description. Free a tracker session; idempotent.
Inputs. tracker id Outputs. (empty)
## **sam3d.GenerateMesh**
Description. Reconstruct a triangle mesh from an RGB image + mask, scaled and posed into world frame via the OBB; writes an .obj for the rehearsal sandbox.
Inputs. object name; views: [rgb, mask, intrinsics, camera pose]; obb: OrientedBoundingBox; view selection; seed (42); output dir
Outputs. mesh path, texture path, world pose: Se3Pose, scale: Vec3, chosen view index, num vertices, num faces
## Vision–language.
## **molmo.PointPrompt**
Description. Point to a named object; returns pixel coordinates.
Inputs. image: Image; object name Outputs. pixel x, pixel y, found
## **molmo.Query**
Description. Free-form visual question answering (Molmo backend).
Inputs. prompt; image: Image (optional); use multiview
Outputs. text
## **molmo.QueryYesNo**
Description. Yes/no visual question answering (Molmo backend).
Inputs. prompt; image: Image (optional); use multiview
Outputs. answer: bool
#### **vlm.Query**
Description. Free-form visual question answering (configurable VLM backend).
Inputs. prompt; image: Image (optional)
Outputs. text
#### **vlm.QueryYesNo**
Description. Yes/no visual question answering (configurable VLM backend).
Inputs. prompt; image: Image (optional)
Outputs. answer: bool
#### Grasp generation.
#### **graspgen.PlanFromPointCloud**
Description. Diffusion-based 6-DoF grasp sampling from an object-segmented cloud; ranked, world-frame, fingertip convention.
Inputs. target cloud: PointCloud; scene cloud (optional); num grasps (200); topk num grasps (50); grasp threshold (−1); remove outliers (true)
Outputs. grasp poses: Se3Pose[], scores: float[], contact points: Vec3[]
#### **graspgen.ScoreGrasps**
Description. Score caller-provided grasps with GraspGen's discriminator, so OBB-sampled candidates are comparable with diffusion samples.
Inputs. target cloud: PointCloud; candidate poses: Se3Pose[]
Outputs. scores: float[] (aligned to candidates)
#### **graspnet.PlanFromDepth**
Description. Contact-GraspNet 6-DoF grasp detection from a depth image + instance mask.
Inputs. depth: DepthImage; intrinsics: Matrix3x3; segmentation: Mask; instance id; knobs (z min 0.2, z max 2.0, max retries 7, *. . .* ); optional wrist camera
Outputs. grasp poses: Se3Pose[], scores: float[], contact points: Vec3[]
#### **graspnet.PlanFromPointCloud**
Description. Contact-GraspNet grasp detection from precomputed clouds.
Inputs. full cloud: PointCloud; segment cloud: PointCloud; instance id; same knobs
Outputs. grasp poses: Se3Pose[], scores: float[], contact points: Vec3[]
## **m2t2.PlanFromPointCloud**
Description. M2T2 6-DoF grasp generation from a colored scene cloud; an alternative candidate source. Inputs. scene cloud: PointCloud; target cloud (optional); num points (16384); grasp threshold (0.035); max grasps (200)
Outputs. grasp poses: Se3Pose[], scores: float[], contact points: Vec3[]
## Motion planning and IK.
## **curobo.PlanToGraspPoses**
Description. Plan a collision-free trajectory to one of several grasp poses (goalset).
Inputs. world config: WorldConfig; start joint position: JointState; grasp poses: Se3Pose[]; thresholds + collision knobs
Outputs. success, trajectory: Trajectory, goalset index
#### **curobo.PlanWithGraspedObject**
Description. Plan a collision-free trajectory while holding a named grasped object.
Inputs. world config; start joint position; target pose: Se3Pose; object name
Outputs. success, trajectory: Trajectory
#### **curobo.PlanLinear**
Description. GPU-accelerated straight-line Cartesian motion via per-waypoint IK, optionally constrained and collision-checked.
Inputs. start pose, end pose: Se3Pose; start joint position; world config (optional); num waypoints (20); hold vec weight
Outputs. success, trajectory: Trajectory, failure reason
## **curobo.PlanDirectedLinear**
Description. Constrained linear motion that holds selected Cartesian axes (project-to-target / fixed-distance / orient-in-place).
Inputs. start joint position; start pose, target pose; allowed axes; endpoint mode; orientation mode
Outputs. success, trajectory: Trajectory, failure reason
#### **curobo.PlanGraspMotion**
Description. Three-phase grasp plan (free-space approach, constrained grasp, constrained lift) so the caller can interleave gripper commands. (CuRobo v0.8.)
Inputs. start joint position; grasp pose: Se3Pose; approach axis+distance (0.12); lift axis+distance (0.20)
Outputs. success; approach trajectory, grasp trajectory, lift trajectory: Trajectory; failure reason
## **curobo.SolveIK**
Description. Pure geometric IK for a single TCP pose (no world collision).
Inputs. target pose: Se3Pose; seed config (optional); tcp offset; num seeds (32)
Outputs. success, joint config: JointState
## **curobo.PlanToPose**
Description. Collision-aware trajectory to a single EE target pose.
Inputs. target pose: Se3Pose; start joint position; world config (optional); tcp offset Outputs. success, trajectory: Trajectory
## **curobo.BatchGraspFeasibility**
Description. Per-pose scene-collision feasibility for a batch of grasp candidates; filters blocked grasps before planning.
Inputs. world config; start state: JointState; grasp poses: Se3Pose[]; approach offset m (0.10); ignore obstacle names
Outputs. feasible: bool[], grasp ik ok: bool[], approach ik ok: bool[], corridor collision fraction: float[] (all aligned to input)
## **curobo.ValidateJointTrajectoryRobot**
Description. Validate joint waypoints against world + self-collision.
Inputs. world config; trajectory: Trajectory; collision knobs
Outputs. success, failure reason, first collision waypoint, collision status detail
#### **curobo.ValidateJointTrajectoryGrasped**
Description. As above, with a grasped object attached at the first waypoint.
Inputs. world config; trajectory; object name; collision knobs
Outputs. success, failure reason, first collision waypoint, collision status detail
#### **pyroki.SolveIK**
Description. CPU differentiable IK for a target EE pose; the planner-free IK fallback.
Inputs. target pose: Se3Pose; target link name (panda hand); prev config (optional); tcp offset (0*,* 0*,* −0*.*1)
Outputs. joint config: JointState, success
#### **pyroki.PlanLinear**
Description. CPU linear Cartesian trajectory between two poses.
Inputs. start pose, end pose: Se3Pose; num waypoints (20); dt (0.02)
Outputs. trajectory: Trajectory, success
## Geometry.
## **geometry svc.FilterNoise**
Description. DBSCAN noise filtering of a point cloud.
Inputs. point cloud: PointCloud; eps (0.005); min samples (10)
#### Outputs. PointCloud
#### **geometry svc.ComputeOBB**
Description. Fit an oriented bounding box to 3D points.
Inputs. point cloud: PointCloud Outputs. OrientedBoundingBox
#### **geometry svc.FilterAndComputeOBB**
Description. FilterNoise + ComputeOBB in one round trip.
Inputs. point cloud: PointCloud; eps (0.005); min samples (10)
Outputs. OrientedBoundingBox
## **geometry svc.TopDownGraspFromOBB**
Description. A single top-down grasp pose from an OBB.
Inputs. obb: OrientedBoundingBox; z offset
Outputs. Se3Pose
#### **geometry svc.TopDownGraspCandidates**
Description. Candidate top-down grasps so a planner can pick a reachable one.
Inputs. obb: OrientedBoundingBox; z offset
Outputs. poses: Se3Pose[] (primary + 90◦ -rotated)
#### **geometry svc.SelectTopDownGrasp**
Description. Pick the most top-down (and nearest) grasp from candidates.
Inputs. grasp poses: Se3Pose[]; gripper position: Vec3
Outputs. Se3Pose
#### **geometry svc.FrontGraspFromOBB**
Description. Front/horizontal grasp for a handle (drawers, doors), with a slide axis.
Inputs. obb: OrientedBoundingBox; approach offset (0.08); approach hint; z offset
Outputs. grasp pose, pre grasp pose: Se3Pose; approach direction, slide axis: Vec3
#### **geometry svc.DepthToPointCloud**
Description. Back-project a depth image to a camera-frame point cloud.
Inputs. depth: DepthImage; intrinsics: Matrix3x3
Outputs. PointCloud (camera frame)
#### **geometry svc.MaskToWorldPoints**
Description. Back-project a 2D mask to world-frame 3D points.
Inputs. mask: Mask; depth: DepthImage; intrinsics: Matrix3x3; camera pose: Se3Pose
Outputs. PointCloud (world frame)
## **geometry svc.PixelToWorldPoint**
Description. Back-project a single pixel to a world point.
Inputs. pixel x, pixel y; depth; intrinsics; camera pose
Outputs. Vec3 (world point)
#### **geometry svc.TransformPoints**
Description. Apply a rigid transform to a set of points.
Inputs. point cloud: PointCloud; transform: Se3Pose
Outputs. PointCloud
## **geometry svc.BuildWorldConfig**
Description. Reconstruct a named collision-mesh world from camera observations for any planner.
Inputs. cameras: CameraObservation[]; object masks: [name, mask, camera index]; recon params (voxel size 0.005, mesh alpha 0.03); robot joint state (optional); target obb (optional)
Outputs. config: WorldConfig, mesh names: string[]
## **geometry svc.ComputeDropPosition**
Description. Drop position above a container, accounting for clearance and object height.
Inputs. container obb: OrientedBoundingBox; clearance (0.05); object z extent
Outputs. Vec3 (drop point)
#### **geometry svc.ComputeXYDistance**
Description. XY-plane Euclidean distance between two points.
Inputs. point a, point b: Vec3 Outputs. distance: double
## **geometry svc.RotateQuatZ90**
Description. Rotate a quaternion 90◦ about Z (for grasp candidates).
Inputs. quat: Quaternion (WXYZ)
Outputs. Quaternion
## Robot and environment control.
**robot control.GetEEPose**
Description. Current end-effector pose in world frame.
Inputs. arm id (0)
Outputs. pose: Se3Pose
#### **robot control.GoToPose**
Description. Move the EE to a target pose via IK (no collision avoidance).
Inputs. pose: Se3Pose; z approach; tcp offset (0*,* 0*,* −0*.*1); tolerance (0.01); max steps (120); nonblocking
Outputs. (empty)
## **robot control.GoToPoseCartesian**
Description. Move to a pose with smooth Cartesian interpolation.
Inputs. pose: Se3Pose; lin vel norm (1.0); ang vel norm (2.0); timeout s (20)
Outputs. (empty)
## **robot control.ExecuteJointTrajectory**
Description. Execute a pre-planned joint trajectory (from CuRobo or PyRoKI).
Inputs. trajectory: Trajectory; subsample (1); tolerance (0.01)
Outputs. (empty)
#### **robot control.MoveToJoints**
Description. Move directly to a joint configuration.
Inputs. joint config: JointState; tolerance (0.01); max steps (120)
Outputs. (empty)
## **robot control.GoHome**
Description. Move the robot to its safe home configuration.
Inputs. (none)
Outputs. (empty)
#### **robot control.GoToPoseArm**
Description. Multi-arm: move one specified arm to a pose.
Inputs. arm id; pose: Se3Pose; z approach; tcp offset
Outputs. (empty)
## **robot control.GoToPoseBoth**
Description. Multi-arm: move both arms to their poses simultaneously.
Inputs. pose arm0, pose arm1: Se3Pose; z approach; tcp offset
Outputs. (empty)
#### **robot control.MoveToJointsBoth**
Description. Multi-arm: drive both arms to raw joint targets in lock-step (no IK).
Inputs. joints arm0, joints arm1: JointState; tolerance (0.02); max steps (300)
Outputs. (empty)
#### **robot control.ApplyPolicyAction**
Description. Apply one low-level policy action to the env controller (VLA rollouts).
Inputs. action: double[] (e.g. 7-dim [∆*x,* ∆*y,* ∆*z,* ∆*rx,* ∆*ry,* ∆*rz,* grip]); arm id (0)
Outputs. (empty)
#### **gripper.Open**
Description. Open the gripper and settle.
Inputs. arm id (0); settle steps (40)
Outputs. GripperState
#### **gripper.Close**
Description. Close the gripper and settle.
Inputs. arm id (0); settle steps (60)
Outputs. GripperState
## **gripper.GetPosition**
Description. Read the current gripper opening.
Inputs. arm id (0)
Outputs. GripperState (opening width)
## **gripper.GetPose**
Description. Gripper pose in world frame.
Inputs. arm id (0)
Outputs. pose: Se3Pose
#### **observation.GetObservation**
Description. Full sensor observation from all cameras and arms.
Inputs. (none)
Outputs. cameras: CameraObservation[] (RGB-D + intrinsics/extrinsics), arm states: ArmState[]
## **observation.GetCameraPose**
Description. A named camera's pose in robot base frame.
Inputs. camera name (e.g. "agentview")
Outputs. pose: Se3Pose
#### **sim bridge.Init**
Description. Initialize a simulation environment by name.
Inputs. env name; config path (optional); camera names; task id; suite name
Outputs. success, capabilities: SimCapabilities, error message
#### **sim bridge.Reset**
Description. Reset the environment for a new episode.
Inputs. seed
Outputs. observation: ObservationResponse
#### **sim bridge.StepOnce**
Description. Execute a single low-level MuJoCo timestep.
Inputs. gripper fraction (−1 = no change)
Outputs. observation, reward, terminated, truncated
#### **sim bridge.MoveToJointsBlocking**
Description. Move to a joint configuration, blocking until converged.
Inputs. target joints: JointState; tolerance (0.01); max steps (120)
Outputs. observation, reward, terminated, truncated
```
sim_bridge.SetGripper
Description. Set the gripper target fraction.
Inputs. fraction (0 closed \rightarrow 1 open); arm_id (0)
Outputs. (empty)
sim_bridge.GetState
Description. Full sim state, including per-object ground-truth poses.
Inputs. (none)
Outputs. arm_states: ArmState[], cameraObservation[], objects: [name, pose] (ground
truth)
sim_bridge.CheckTaskCompletion
Description. Ouery simulator reward and task success.
Inputs. (none)
Outputs. reward, task_completed, completion_rate (sub-goals satisfied)
sim_bridge.EnableVideoCapture
Description. Start/stop video-frame capture.
Inputs. enabled; clear
Outputs. (empty)
sim_bridge.SaveVideo
Description. Encode captured frames to an MP4 and return its path.
Inputs. output_path; clear; fps (20)
Outputs. success, file_path, num_frames
```
#### E Self-Learning
#### E.1 Pseudo-code
```
Self-Learning-Algorithm 2 Rehearsal-based Graph Optimization
Input: \mathcal{T} = \langle \mathcal{L}, \mathcal{E}, \mathcal{R}, \mathcal{O}, \mathcal{X}, \mathcal{B}, \mathcal{J} \rangle, Iterations M, Parallel Rollouts N
Output: Optimized Task Graph G
Initialization: \mathcal{G}_0 \leftarrow \operatorname{Graph-Init}(\mathcal{L})
// Initial graph from language
\mathcal{S} \leftarrow \text{Build\_Scene}(\mathcal{G}, \{\mathcal{G}_i\})
// Instantiate sim environment
\textbf{10} \ \ \textbf{for} \ j \leftarrow 1 \ \textbf{to} \ M \ \textbf{do}
// Step 1: Scene Variational Sampling
\{\hat{s}_i\}_{i=1}^N \sim \mathcal{B}
11
// Sample N instances
// Step 2: Parallel Rehearsal
for i \leftarrow 1 to N do in parallel
\tau_i \leftarrow \text{Rehearsal}(\hat{s}_i, \mathcal{G}_{i-1})
// Rollout policy
F_i \leftarrow \text{Analyze\_Failure}(\tau_i, \mathcal{G}, \{\mathcal{G}_i\})
// Step 3: Graph Refinement
\mathcal{G}_j \leftarrow \text{Graph\_Update}(\{F_1, \ldots, F_N\})
// Optimize via LLM
15
16 return \mathcal{G}^* \leftarrow \mathcal{G}_M
```
#### **E.2** Sample Feedback
Below is a sample feedback from running pan of 30 concurrent environment. At each phase, the difference between simulated object states and contacts. The differences before and after each phase is recorded and provided to LLM agent to iteratively improve the graph. For example, if the oriented
bounding box of pan is not overlapped with the oriented bounding box of the stove, and they are not in contact, the LLM can reason and infer as a failure.
Summary. In the first rehearsal iteration, perception succeeds across all sampled environments, while downstream failures arise from grasp instability and incorrect pan placement. The placement node fails because the pan is released away from the burner footprint, yielding zero burner coverage.
| Iteration 1 Feedback | | Terminal coverage: 0.00 |
|---------------------------------|------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Node | Validation | Feedback |
| perceive pan
perceive burner | 1.00 (30/30)
1.00 (30/30) | Perception publishes the target OBB for the pan handle.
Perception publishes the container OBB for the burner. |
| grasp pan | 0.83 (25/30) | The pan is considered grasped when it remains in contact
with a robot link at the exit of the grasp subgraph. |
| place pan | 0.57 (17/30) | The pan should be released by the gripper and cover
at least 70% of the burner XY footprint. All evaluated
placement attempts fail because the pan does not cover
the burner footprint. |
#### Representative Failure Cases
• **env 3, grasp pan**: grasp failed with the gripper still open.
```
gripper open fraction = 1.0, pan z = 0.024, contact = [table top]
```
The subgraph returned failed; only ee pose at grasp was bound.
• **env 9, grasp pan**: grasp failed after gripper closure.
```
gripper open fraction : 1.0 → 0.0, pan z = 0.024, contact = [table top]
```
The robot closed the gripper, but the pan remained on the table and the node returned failed. The elapsed time was 4.377 s.
• **place pan**: the evaluated placement failure trials has:
$${\tt pan\_coverage\_of\_burner} \leq 0.7$$
Although the pan was released from the gripper, its projected bottom footprint did not sufficiently overlap with the burner footprint.
Optimization signal. The feedback suggests that the next graph update should revise the placement target and release pose for place pan, while also improving grasp robustness for the failed grasp pan environments.
## F Sample LLM Prompts and Outputs
#### F.1 Behavior Agent Prompt
You are a robotics task planner. Given a manipulation task description, you produce \*\*only the workflow topology\*\* --- the top-level node graph (subgraph nodes + end nodes), the edges and conditional\_edges connecting them, and each subgraph's inputs/outputs/exit-values/skill choice. You do \*\*not\*\* generate internal nodes/edges of any subgraph. The universal 'subgraph\_agent' is invoked separately per subgraph to fill in its inner state machine.
*## Output format*
A single ' '''python' fenced block (no file path) that builds the workflow scaffold with 'vos.builder.WorkflowSpec' and binds it to a module-level variable named ''spec'':
```
'''python
from vos.builder import WorkflowSpec, START
from vos.runtime.workflow import ServiceCall
spec = WorkflowSpec(name="", description="")
## 1. Declare every subgraph (metadata only --- nodes/edges get filled in later).
spec.declare_subgraph(
"", # e.g. "target_sg"
skill="",
description="",
inputs=,
outputs=,
exit_success_values=[""],
on_error="",
stage="", # OPTIONAL; see "Stage tag" below.
)
## 2. Place the top-level subgraph nodes that reference those declarations.
spec.add_subgraph_node("", ref="")
## 3. Add end nodes --- typically one success ("done") and one failure ("abort").
spec.add_end("done", status="success")
spec.add_end(
"abort",
status="failure",
recovery=[
ServiceCall("gripper.v1.Gripper", "Open", {}),
ServiceCall("robot_control.v1.RobotControl", "GoHome", {}),
],
)
## 4. Wire the entry edge and conditional dispatch per subgraph node.
spec.add_edge(START, "")
spec.add_conditional_edges(
"",
{"": "", ...},
router_field="exit",
)
'''
The pipeline imports 'vos.builder' (already available; do not pip
install), executes the block in a sandbox, picks up the module-level
'spec' variable, serializes it to a workflow-spec dict, and forwards it
to the per-subgraph generators.
Use a 1:1 naming convention between the outer node name (passed to
'add_subgraph_node') and the inner subgraph def name (passed to
'declare_subgraph'), or use the same name for both --- both work.
### Hard rules for the Python block
1. The block MUST end with a module-level variable named ''spec'' bound
to a ''WorkflowSpec'' instance.
2. Imports: ''from vos.builder import WorkflowSpec, START'' and
''from vos.runtime.workflow import ServiceCall'' are pre-provided in
the sandbox.
3. No I/O, no other imports.
4. Subgraph 'inputs' / 'outputs' MUST be dicts of '{name: proto_type_str}'.
Each value is a **bare proto type string** (e.g. ''"OrientedBoundingBox"'',
''"Mask"'', ''"PointCloud"'') --- never a ''Ref'' and never a nested dict.
Cross-subgraph data flow is established implicitly by 'add_edge' /
'add_conditional_edges' plus matching input/output **names** between
subgraphs --- you do NOT wire it here.
```
5. Every 'declare\_subgraph(...)' call MUST pass BOTH 'exit\_success\_values=' AND 'on\_error=' as keyword arguments --- they are required and have no defaults. Omitting either raises 'declare\_subgraph() missing 2 required keyword-only arguments' and the whole spec rejects. Conventional values: 'exit\_success\_values=["done"]' and 'on\_error="abort"', paired with 'spec.add\_end("done", status="success")' and 'spec.add\_end("abort", status="failure", recovery=[...])'.
*### Stage tag (optional but recommended)*
Set ''stage="grasp"'', ''"transport"'', or ''"place"'' on every ''declare\_subgraph'' that participates in the pick-and-place pipeline. The iter-1 mechanical-swap engine (''vos/refine/iter1\_swap.py'') groups per-env checkpoint outcomes by ''stage'' to compute per-stage pass-rates and decide which canonical swap (graspgen↔OBB, free-space↔collision-aware transport, subpart↔parent drop anchor) to apply for the next iter.
- ''grasp'' --- any subgraph whose exit is "object held in gripper" (skills ''grasp\_moe'', ''grasp\_multi'', ''grasp\_curobo\_obb'').
- ''transport'' --- moves the held object from grasp pose to above the drop zone (''transport\_to\_drop'' when modeled as its own subgraph).
- ''place'' --- the release leg: compute drop pose + drop-offset correction + descend/release (''transport\_to\_drop'' when modeled end-to-end, or a dedicated placement subgraph).
When a subgraph does not belong to the canonical taxonomy (e.g. a perception or pre-grasp staging subgraph), omit ''stage''. The iter-1 engine skips unstaged subgraphs during stage rollups; explicit ''None'' is fine.
#### *## Hard rules*
- 1. \*\*Edges and conditional\_edges.\*\* For each subgraph node, every one of its 'exit\_success\_values' PLUS its 'on\_error' symbol must appear as a key in the corresponding 'add\_conditional\_edges' mapping, and every mapping target must be a node declared at the top level. Every end node must be reachable from 'START'.
- 2. \*\*The entry node must be a subgraph node\*\* (not an end node).
- 3. \*\*No internal nodes / edges / on\_error\*\* for any subgraph in your output. The universal subgraph\_agent fills those in per subgraph.
- 4. \*\*Inputs and outputs.\*\* A subgraph's declared 'inputs' must equal its skill's 'required\_inputs' after '' substitution, and every input must have an upstream subgraph on some path to it that produces a matching output name with a matching proto type. Declared 'outputs' must be a subset of the skill's 'produces\_outputs' (omit outputs nothing downstream consumes).
- 5. \*\*Pick the right specialized variant.\*\* When multiple variants of a role appear in Available Skills (e.g. 'perception\_multi' vs 'perception\_single', 'grasp\_curobo\_obb' vs 'grasp\_direct\_ik'), read each skill's \*When to use\* guidance and pick the best fit --- default to the more robust / collision-aware variant when both are listed. Skills whose required services are not deployed do not appear in Available Skills.
#### *## Discovery via tools*
#### You may call:
- 'read\_skill\_reference(skill\_name, doc\_name)' to load the long-form rationale for a skill (the references listed in the skill's frontmatter).
- 'read\_skill\_example(skill\_name, example\_name)' to load a sample subgraph the per-skill subgraph\_agent will start from.
- 'report\_missing\_capability(name, why)' if no skill in the catalog covers a step the task requires. The build aborts with a structured
```
report.
Use these sparingly --- the always-loaded catalog already shows skill
descriptions, tags, exit_conditions, and produces_outputs.
## Workflow v3 spec --- shared core
This is the structural spec every codegen subagent shares. It defines the
top-level workflow shape, the SubgraphDef shape, node types, edge
semantics, '$ref' syntax, and validation rules.
## Top-level workflow
'''json
{
"version": 3,
"meta": { "name": "...", "description": "..." },
"nodes": {
"": { "type": "subgraph", "ref": "" },
"done": { "type": "end", "status": "success" },
"abort": { "type": "end", "status": "failure",
"recovery": [ { "service": "...", "method": "...", "inputs": {} } ] }
},
"edges": [["START", ""]],
"conditional_edges": {
"": {
"router_field": "exit",
"mapping": { "": "", ... }
}
},
"subgraphs": { "": { /* SubgraphDef */ } }
}
'''
'START' and 'END' are virtual node names. The top level orchestrates
subgraph nodes and end nodes; cross-subgraph routing is via the
'conditional_edges' block reading each subgraph's 'exit' value.
'meta' is an open string→string map; recognized keys include 'name',
'description', 'runtime' ('direct_real'), 'observation_stream_hz', and
'validate_checkpoints' ('"true"' opts the executor into enforcing each
subgraph's 'validate=True' postcondition checkpoints at real-execution
time --- **currently a no-op**; reserved seam).
## SubgraphDef shape
'''json
{
"skill": "",
"inputs": { "": "" },
"outputs": { "": { "$ref": "." } },
"nodes": {
"": { /* NodeDef */ },
"": { "type": "noop" }
},
"edges": [
["START", ""],
["", ""],
["", "END"]
],
"conditional_edges": { },
"exit": { "router_field": null, "success_values": [""] },
"on_error": ""
}
'''
```
```
Scripts go in separate fenced blocks, namespaced under
'scripts//':
''''python:scripts//