HyperHarness: Learning to Generate Personalized Agent Harnesses from User Histories

Zhaoxuan Tan, Meng Jiang and colleagues at the University of Notre Dame, UC Santa Barbara and Microsoft propose HyperHarness, which learns one shared generator that writes a personalized memory and retrieval harness for each user from that user's history.
Ask this paper
Tradeoff. One shared memory workflow is cheap but cannot adapt to different histories. Per-user harness optimization adapts but needs repeated scored search per user and suffers from noisy log supervision.
Generator. A construction LLM writes user-specific retrieval and answer-guidance functions. Task scores across training users refine the shared generator, with no reference harnesses and no updates to the answering model.
Deployment. The frozen generator builds a harness for an unseen user in one pass from history alone, with no per-user search.
Results. Across PersonaMemv3, Mem-PAL and MemoryCD with three answering models, it gets the best aggregate score in seven of nine settings, improves on the strongest baselines by up to 5.95 points, and cuts answer-time tokens 90.32% versus long-context prompting.
Abstract
Personalized LLM agents rely on an agent harness, the surrounding memory and control code, to connect user history with downstream decisions. Existing methods typically employ either a single shared memory workflow across all users, which is efficient to deploy but cannot adapt how evidence is retrieved and interpreted across diverse histories, or per-user harness optimization, which customizes behavior for each user but requires costly repeated candidate evaluation at deployment and suffers from sparse, noisy supervision in raw logs. To address this trade-off, we present HyperHarness, a framework that learns a shared history-to-harness generator to synthesize executable, user-specific retrieval and answer-guidance code directly from user histories. Given a user's permitted history, HyperHarness prompts a construction LLM to write personalized retrieval and guidance functions, while downstream task scores across training users supervise iterative refinements to the shared generator without reference harnesses or answering-model updates. At deployment, the frozen generator constructs a harness for each unseen user in a single pass from history alone, eliminating per-user task-scored search. Across three benchmarks (PersonaMemv3, Mem-PAL, and MemoryCD) and three answering models (Qwen3.5-9B, Qwen3.8-27B, and GPT-5.6-Luna), HyperHarness achieves the highest aggregate score in seven of nine settings and ranks second in the remaining two, improving over the strongest baselines by up to 5.95 points while cutting matched answer-time tokens by 90.32% over long-context prompting. Analyses show that optimization tailors context allocation to each executor, transfers to unseen user clusters, and amortizes adaptation costs.