Giving an artificial intelligence agent memory seems like a straightforward decision: give it access to what it learned from previous tasks and expect better results. But research from IBM and Hugging Face shows that more memory does not always mean better performance.
The right amount depends on the model. Some agents benefit from a complete set of learned instructions, while others work better with a small selection relevant to each task. There are also models that show no measurable improvement because they are already close to their ceiling on the evaluated tests.
Memory does not change the model; it changes its context
The system studied, called ALTK-Evolve, allows an agent to learn from its own experiences without updating its parameters or requiring human annotations.
The process works like this:
- The agent attempts to solve several tasks and generates work trajectories.
- The system extracts reusable patterns from successes and mistakes.
- Those patterns are consolidated into a set of guidelines.
- During inference, the agent receives all the guidelines or only those related to the current task.
In other words, the model’s brain is not modified. The information available to it when making a decision is improved. This makes the technique relatively inexpensive, portable, and compatible with different models.
An agent’s memory is not about repeating entire conversations. It is about turning previous experiences into strategies, mistakes worth avoiding, and lessons for specific situations.
Three ways models respond to memory
The evaluation included eight models, ranging from a dense model with 30 billion parameters to proprietary frontier systems. The researchers observed three main patterns.
Strong models with room to improve
Models with strong capabilities but still significant errors generally benefit from the complete set of guidelines. They can process both frequent recommendations and lessons for less common situations.
DeepSeek-V3.2, a Mixture of Experts model with 671 billion parameters, increased its task completion rate from 79.8% to 89.3%. That represents an improvement of 9.5 percentage points.
Claude Opus 4.6 also improved, although it started from a higher baseline: it went from 90.5% to 94.6%. GPT-5.5 rose from 92.3% to 95.2%.
Models that become overloaded with too much information
Smaller or less capable models can become overloaded when they receive a long list of instructions. In these cases, a combination of two elements works better:
- A compact core of reliable guidelines.
- Some task-specific recommendations retrieved for each task.
The gpt-oss-120b model is a clear example. With selective retrieval, its task completion rate increased from 39.9% to 56%, an improvement of 16.1 percentage points. The complete set of guidelines produced a lower result and consumed around 50% more tokens than the selective alternative.
Models close to their ceiling
Some models show no measurable improvement when memory is added. GLM-5, with 745 billion parameters, maintained the same result: 87.5% task completion both with and without memory.
This does not prove that memory is useless for that model. It could mean that the model was already close to its ceiling on these tasks, that the guidelines did not cover its remaining errors, or that the model did not apply the recommendations effectively.
That is why the researchers use the word saturated as a description of the observed result, not as a definitive explanation.
The test: agents solving tasks across multiple applications
The evaluation was conducted in AppWorld, an environment with 585 multi-step tasks distributed across nine simulated applications. These included calendars, messaging, and payments.
Two metrics were used:
- TGC, Task Goal Completion: the percentage of individual tasks completed correctly.
- SGC, Scenario Goal Completion: a stricter metric. A scenario counts as passed only if the agent solves all of its variants.
The difference matters. An agent can complete a task in most attempts and still fail on a variant with different data, wording, or conditions. TGC measures overall success; SGC measures consistency.
The results show that memory often has an even greater effect on SGC. DeepSeek-V3.2, for example, increased by 9.5 points in TGC but by 16.1 points in SGC. The guidelines appear to be especially helpful for covering edge cases and avoiding failures in less common variants.
More memory can also mean more tokens
The practical problem is that the guidelines must be added to the agent’s context. If the entire set is resent at every reasoning step, token usage can grow quickly.
In the tests, DeepSeek-V3.2 went from an average of 148,000 tokens per task without memory to 263,000 with the complete set. That is an increase of 78%.
gpt-oss-120b went from 110,000 to 166,000 tokens with all the guidelines, an increase of 51%. However, with selective retrieval, it rose only to 116,000 tokens, just 5% more than the baseline configuration.
This last case sums up one of the study’s most useful conclusions: the configuration that improves performance the most for some models can also be the most economical.
The role of caching
The cost increase does not necessarily come from the agent reasoning for longer. In DeepSeek’s case, the average number of ReAct steps remained practically unchanged, between 18 and 19. The additional expense came mostly from repeating the guidelines in every turn.
In production, prompt caching can reduce this impact. The static part of the guideline set remains unchanged between steps and can be cached so it does not have to be processed as new content every time.
The engineering recommendation is simple: keep the shared context prefix stable so the system can reuse it. Does the agent need more memory? Maybe. But it also needs that memory to be designed so it does not make every interaction unnecessarily expensive.
Parameter count is not enough
It would be tempting to conclude that large models need all the memory while small ones need only a selection. The data does not support such a simple rule.
The answer appears to depend on several factors:
- How much room for improvement the model still has on the task.
- The size of its context window.
- The architecture being used.
- The quality of the extracted guidelines.
- The distribution of the evaluated tasks.
- The model’s ability to follow additional instructions.
The researchers also suggest that models with larger context windows could absorb complete sets of guidelines more effectively. Even so, they have not yet experimentally isolated the effect of context-window size from the model’s overall capability.
What this means for people building agents
The main lesson is that memory should be calibrated, not activated as a universal feature.
For less capable models, it makes sense to start with a small core of recommendations and add only the guidelines related to each task. This reduces noise, keeps token consumption low, and can improve accuracy.
For strong models that still have room to improve, providing the complete set may be more useful, especially when combined with caching.
For models that are already close to their ceiling, adding context guarantees nothing. Before increasing memory, it is worth identifying which errors remain and checking whether the guidelines actually address them.
The best memory is not the one that accumulates the most experience. It is the one that gives the agent the experience it can use at that moment.
ALTK-Evolve represents a practical alternative to fine-tuning when you want an agent to learn from its own results without modifying the model’s weights. However, the conclusions are still based on AppWorld, a single benchmark. It will be necessary to check whether the pattern holds in other environments and real-world applications.
The next steps include training a guideline selector based on results, studying memory methods for very weak models, and more precisely separating the effect of context-window size from the effect of model capability. The direction seems clear: agents do not just need memory; they also need to learn how much memory to use.
