Before the Memory Agent existed, memory was carried by a task-flow pipeline. The idea was to break "memory" into a handful of fixed steps on the main conversation path and run them in order, one after another.
Before answering the user, the system first reads the context to understand the user's primary, secondary, and hidden intents, then recalls relevant memories based on those intents. Once the conversation moves into execution, it uses the recalled memories to do the task better and faster and to make the output fit the user's preferences, and it can call tools along the way to pull in more memory. After the task finishes, the system runs an effectiveness evaluation on the memory it used: was it actually used, and did it help or hurt the task? It then extracts reusable user preferences, project info, development conventions, lessons learned, and skills from the conversation. Extracted memories go through a quality check, and only the ones that clear the bar are kept. Finally, the system checks whether a new memory conflicts with an existing one, and merges or corrects it if it does, so the store stays consistent.
Task-flow memory pipeline running intent recognition, pre-recall, conversation, effectiveness evaluation, memory extraction, quality check, and conflict handling in sequence.

This design wins on being simple to engineer, easy to trace, and reliable. But it also exposed a few fatal flaws.
Every conversation has to finish intent recognition and pre-recall before anything else happens, and that whole stretch blocks the main task. Because it involves model calls and non-trivial recall logic, the user feels a real lag. That hurts the experience.
Pre-recall only pulls a limited set of memories. The rest have to be fetched dynamically during execution, based on context. In practice we found that even with explicit instructions on when to use them, the model rarely takes the initiative to call memory tools and recall on its own.
The recall path was implemented in engineering logic with a fixed search route. It could not adjust strategy based on an overview and what it already knew, could not widen the search, and could not dig into deeper memories. The results were often only semantically related, not necessarily usable in the current context, because the path had no way to judge whether a memory was actually applicable.
After a task ends, the system still has to run effectiveness evaluation, memory extraction, conflict detection, and so on. In the task-flow pipeline these are separate, isolated steps. They can't see the full context, and they can't call a tool to fill in missing information when they need it. The result: reusable memory doesn't get fully extracted, memory quality doesn't really improve, and broken memories don't get cleaned up properly. The whole thing underperforms.
The core idea behind the Memory Agent is to take "memory" from a set of fixed steps and turn it into an agent that makes its own decisions, letting the model answer three questions for itself:
What's worth remembering? When should it be recalled? What got remembered wrong and needs fixing?

Following the memory lifecycle, we split the Memory Agent into a Recall Agent and a Reflection Agent.
Memory Agent architecture, with the Recall Agent handling attention monitoring and proactive recall, and the Reflection Agent handling evaluation, extraction, and anomaly handling
It continuously monitors the main agent's execution, including key events like task creation, task planning, to-dos, tool failures, task completion, and task failure, and quickly identifies the attention signal, the topic, constraints, and intent the current task actually cares about.
The monitor outputs a structured attention list that holds the background, the memory use case, and what needs to be recalled. If the attention is already known, or a new attention's score doesn't beat the historical high, nothing new needs attention, so it short-circuits and skips the downstream cost.
Based on the attention list and a memory overview, it calls the recall tools to do the recall. Each round of recall has to answer:
If memory is sufficient or there's nothing more to pull, recall ends. Otherwise it combines several recall tools:
Recall results are proactively injected into the main agent. On its next model request, the main agent carries the latest recall results, which are also marked "known" so the same memory doesn't get injected twice.
It kicks in after a conversation ends or fails, and handles reflecting on, optimizing, and tidying up memory. It does three things.
1. Effectiveness evaluation and optimization
It evaluates the memories used in this conversation: did they actually feed into the task, and was the effect positive or negative? For memories that were useless or negative, it digs into why, whether the content itself is wrong or the use case didn't match, then optimizes accordingly: it adjusts the memory's title, keywords, use case, and content, and updates the recall index to make later recall more accurate and efficient.
2. Memory extraction
It checks whether anything in this conversation is worth keeping:
Extraction references existing memory so it doesn't create duplicates.
3. Anomaly detection and handling
It checks for redundant or conflicting memories and merges or corrects the anomalies to keep memory consistent.
Throughout reflection, the agent keeps pulling relevant information through recall tools and makes its adjustments through update tools. To cut cost and support a self-evolving Memory Agent, the rules use a resource-based design that supports dynamic loading. For example, the anomaly-handling rules only load when an anomalous memory is detected, and stay unloaded when none is found.
We ran an offline evaluation set comparing the task-flow pipeline against the Memory Agent across the three core stages of memory: generation, recall, and curation. The Memory Agent posted a clear lift in pass rate at every stage.

Evaluation comparison showing the Memory Agent beating the task-flow pipeline on memory generation, curation, and recall
Key takeaways:
The bottleneck in the task-flow pipeline wasn't parameter tuning. It was the lack of a decision-maker. The pipeline assumes rules can enumerate every "remember this / fetch that" situation. But in real conversations, attention keeps shifting, and no static rule can keep up. The Memory Agent hands the decision back to the model, so the model can take the right action with the right tool at the right moment. That's exactly where the task-flow pipeline was weakest and least fixable. The Memory Agent marks the shift in memory from "passive execution" to "active recall and learning."
How We Used Qoder to Let an Agent Iterate on Itself: Computer Use as an Example
1,495 posts | 509 followers
FollowAlibaba Cloud Native Community - December 11, 2025
Alibaba Cloud Community - July 17, 2026
Alibaba Cloud Native Community - November 24, 2025
Alibaba Cloud Indonesia - July 3, 2026
ApsaraDB - June 4, 2026
Alibaba Cloud Native Community - July 14, 2026
1,495 posts | 509 followers
Follow
Token Plan
Build more, spend less. One plan, every modality.
Learn More
Alibaba Cloud Model Studio
A one-stop generative AI platform to build intelligent applications that understand your business, based on Qwen model series such as Qwen-Max and other popular models
Learn More
Qwen
Full-range, open-source, multimodal, and multi-functional
Learn More
AI Acceleration Solution
Accelerate AI-driven business and AI model training and inference with Alibaba Cloud GPU technology
Learn MoreMore Posts by Alibaba Cloud Community