One harness per user: HyperHarness aims to eliminate repeated search during deployment
Researchers from Microsoft and collaborating institutions propose HyperHarness, which turns personalized Agent harnesses into code generated from user history. Across three benchmarks and three answer models, it earns the top score in 7 of 9 settings, while using 90.32% fewer answer tokens than long-context prompting.
Personalized Agent memory and control code is usually called a harness. It connects user history with downstream answers, determining which evidence is retrieved and how it is interpreted. DAIR.AI recommended a new paper by Microsoft and collaborators from the University of Notre Dame, UC Santa Barbara, and other institutions. HyperHarness aims to solve how to make harnesses inexpensive while still adapting to each user.
Two approaches, each with a cost
One approach shares a single memory pipeline across all users. Deployment is cheap, but it is hard to adapt to different histories. The other approach optimizes a harness separately for each user. Adaptation is stronger, but deployment requires repeated scored searches for every user, and supervision in raw logs is sparse and noisy. For people building personalized assistants, the trade-off is concrete: either sacrifice adaptation or bear the search cost.
Turning harness writing into a generation task
HyperHarness trains a shared generator that maps user history to a harness. Given the history a user is allowed to use, a construction LLM writes retrieval functions and answer-guidance functions specific to that user. During training, downstream task scores from training users are used to iteratively improve this shared generator. No reference harness is needed, and the answer model is not updated.
In use, the deployment stage does not call the answer model or run a search for each user. A frozen generator reads a new user's history once and directly produces a set of executable functions. The paper calls this a one-time construction, eliminating per-user task-scoring searches.
Results and boundaries
On three benchmarks—PersonaMemv3, Mem-PAL, and MemoryCD—and with three answer models—Qwen3.5-9B, Qwen3.8-27B, and GPT-5.6-Luna—HyperHarness achieves the highest aggregate score in 7 of 9 settings and ranks second in the remaining 2. It beats the strongest baseline by up to 5.95 points and uses 90.32% fewer tokens when answering than long-context prompting. The paper also notes that optimization adjusts context allocation according to the execution model, can transfer to unseen user clusters, and can amortize adaptation costs.

One point worth noting: differences among personalized assistants may not be fully determined by the answer model. The retrieval and control code written around the model determines which evidence in the history is retrieved and how it is interpreted. HyperHarness treats this code as a learnable artifact and generates it once at deployment. This idea is a useful reference for teams working on memory.
For non-technical readers, it can be understood this way: the assistant should not stuff the entire chat log into the model every time. Instead, it should first generate a set of retrieval and answer rules based on that user's history. Whether the rules are written correctly is calibrated by task scores during training. DAIR.AI wrote in its recommendation that if you are building personalized assistants on top of user memory, this paper is worth reading.
Paper link: arxiv
Paper chat page: Chat with Paper
发布时间: 2026-11-28 03:28