A personal AI agent can choose for itself which events from a user’s history to search and how to factor them into its response. HyperHarness learns to create a program for each person based on their history, then evaluates the program on tasks for other users. This adapts the agent’s behavior without requiring a lengthy search for every new user.
The main idea
Most systems either use the same approach to user history for everyone or tailor their behavior separately for each person. HyperHarness sits between these approaches: a shared generator learns to create personalized programs, then builds a program for each new user in a single pass.
🟠 The shared generator learns patterns in user histories that can help personalize responses.
🟠 For each user, it creates executable code for searching their history and instructions for the answering model.
🟠 During training, the programs are evaluated on task results, and the generator is updated to improve average performance.
🟠 When a new user comes along, the generator is already frozen: there’s no need to evaluate and iterate over program variants.
What is HyperHarness?
HyperHarness is a wrapper around a language model that determines which records from a user’s history to pass to the model and how to explain what they mean. The system consists of a shared generation process, a program for each user, and a fixed execution environment.
HyperHarness turns a user’s history into personalized code. Task evaluations on training users help improve the shared generator.
First, the system collects the user’s permitted history and organizes it as evidence, distinguishing explicit preferences, weak signals of interest, the user’s own posts, and omissions. This helps prevent, for example, a video view from being treated as approval or a passing interest from becoming a permanent preference.
Next, a frozen language-model constructor writes a short piece of executable code. It has two main functions:
🔵 The search function selects records, builds queries, filters out noise, and determines how much context to use.
🔵 The recommendation function tells the answering model how to interpret the results: whether to account for older preferences, distinguish direct from indirect signals, and when it’s better not to personalize the response.
Before use, the program is checked to make sure it follows the required interface, runs successfully, and respects the constraints. These checks catch execution errors, but they don’t assess personalization quality.
The final component is a generator shared across all users. During training, it receives task scores and adjusts how it processes history, the prompt it gives the constructor, and the search operations available. The constructor and answering model remain unchanged. The result is a ready-to-use procedure for new users.
How it works: recommendations for a user
Imagine someone who often saves Spanish comedy clips and dance videos, but hides posts about fighting. The system needs to rank 16 recommendations by how likely the person is to be interested in them.
1. The system prepares the history. The generator separates saves and positive reactions from hidden posts and accidental views. If the history is incomplete or signals conflict, it may infer the user’s preferences incorrectly.
2. The constructor creates a program. It might include queries about Spanish TV series, family comedies, and dance, as well as a filter for unwanted topics. If the constructor mistakes a weak signal for a lasting preference, the search may return irrelevant records.
3. The program searches for evidence relevant to the request. It passes selected records to the answering model, along with brief instructions on how to use them. The search may run out of context before it reaches its second query.
4. The model ranks the candidates. It matches the inferred preferences against the 16 posts. Even with the right history, the results may include similar but unsuitable options.
In the example from the article, the first search query used up the available context, so the second search never ran. The ranking score for this particular set of recommendations remained zero. This shows that personalized code can improve search, but it can’t guarantee a good result for every individual recommendation set.
Two new users get different search rules, even though their programs are created by the same generator.
How it was evaluated
The authors tested the system on three benchmarks: personalized conversations and recommendations, preference-based decision-making, and transferring user preferences to products in a new domain. Training and test users were kept separate for each benchmark. When creating a program, the system had no access to test queries, correct answers, or test scores.
Quality was measured using the benchmarks’ official metrics: scores for responses and recommendations, decision accuracy, and ranking-quality metrics. The authors first calculated a score for each user, then averaged the scores equally across users. This prevented users with longer histories or more queries from carrying extra weight.
HyperHarness was compared with approaches that pass the full history in the prompt, search by keywords, use summaries and persistent memory, or rely on an AI agent with tools, as well as methods for optimizing prompts and wrapper code. The authors evaluated three frozen answering models. To measure savings in context usage, they also ran a separate comparison against MemoryCD on the same queries. For the other comparisons, the authors caution that task coverage and compute budgets may have differed.
Results on test users vary by benchmark: transfer works better on some datasets than on others.
The numbers
The results suggest that the gains aren’t limited to accuracy: the system can choose more compact context while maintaining quality. But performance varies. For example, on MemoryCD, the trained system did worse than passing the full history when tested on its ability to transfer to separate user clusters.
Conclusion
HyperHarness shows that personalization can be achieved by changing how a system works with user history, without changing the answering model’s weights. For each new user, the generator creates separate rules for searching and using evidence, while the cost of training those rules is spread across many users.
However, the system has been tested on only three benchmarks and within a limited search-and-recommendation interface. Robustness tests using corrupted histories covered 12 users per dataset and a single random run. On Mem-PAL, irrelevant text caused significantly more trouble than removing the same records: noise is harder to handle than missing information.
There are practical limitations, too. Generated code must handle personal histories safely, and execution checks alone can’t guarantee that it will search correctly. Each user’s program also stays fixed, even if their interests change. Future work should test the system on more diverse data, examine transfer between groups more closely, and enforce strict rules for accessing user information.
In practice
Teams building personal AI assistants—for example, for recommendation or support products—could use HyperHarness to select relevant information from a user’s history and explain to the answering model how to use it. Rather than applying one search strategy to everyone, the system creates a set of rules for each user. It doesn’t test alternatives against task scores at inference time; in a matched comparison on MemoryCD, it used fewer tokens per answer than passing the full history. To evaluate the approach, teams need permitted user histories, tasks with quality scores, a constructor model, and an environment for safely running generated code; the code is available on GitHub. For now, this remains a research approach: results come from three benchmarks, and deployment in a real service would require privacy, security, and quality checks on that service’s data.
Related work
Unlike MemoHarness, which teaches an agent to change its workflow based on experience from previous runs, HyperHarness uses a shared generator to create a separate executable workflow for each user based on their history—without searching or evaluating alternatives at runtime. SHIFT builds an agent system for a specific request by predicting how useful different options will be. HyperHarness applies this kind of adaptation to personalization based on user histories and evaluates it on three datasets and three answering models.
Read next
VibeVideoAgent: How an AI agent finds errors while rendering a video
Coding4Games: Humans beat all AI agents in ten games.
WeVisForensics: How an AI Agent Finds Generated Videos
Game2Player: How AI Agents Train in Games
How to teach an AI agent to develop an app from scratch
InclusionMed: Which AI should I choose for medical tasks?
Why Is It Difficult for an AI Agent to Act in the Real World?
WorldFoundry: How can you distinguish video generation from world
How AI Can Enhance an Individual’s Intelligence
FrontierPhysics: Let’s see whether AI agents can make discoveries
How AI Chooses the Right Model for Each Task
CaPtain: How to control a robot using a small AI model
AI reviews in simple way
Every day we read fresh AI papers and retell the essentials in plain human language — no hype, no fluff. If you want to see where AI agents are heading before everyone else, subscribe.
New reviews — every day
Follow on X