Harness-R1: Learning Executable Runtime Harnesses from Agent Failure Trajectories

RepositoryDeepExperience/Harness-R1Research

Harness-R1 trains a dedicated 'harness engineer' model that inspects failed agent trajectories and writes reusable runtime patches to guide frozen target agents towards task success.

Key points

  1. Synthesises executable runtime patches directly from batches of agent failure packets.
  2. Operates via sandboxed lifecycle hooks: on_init, make_pre_hint, on_before_action, and on_post_step.
  3. Uses Qwen3.5-9B as the engineer model, trained using SFT and online GRPO.
  4. Evaluated across WebShop, ALFWorld, and DBBench benchmarks under an Apache-2.0 open-source licence.

Why it matters

Rather than retraining base models or manually tweaking prompts after execution failures, Harness-R1 introduces an automated mechanism to patch runtime harnesses. It programmatically injects constraints, hints, and state updates to repair agent behaviours on the fly.

Analysis

Developed by researchers at Shanghai Jiao Tong University, Xiaohongshu, and Southeast University, the repository serves as the official implementation of arXiv preprint 2608.02276. It treats runtime safety and steering as an RL problem: patches are validated, executed in a sandbox, and rewarded based on metric gains over the baseline. The codebase represents an early-stage research artifact targeted at AI agent researchers and framework developers.

Found in

Summary generated by AI (Gemini 3.8 Flash, 27 September 2026). It may contain errors – the original source is authoritative.

Similar in content, found by the AI search.

  • Article:Shuai Shao, Kangning Zhang, Qingyao Li, Shijian Wang, Hao Wang, Wenxiang Jiao, Yuan Lu, Yi Guo, Weiwen Liu, Weinan Zhang

    Harness-R1: Learning to Edit Executable Runtime Harnesses from Agent Failure Trajectories

    Researchers introduce Harness-R1, a framework that trains a dedicated agent to adapt and patch the runtime harness of LLM agents based on failure logs. Using online reinforcement learning, a separate 9B model learns to generate executable patches for context handling, tool mediation, and error recovery to directly improve task completion.

    AI & LLMs· Research

  • Repository:walkinglabs/learn-harness-engineering

    Learn Harness Engineering: Open-Source Course for Reliable AI Coding Agents

    The open-source project learn-harness-engineering by walkinglabs provides a project-based beginner curriculum on harness engineering for autonomous coding agents. It teaches how to build runtime environments, state management, verification routines, and control systems needed to operate AI agents reliably.

    14.8kstarsTypeScript

    AI & LLMs· Tutorial

  • Repository:PrimeIntellect-ai/prime-agent

    Prime Agent: Self-Improving RLM Harness for Long-Running Coding Workflows

    Prime Agent is an open-source coding and research agent designed for complex and long-running autonomous workflows. It combines a Recursive Language Model (RLM) architecture with a Continual Harness to manage context programmatically and persist learned skills across sessions.

    19.9kstarsTypeScript

    AI & LLMs· Tool

  • Link:DeepSeek

    DeepSeek Harness: Modular Open-Source Framework for AI Agents

    DeepSeek has launched a developer preview of DeepSeek Harness, an open-source runtime framework for AI agents. Built on the Cordis kernel, it implements an architecture where all capabilities are plugins alongside an append-only event stream for full traceability.

    AI & LLMs· Announcement

  • Article:Hongjun Liu, Yifei Ming, Shafiq Joty, Chen Zhao

    HASP: Harnessing LLM Agents with Executable Skill Programs

    A research team introduces HASP (Harnessing LLM Agents with Skill Programs), a framework that converts past agent experiences into executable Program Functions (PFs). Instead of relying on passive textual prompts, PFs act as executable guardrails that trigger on failure-prone states to alter the next action or supply corrective context.

    AI & LLMs· Research

  • Repository:deepseek-ai/deepseek-harness

    DeepSeek Harness: Plugin-Based Open-Source AI Agent Framework

    DeepSeek Harness (dsh) is an open-source AI agent harness by DeepSeek AI. Built with TypeScript and Cordis, it uses an 'everything-is-a-plugin' architecture to provide modular agent capabilities and a Web UI.

    212.8kstarsTypeScript

    AI & LLMs· Tool

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.