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.
Figures & tables
Figure 1: HyperHarness bridges shared workflows and per-user search with a history-to-harness generator for zero-search deployment.
Figure 2: Overview of HyperHarness . Given a user’s permitted history, a shared generator organizes historical evidence and prompts a frozen construction LLM to synthesize executable retrieval and answer-guidance code. Downstream task scores across training users guide iterative updates to the generator specification, after which the frozen generator constructs personalized harnesses for unseen users directly from their histories without per-user search.
Qwen3.5-9B
Qwen3.8-27B
GPT-5.6-Luna
Method
Score ↑
Tdeploy↓
Score ↑
Tdeploy↓
Score ↑
Tdeploy↓
PersonaMemv3
No History
45.54
0.79
47.46
0.84
53.90
0.69
Long Context
48.56
38.23
51.66
38.24
55.81
38.01
BM25
46.79
4.42
51.40
4.47
56.00
4.21
Rolling Memory
44.51
23.97
49.03
24.12
57.79
22.21
Table 1: Main personalization results across three benchmarks and three frozen answering models. We report user-equal TEST scores ( ↑ ) and deployment tokens Tdeploy per scheduled query in thousands ( ↓ ). Bold and underline mark the best and second-best values for each metric among personalized methods. Gray indicates the No History reference.
Figure 3: Relative changes in model input, packed history, guidance length, and evidence-reading programs across nine runs, where open and filled symbols in (d) mark initial and trained programs. Optimization reduces model input in seven of nine configurations while tailoring context allocation to each task and executor.
Figure 4: Cluster-disjoint TEST scores with Qwen3.5-9B (top) and Qwen3.8-27B (bottom), with initial and trained HyperHarness highlighted in green. Vertical axes are truncated so bar-length ratios are not meaningful; full scores in Table 4 show strong transfer on Mem-PAL and PersonaMemv3 alongside more limited transfer on MemoryCD.
Figure 5: History robustness under recent-record retention (top, blue) and irrelevant-text replacement (bottom, orange) with Qwen3.5-9B , 12 users per dataset, and one seed. Retention uses record fractions; replacement uses token fractions.
Figure 6: Cumulative optimization token costs across users with Qwen3.5-9B and a 200-record history cap, where markers indicate the end of per-user sums, dashed lines extrapolate to 500 users, and diamonds mark crossover points. By amortizing shared training across users, HyperHarness scales at a much lower marginal cost than per-user search baselines.
Figure 7: Harness construction, recommendation traces, and aggregate results for two unseen PersonaMemv3 users.
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
PersonaMemv3
Mem-PAL
MemoryCD
Measure
Train
Test
Train
Test
Train
Test
Users
25
75
50
50
100
223
Items
1,860
5,700
418
408
1,200
2,676
Mean items per user
74.40
76.00
8.36
8.16
12.00
12.00
Appendix
Table 2: User and scheduled item counts for the main experimental splits.
MemoryCD
Qwen3.5-9B
Qwen3.8-27B
GPT-5.6-Luna
Measure
Initial
Optimized
Initial
Optimized
Initial
Optimized
TEST score
35.52
36.97
35.26
37.88
38.72
39.43
History characters (k)
10.09
9.93
10.12
10.12
10.12
10.12
Guidance characters
486.3
251.5
485.6
577.0
478.8
326.3
Reads evidence (% programs)
91.7
0.0
71.7
87.4
70.9
3.6
Input tokens
3,642.12
3,569.62
3,623
3,654
3,472
3,449
Appendix
Table 3: Initial and optimized HyperHarness results. Lengths and input tokens are per query. MemoryCD TEST scores and Qwen3.5-9B measures use the matched-initialization subset; remaining MemoryCD context measures come from the full main runs.
MemoryCD
Mem-PAL
PersonaMemv3
Method
Qwen3.5-9B
Qwen3.8-27B
Qwen3.5-9B
Qwen3.8-27B
Qwen3.5-9B
Qwen3.8-27B
No History
30.62
27.41
23.10
27.67
46.09
51.01
Long Context
33.23
34.94
28.38
25.44
46.51
51.42
BM25
31.15
29.87
25.61
30.04
46.14
50.39
Rolling Memory
22.33
29.16
31.86
27.37
46.43
46.11
Mem0 with RAG
30.80
27.64
22.92
27.41
39.27
47.33
Appendix
Table 4: TEST scores on the fixed cluster-disjoint split. Bold and underline identify the best and second-best history-aware methods. Gray marks the No History reference.
Rollout tokens (M)
Benchmark
Model
HyperHarness
Meta-Harness
GEPA
Qwen3.5-9B
45.67
322.95
502.92
PersonaMemv3
Qwen3.8-27B
81.07
1,014.91
427.10
GPT-5.6-Luna
39.82
444.94
321.59
Qwen3.5-9B
39.96
100.03
118.09
Mem-PAL
Qwen3.8-27B
37.24
330.01
99.41
Appendix
Table 5: Deployment-model rollout tokens during optimization (input plus output).
Figure 8: TRAIN scores of the incumbent generator across optimization rounds. Plateaus indicate no adopted improvement. Panels use different vertical scales; these curves measure training progress, not held-out gains.
Figure 9: Random-retention and matched-deletion controls for Figure 5 , with the same users, generators and dataset-specific scales. Retention matches record counts; deletion uses the same whole records as replacement, so token fractions are approximate.
Dimension
Neural Hypernetworks (e.g., PEFT Generation)
HyperHarness (Harness Generation)
Conditioning input
Task embedding, prompt description, or textual user profile/history
Permitted raw user interaction history Hucon
Generated artifact
Continuous weights or low-rank adapters ( Δθu )
Discrete executable retrieval and guidance code ( hu )
Generator parameterization
Continuous neural weights trained end-to-end by gradient descent
Discrete prompts, code, and resources S driving a frozen builder LLM
Training signal
Backpropagated downstream loss through generated weights
Derivative-free cross-user optimization from downstream task scores
Executor requirements
White-box access to a specific open-weight checkpoint and architecture
Frozen open-weight or hosted black-box executor via API/context
Mechanism of adaptation
Modulates internal hidden representations and output distributions
Controls memory indexing, multi-query retrieval, filtering, and prompt guidance
Appendix
Table 6: Conceptual comparison between neural hypernetworks for LLM personalization and HyperHarness . Both paradigms amortize adaptation across users via a shared conditional generator, but they operate in fundamentally different output, optimization, and execution spaces.
(a) PersonaMemv3
Method
Personalization ↑
Recommendation ↑
Restraint ↑
Agentic & Proactive ↑
Overall ↑
Tdeploy↓
Qwen3.5-9B
No History
42.89
26.89
69.48
38.33
45.54
0.79
Long Context
46.34
36.65
63.03
44.94
48.56
38.23
BM25
47.25
32.46
66.88
38.02
46.79
4.42
Rolling Memory
43.09
35.69
59.92
36.62
44.51
23.97
Appendix
Table 7: TEST subcategory scores, Overall scores and deployment tokens (thousands per scheduled query). Bold and underline mark the best and second-best values for each metric among personalized methods. Gray indicates the No History reference. NR denotes unreported values. Overall and deployment values reproduce Table 1 .
(b) Mem-PAL
Method
Work & Study ↑
Health & Wellness ↑
Family & Social ↑
Daily Life & Leisure ↑
Overall ↑
Tdeploy↓
Qwen3.5-9B
No History
25.04
27.59
21.67
26.11
27.08
3.98
Long Context
29.66
30.03
23.18
33.33
28.96
32.72
BM25
25.74
29.74
26.44
21.39
27.43
5.02
Rolling Memory
24.53
29.35
26.61
35.00
28.92
63.82
Appendix
Table 8: Continued: Mem-PAL domain scores, Overall scores and deployment tokens under the same reporting protocol.
(c) MemoryCD
Method
Item Ranking ↑
Rating Prediction ↑
Review Summarization ↑
Review Generation ↑
Overall ↑
Tdeploy↓
Qwen3.5-9B
No History
17.52
81.50
18.22
13.12
32.59
0.96
Long Context
19.95
85.99
18.16
15.66
34.94
32.51
BM25
16.48
83.56
18.67
13.68
33.09
2.54
Rolling Memory
11.50
51.46
18.06
12.32
23.34
35.40
Appendix
Table 9: Continued: MemoryCD task scores, Overall scores and deployment tokens under the same reporting protocol.