MemoHarness: Adaptive AI Agent Control Learns from Experience

Yue Huang, Wenjie Wang, Han Bao, Yuchen Ma, Xiaonan Luo, Yi Nian, Haomin Zhuang, Zheyuan Liu, Yue Zhao, Xiangliang Zhang· July 17, 2026 View original

Summary

Researchers introduce MemoHarness, an adaptive framework that optimizes AI agent harnesses by learning from past executions. It decomposes the harness into editable control dimensions, stores experience in a dual-layer bank, and adapts the harness to new cases without test-time labels, improving performance across various benchmarks.

The "agent harness" is the external control layer that transforms a base Large Language Model (LLM) into an executable agent, managing critical functions like context, tools, orchestration, and memory. While harness design profoundly impacts agent behavior, most optimization efforts focus on narrower aspects like prompts. This paper introduces MemoHarness, a novel framework for adaptive harness optimization that learns directly from its own operational experience. MemoHarness breaks down the agent harness into six distinct, editable control dimensions. It maintains a dual-layer experience bank, storing both case-specific diagnoses and distilled global patterns. This accumulated experience allows MemoHarness to adapt the harness configuration to each new test case, retrieving relevant insights without requiring real-time labels, feedback, or additional search. Evaluations across diverse benchmarks, including shell-agent tasks, code generation, and analytical reasoning, demonstrate that MemoHarness consistently outperforms fixed harness configurations. The framework also shows selective transferability to unseen test suites and different base models. Furthermore, its ability to cache retrieved experience can maintain cost-competitiveness. These findings suggest that leveraging execution experience is a practical way to build more adaptive and efficient agent harnesses.

Why it matters

This research provides a method to create more intelligent and adaptive AI agents that can learn and improve their operational control over time, leading to more robust and efficient AI systems in various applications.

How to implement this in your domain

  1. 1Analyze existing agentic workflows to identify key control dimensions for optimization.
  2. 2Design and implement an experience bank to store agent execution diagnoses and patterns.
  3. 3Develop mechanisms for retrieving and applying learned harness configurations to new tasks.
  4. 4Integrate MemoHarness-like adaptive control layers into current agent development.
  5. 5Evaluate the performance gains and cost implications of adaptive harnesses in production environments.

Who benefits

Software DevelopmentAI DevelopmentRoboticsAutomation

Key takeaways

  • Agent harnesses, the external control layers, are crucial for LLM agent performance.
  • MemoHarness optimizes harnesses by learning from past execution experiences.
  • The framework decomposes harnesses into editable dimensions and uses a dual-layer experience bank.
  • Adaptive harnesses improve performance and show transferability across tasks and models.

Original post by Yue Huang, Wenjie Wang, Han Bao, Yuchen Ma, Xiaonan Luo, Yi Nian, Haomin Zhuang, Zheyuan Liu, Yue Zhao, Xiangliang Zhang

"arXiv:2607.14159v1 Announce Type: new Abstract: An agent harness is the external control layer that turns a base LLM into an executable agent by managing context, tools, orchestration, memory, decoding, and output handling. While harness design strongly affects agent behavior, mo…"

View on X

Originally posted by Yue Huang, Wenjie Wang, Han Bao, Yuchen Ma, Xiaonan Luo, Yi Nian, Haomin Zhuang, Zheyuan Liu, Yue Zhao, Xiangliang Zhang on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses