In the intricate landscape of enterprise AI, where agents are tasked with complex, long-duration workflows, a critical challenge emerges: how to equip these agents with the persistent memory and adaptive reasoning necessary to navigate dynamic environments. Consider the monumental task of migrating millions of customer records from a legacy CRM to a cloud database. Such an undertaking, often spanning hours, cannot rely solely on an AI’s ephemeral internal context window. Instead, it necessitates a robust runtime layer, often referred to as the "harness," which acts as the agent’s operational backbone. This harness provides essential execution feedback, such as server logs, to maintain an accurate understanding of evolving API connections. It also incorporates state trackers and control-flow mechanisms to meticulously manage completed and pending subgoals, preventing critical data omissions or duplications. Crucially, when unexpected errors arise—like a database rejecting a data batch due to stringent API rate limits—the harness equips the agent with the tools and guidance for recovery.
Historically, imparting instructions to AI agents for tool utilization has been a laborious, human-driven process. Developers meticulously craft rule sets and step-by-step instructions, akin to programming a rigid script. For instance, an agent might be instructed to always consult the company wiki before composing an email. This rigid adherence, however, fundamentally curtails true autonomy. Such agents lack the capacity to independently weigh the costs and benefits of their actions, operating purely on predefined directives rather than learned intelligence.
To surmount these limitations, a collaborative effort between researchers at Meta AI and the University of Illinois Urbana-Champaign has yielded EvoHarness-RL, a groundbreaking framework that introduces a sophisticated layer of abstraction to the agent’s harness. This innovative system trains the underlying AI model to intelligently discern when to read, update, or consolidate information acquired from its environment. The success of AI agents in long-horizon tasks is intrinsically tied to their ability to effectively read and process environmental information. This involves constantly updating their understanding of the surroundings, diligently tracking progress on subgoals, adeptly recovering from failed actions, and leveraging past experiences to inform future endeavors. The harness is the linchpin of this execution process.
While a series of self-evolving agentic frameworks, such as Harness-1, have made strides by accumulating past operational trajectories and distilling them into structured procedural memories—akin to reusable skills, workflows, or code libraries—they generally segregate this long-term skill curation from real-time, in-episode state tracking. These frameworks do not actively train the agent on how to manage its immediate environmental reality or maintain precise awareness of its active task steps during operation.
Xuying Ning, a co-author of the EvoHarness-RL paper, highlighted the significant engineering resources consumed by manual logic and rigid memory structures. "The optimal harness often changes with the model," Ning explained. "Different models may require distinct prompts, memory designs, permissions, or sandbox configurations. When all of this logic is manually coded, every model upgrade can trigger a protracted cycle of tuning and debugging."
Furthermore, existing memory systems that simply accumulate experience can inadvertently degrade an agent’s reasoning capabilities. "Append-only memory operates under the assumption that more context is always beneficial, which is not necessarily true," Ning stated. "Over the course of a long task, the memory might harbor outdated conclusions, unsuccessful attempts, or information that has lost its relevance." Consequently, long-horizon agents demand a dynamic memory system capable of updating, compressing, and replacing information to preclude the repetition of past errors.
EvoHarness-RL: A Unified Workspace for Belief, Progress, and Experience
To transcend the constraints of static, manually crafted prompts, the researchers have introduced EvoHarness-RL. This training technique empowers the agent to optimally leverage its harness. Instead of blindly adhering to hardcoded instructions, the agent learns to construct a structured workspace from unstructured execution data and to intelligently decide when and how to consult this external state during complex workflows.
To streamline the management of the harness’s diverse components, EvoHarness-RL consolidates the agent’s support systems into a singular, unified interface. This interface, dubbed the Belief, Progress, and Experience (BPE) workspace, categorizes the agent’s external needs into three distinct functional areas: Belief, Progress, and Experience.
Rather than engaging with complex, domain-specific APIs, the AI interacts with this streamlined dashboard through four concise meta-actions: track, commit, recall, and note. These commands enable the agent to monitor the live environment (track), formalize workflow updates (commit), consult past strategies before acting (recall), and record newly acquired insights for future reference (note).
These states directly map to high-value enterprise verticals. "In software engineering, Belief can represent the agent’s current understanding of the repository," Ning elaborated, detailing how the agent monitors component interactions and workspace changes. "Progress tracks what has already been completed, what still needs to be done, and the dependencies between different steps." Meanwhile, Experience encapsulates lessons learned, such as user feedback on a mistake, to guide future actions.
The same principle extends to the financial sector, Ning noted. During a compliance audit, Belief might delineate the applicable regulations and available evidence. Progress would meticulously track which checks have been completed and which exceptions remain open. Experience would empower the agent to recognize recurring discrepancies or to discern when an issue warrants escalation.
"Collectively, these states help prevent the agent from losing track of its work or persistently repeating the same failed approach," Ning emphasized.
To imbue the agent with both the operational mechanics and the strategic acumen for managing its external workspace, the researchers devised a two-stage training regimen. The initial stage, supervised harness fine-tuning, enables the base model to extract and structure pertinent information from raw interaction logs into the BPE framework.
However, querying memory or updating trackers consumes valuable time and compute tokens, making it imperative for the agent to avoid indiscriminate tool checks at every juncture. To address this, the second stage employs "cost-aware" reinforcement learning. This phase trains the agent to judiciously calculate when accessing its external state is a worthwhile expenditure relative to its budget. This dual-stage process transforms tool utilization from a rigid, hardcoded prompt into a learned runtime behavior.

EvoHarness-RL in Action: Demonstrating Unprecedented Performance Gains
To rigorously validate EvoHarness-RL, the researchers conducted evaluations within the ALFWorld benchmark, a text-based environment designed to test sequential logic and state tracking through multi-step tasks.
The Qwen3-8B model was utilized as the base model for training. The research team then pitted the trained 8B model against several leading large frontier models, including Claude Opus 4.5, GPT-4.1, and GPT-5. They also compared it against frozen agent frameworks with static tools, such as ReAct, ExpeL, and ReasoningBank, as well as advanced trainable methods like standard GRPO, SkillOS, and SkillRL.
The results revealed a substantial leap in performance, particularly for smaller, more cost-effective models. With EvoHarness-RL, the Qwen3-8B model achieved an impressive average success rate of 96.9%, marking a remarkable 49.0 percentage point improvement over its baseline ReAct counterpart.
Furthermore, the trained model surpassed the performance of advanced trainable frameworks like SkillRL (89.9%) and SkillOS (80.2%). Most notably for enterprise developers focused on optimizing compute costs, the 8B model achieved performance levels comparable to expensive closed-source models like Claude Opus 4.5, which scored 96.4% out-of-the-box.
Beyond augmenting the capabilities of smaller models, the experiments demonstrated that the BPE framework offers universal benefits across all model scales, even without the extensive reinforcement learning phase. When researchers integrated the BPE as a prompt-time harness into frozen, off-the-shelf frontier models, their execution efficiency saw significant improvements. GPT-4.1’s success rate increased by 22.1 percentage points, and GPT-5’s by 25.7 percentage points.
Intriguingly, beyond the quantitative results, the researchers observed dynamic behavioral shifts in the large language models as they underwent EvoHarness-RL training. This phenomenon, termed "harness annealing," manifested as the agent progressively internalized knowledge over time. Initially, the AI heavily relied on querying its Experience and Progress trackers for nearly every operational step. However, as it mastered routine actions, it consciously reduced its dependence on external tools, embedding successful patterns directly into its parameters. In a real-world enterprise context, this translates directly to reduced latency and lower compute costs. By annealing its tool usage, the AI ceases to expend tokens and time querying databases for standard workflows it has already mastered.
Simultaneously, the agent exhibited "harness evolution," dynamically adapting its strategy based on the complexity of the prevailing situation. While it bypassed its tools for simple, familiar tasks, it proactively scaled up its utilization of the Belief and Experience modules the moment it encountered novel environments or unexpected roadblocks. For instance, an AI agent migrating standard database records would proceed with high velocity. Upon encountering an unusual legacy API endpoint or a complex validation error, it would decelerate, access live server logs, and query its historical ticket data to safely resolve the edge case rather than resorting to speculative guesswork.
Integrating EvoHarness-RL into Existing Systems
Despite these substantial advancements, the adoption of new frameworks often presents integration challenges for enterprise engineering teams. However, EvoHarness-RL incorporates an environment adapter that permits internal implementations to retain their domain-specific customizations while still leveraging the trainable layer.
"I believe there is significant potential for integrating BPE into existing orchestration systems," Ning remarked. "It does not necessarily compel teams to replace their current tools or agent frameworks. BPE can function as an additional state-management layer that continuously organizes the agent’s current beliefs, its progress, and its learned experiences."
For enterprise developers concerned about inference costs, the framework addresses the often-overlooked engineering cost associated with consolidation. Because consolidation demands robust reasoning capabilities, teams can opt for a hybrid, asynchronous architecture to optimize budgets.
"One viable compromise is to utilize a frontier model to generate high-quality consolidation data, and then fine-tune a capable open-weight model to handle routine state management," Ning suggested. Furthermore, "as consolidation can occur asynchronously, it does not always need to impede the agent’s primary execution loop."
Teams must also carefully assess when a trainable BPE harness is truly necessary versus when it might be an over-engineered solution.
"For short and stable tasks, ReAct or standard RAG may already suffice," Ning advised. "BPE becomes significantly more valuable when an agent operates over extended periods, spanning hours, days, or even weeks." In these complex scenarios, an agent requires a condensed understanding of its decisions to avoid becoming disoriented, relying on Experience to iteratively improve from prior failures and human feedback.
Ultimately, this approach signifies a pivotal shift for AI orchestration engineers. "It is not a complete replacement of workflow engineering," Ning concluded, "but rather a transition from directly scripting agent behavior to creating systems where superior behavior can be learned."

