How to Design a Minimal Execution Harness for Self-Improving AI Agents

    A minimal agent execution harness separates planning, skill management, physical execution, and independent verification. This article explains how to define those boundaries, compose atomic skills into long-running tasks, capture auditable evidence, and feed validated experience back into plans and parameters without allowing uncontrolled changes to execution code.

    Self-improvement does not mean allowing a model to rewrite itself freely in production. It means building a repeatable engineering loop: decision, execution, evidence collection, verification, and feedback.

    The industry has increasingly focused on execution infrastructure, often called a harness, for a straightforward reason: large language models and vision-language-action policies handle interpretation and planning, but physical systems require stable interfaces, explainable failures, and replaceable skills. If the harness becomes bloated, its iteration costs can exceed those of the model itself. Without auditing and verification, recursive self-improvement amounts to little more than logs that cannot support reproducible results.

    Design Goals

    A practical, minimal harness should make four commitments:

    1. Separate decisions from actions. Higher-level components produce structured intent rather than directly controlling joints, end effectors, or laboratory equipment.
    2. Make skills registerable and composable. Long-running tasks are assembled from atomic skills rather than hardcoded into a single script.
    3. Make execution traceable. Every invocation records its inputs, routing, duration, sensor evidence, and failure reason.
    4. Let an independent verifier determine completion. A model’s claim that a task is complete is not evidence that it succeeded.

    Together, these commitments define both minimalism and self-improvement. A small interface surface makes models and hardware replaceable; complete evidence determines whether experience is suitable for reuse.

    A Four-Layer Architecture

    Use four layers that communicate only through explicit data contracts.

    Task and Planning Layer

    This layer accepts natural-language requests or structured work orders and decomposes them into ordered subgoals. Each subgoal declares success criteria, a timeout, and the set of skills it may invoke.

    The planner may use a multimodal decision model, but its output must be a validatable plan, not free-form action instructions.

    Skill Gateway

    The gateway maintains a unified registry of skill names, versions, parameter schemas, preconditions, resource requirements, and risk levels.

    It does not execute physical actions. Its responsibilities are discovery, authorization, parameter validation, and version pinning. The guiding principle is to expose capabilities as plugins: adding a grasping, dispensing, or navigation skill should not require changes to the planner’s core.

    Physical Action Entry Point

    The system should have one entry point for all physical actions. It routes skill invocations to either a simulator or real hardware.

    Different robots, end effectors, and laboratory devices implement the same adapter contract: connect, reset, execute, emergency stop, and status query. Switching between simulation and hardware then becomes a configuration change rather than an agent rewrite.

    Verifier

    The verifier compares execution evidence against task criteria and determines whether the task is complete, partially complete, or failed.

    Evidence may include pose error, force-sensor thresholds, visual detection results, or device readbacks—not the model’s verbal confirmation.

    The following pseudocode illustrates the layer boundaries; it is not an interface from a specific product:

    1. plan = planner.decompose(task, success_criteria)
    2. for step in plan.steps:
    3. skill = gateway.resolve(step.skill, step.version)
    4. gateway.validate(skill, step.args, step.preconditions)
    5. trace = executor.invoke(skill, step.args, deadline=step.timeout)
    6. verdict = verifier.judge(step.criteria, trace.evidence)
    7. store.append(step, trace, verdict)
    8. if verdict.status != "passed":
    9. break

    Atomic Skills and Long-Running Tasks

    Long-running tasks often fail not because the model is too weak at an individual step, but because intermediate states cannot be reused reliably.

    Atomic skills should have fixed input and output schemas, declared side effects, classifiable failures, and unit tests that can run in simulation.

    Skill composition should follow three constraints:

    • Explicit handoffs. Output fields from one step must supply the values needed to satisfy the next step’s preconditions. Do not pass state through implicit global variables.
    • Rollback or reset behavior. Physical actions are often irreversible. At minimum, declare which steps require forward compensation and which can be reset and retried.
    • Visible budgets. Include step counts, time limits, retry limits, and equipment usage in the plan. Unbounded self-directed loops must not lock up the operating environment.

    For example, a multistep experiment can be decomposed into “locate container → transfer a measured quantity → mix → wait → read measurement.” Each stage is an independently testable skill. The verifier determines overall success from measurement evidence.

    The skills and evidence-collection methods can remain unchanged when the planner is replaced. That independence is a key reason to maintain a harness separate from the model.

    Auditability and Experience Feedback

    Structured experience—not chat history—is the fuel for self-improvement.

    Each execution trace should include at least:

    • Task identifier
    • Plan version
    • Skill version
    • Parameter summary
    • Target hardware or simulation environment
    • References to sensor evidence
    • Verification result
    • Failure category

    Experience feedback can operate at three levels, from least to most interventionist. Each should be independently disableable.

    1. Retrieval augmentation. Retrieve similar failure cases before planning. They influence prompts or constraints without changing the executor.
    2. Skill parameter revision. Use samples that passed verification to update default parameters within safe ranges. Every change must be versioned.
    3. Plan template consolidation. Turn repeatedly successful subgoal sequences into reusable templates. Templates must still pass through the gateway and verifier rather than bypassing the execution entry point.

    Rewriting executor code online should not be the default improvement path. In physical systems, self-improvement should focus on plans, skill versions, and parameters, with human approval checkpoints retained. Otherwise, a single faulty feedback update can escalate into equipment risk.

    Minimalism Principles

    • One execution entry point. Planning and tool layers must not establish their own direct hardware connections.
    • No hidden skill channels. Every call capable of changing physical state must be registered through the gateway.
    • Separate generation from verification. The component that generates a plan must not be its sole judge.
    • Synchronous by default, with explicit failures. Long-running actions need deadlines and heartbeats, not indefinite waits.
    • Shared skill contracts for simulation and hardware. Keep differences in adapters and safety limits.

    Use standard capabilities for logging, metrics, and alerts. Centralized logs should retain execution traces; metrics should track success rates, retry rates, and timeout distributions; alerts should flag emergency stops and consecutive failures. The harness does not need its own proprietary protocol.

    Common Implementation Pitfalls

    Mapping model outputs directly to low-level control commands forces the entire pipeline to be rewritten when the robot changes.

    Implementing verification as another model query—“Is it done?”—can produce false success reports when sensors fail.

    Skill granularity also matters. Skills that are too large prevent local retries within long-running tasks. Skills that are too small create gateway overhead and trace noise that overwhelm planning.

    Finally, experience feedback must distinguish simulation from real hardware. Otherwise, simulation bias can become embedded in default parameters used on physical equipment.

    A safer implementation sequence is:

    1. Establish the data contracts and verifier.
    2. Integrate one simulated hardware platform and use short tasks to validate end-to-end tracing.
    3. Add atomic skills and composition templates.
    4. Enable limited parameter or template feedback, while preserving the ability to roll back to the previous skill version.

    Conclusion

    A minimal self-improving agent harness is not about stacking frameworks. It is about using a small number of layers to separate decisions, skills, physical execution, and independent verification—and using traceable evidence to decide which experience is worth retaining.

    With these boundaries in place, models, skills, and hardware can be replaced independently, giving long-running tasks a path toward continuous improvement without sacrificing auditability.