Letting Robots Accumulate Skills Through Programs

October 10, 2026

An open robot-agent architecture built on Robocurve CapX.

A simple instruction such as “put the red cube on the plate” contains many steps that nobody says out loud. The robot has to find the cube, choose a grasp pose, avoid the table, judge whether its grip is secure, and adjust its target again if the plate moves.

A language model can write those steps as a program. But once the program enters the physical world, it still has to answer several questions. Is the observation it read still valid? Did the motion really finish? After a failure, where should it pick up? And how does one successful operation become experience the next task can use?

We propose an open software architecture built on Robocurve CapX that connects a coding agent, local feedback control, and reusable skills. The first validation environment uses MuJoCo and a single-arm Panda.

The project is at the architecture-design stage. The interfaces below are proposed interfaces, and the experiments are a validation plan. There are no results from running it yet.

From Generating Code to Executing Programs

Robocurve’s CapX integration offers a direct starting point: the model reads images and robot state, generates Python, calls segmentation, grasping, and inverse-kinematics tools, and then revises its code based on execution feedback. Robocurve CapX

This route gives robot behavior a program representation that can be inspected and changed. A grasping program shows how it picks its target, which approach direction it uses, and at which step it decides it has failed.

In the existing integration, however, a motion call first builds a queue of actions. The queue only starts executing after the Python returns. Code in the same turn is still reading the initial observation.

That suits short trajectories. For moving targets, visual alignment, and stopping on contact, we need to change the execution semantics further: the program submits a motion goal, waits for the real result, and gets an updated observation in its next statement.

Our core hypothesis is this: the coding agent organizes the task, local controllers handle change during motion, and validated programs store experience. The three parts can be improved separately and measured separately.

A Layered Software Stack

The layering is inspired by Waddle’s published architecture. Waddle separates the hardware interface, the Metal tools, and the agent harness, so that higher-level programs reach robot capabilities through one set of tools. The Waddle Stack

Our design keeps that division of labor and connects the layers through the Inspect Robots evaluation framework.

Task instruction Coding agent Validated skill library Task program Metal tools and motion runtime Simulation adapter MuJoCo scene Images and sensors Execution feedback Results and errors
Figure 1. The agent writes a task program, Metal turns the program’s calls into motion, and execution feedback is used to revise programs and validate skills.

The bottom-layer adapter owns the concrete interface to the robot and the environment: reading joint state, capturing images, sending control targets, stepping the simulation, and recording sensor data.

Metal handles perception, coordinate transforms, grasp candidates, kinematics, and motion execution. It exposes one set of operations to programs and declares which capabilities each operation needs.

The agent on top reads the task, retrieves skills, writes programs, interprets errors, and edits the workspace. Successful programs can be saved, and candidate skills can be submitted for validation.

The aim of the layering is a clear boundary for changes when the model, the perception algorithm, or the robot backend is swapped. A consistent interface does not by itself guarantee that skills transfer; the robot’s workspace, gripper geometry, and sensor capabilities still have to be validated.

How Metal Connects Language and Geometry

“Pick up the red cube” first has to become a spatial problem.

The program must know which coordinate frame the target’s position belongs to, which image frame it came from, and whether the measurement is reliable enough. The grasp pose then has to be converted into a reachable robot configuration, and the approach path has to satisfy joint and collision constraints.

We plan to put this information into the tool contracts. A pose carries its frame and time, a target carries its observation source and confidence, and a motion result carries its error and the reason it stopped. The program can use these to decide whether to continue, retry, or exit.

A top grasp can be expressed as:

# Proposed interface
obj = ctx.perception.detect("red cube")
grasp = ctx.grasp.sample(obj, strategy="top")

ctx.motion.move_to(grasp.pregrasp)
ctx.motion.move_to(grasp.grasp)
ctx.gripper.close()
ctx.motion.move_by(z=0.08, frame="world")

result = ctx.check.held(obj)

Here, a return from move_to() means the robot has met its arrival and settling conditions. The target returned by detect() also has a validity period; later calls can check whether it needs to be located again.

The first version will start with simple tools: RGB-D color segmentation, geometric top grasps, damped least-squares IK, and waypoint paths suited to an uncluttered tabletop. More complex segmentation and grasping models can be plugged in as optional backends.

We will also declare tool capabilities explicitly. Without depth, a program cannot call 3D localization that depends on depth; without reliable force measurement, it cannot call a force-triggered stop. A missing capability should surface before the program runs.

Giving Motion Calls Their Own Feedback Loop

When an object is being placed on a plate, the plate may move during the approach. A program that only replays a trajectory generated earlier will keep heading for the old position.

We plan to provide servo_align(): during the motion it updates the target position, computes the error between the target and the end effector, and keeps correcting the next control step. If the target is lost or the observation goes stale, the runtime pauses the motion and returns an explicit reason for the failure.

Contact operations need a different kind of feedback. approach_until() advances slowly along a given direction and ends when a structured stop condition is met:

# Proposed interface
ctx.motion.approach_until(
    direction=[0, 0, -1],
    frame="world",
    speed_m_s=0.01,
    max_travel_m=0.03,
    stop=ContactAbove(
        threshold_n=3.0,
        debounce_s=0.03,
    ),
    timeout_s=5.0,
)

These values are a starting configuration for simulation tests. Real behavior has to be measured through stopping delay, overshoot, and peak force.

The local control loop does not call the language model. The language model takes part when a strategy has to be chosen, a failure explained, or a program changed. Joint control, vision updates, and model inference can each run on their own time scale.

To support this way of executing, the task program will run in a separate subprocess. The program can wait for a motion to finish while the outer rollout keeps stepping the simulation. Only the simulation adapter can modify the main physics state, and every action still goes through approval and logging.

When a program raises an exception, the runtime cancels requests that have not yet executed. Physical changes that have already happened remain, and the agent must repair the program from the current state.

Turning Successful Programs into Reusable Skills

One successful task does not mean a reliable skill has formed. The program may depend on a fixed object position, a favorable viewpoint, or one lucky grasp.

What we want to save is a parameterized operation. For example, top_grasp() takes an object description and a lift height, perceives the target afresh on every run, and then calls the same approach, close, and verify sequence.

The basic structure of the skill library is:

Platform primitives
  → Parameterized skills
    → Task programs

Primitives provide locating, moving, aligning, and stopping on contact. Skills organize those primitives, and task programs combine skills to reach the user’s goal.

Every skill will carry its applicability conditions, required capabilities, dependency versions, and validation record. The agent can create candidates, but a candidate has to pass independent tests on randomized scenes before it enters the skill library that is available by default.

Repairing a skill produces a new version, and existing versions are kept. That way programs can pin their dependencies, and a failure can be traced to specific code.

The first reuse experiment will use the same top-grasp skill to complete both “place on the plate” and “move to another designated area.” We want to see whether it reduces repeated code, and whether it keeps its original reliability.

Validating in Simulation First

The first environment contains only a Panda, a table, a cube, a target plate, and a contact test pad. These objects are enough to cover the three questions we most need to validate:

Task Question it validates
Pick and place at random positions Can Metal organize a complete operation, and can skills be composed?
Alignment after the target moves Can feedback inside an action correct an existing plan?
Stopping after touching the test pad Do the stop condition, debouncing, and force limit work?

Early in development, we will use simulation ground truth to debug geometry and control. After that we will turn off object-pose ground truth, switch to RGB-D perception, and report the results of the two configurations separately.

Task success is judged by an independent scorer. A program returning “success,” a gripper that has closed, or a trajectory that has finished playing is not sufficient evidence that the task was completed.

The evaluation will also be done in separate parts: first comparing the same program with and without internal feedback, then comparing the gains from unified Metal tools and a frozen skill library. The model, perception backend, task distribution, and budget have to stay the same.

Besides success rate, we will record recovery time after a disturbance, end-point error, peak contact force, stopping delay, model-call cost, and failure reasons. These metrics help tell which layer an improvement came from.

What Comes Next

The first milestone is a hand-written top-grasp skill that executes reliably in randomized simulated scenes, adjusts when the target changes, and returns a diagnosable result when it fails.

After that we will connect CapX’s coding-and-repair loop, so the agent generates programs from instructions and submits operations that pass regression tests to the skill library.

We want every task this route produces to leave behind a program that can be inspected, an execution record that can be reproduced, and a skill with a clearly stated scope. Only then can improvements in foundation models, robot tools, and skill libraries be observed and compared within the same open evaluation.