Abstract
Large Language Model-based multi-agent systems (MAS) have shown remarkable progress in solving complex tasks through collaborative reasoning and inter-agent critique. However, existing approaches typically treat each task in isolation, resulting in redundant computations and limited generalization across structurally similar tasks. To address this, we introduce multi-agent cross-task experiential learning (MAEL), a novel framework that endows LLM-driven agents with explicit cross-task learning and experience accumulation. We model the task-solving workflow on a graph-structured multi-agent collaboration network, where agents propagate information and coordinate via explicit connectivity. During the experiential learning phase, we quantify the quality for each step in the task-solving workflow and store the resulting rewards along with the corresponding inputs and outputs into each agent's individual experience pool. During inference, agents retrieve high-reward, task-relevant experiences as few-shot examples to enhance the effectiveness of each reasoning step, thereby enabling more accurate and efficient multi-agent collaboration. Experimental results on diverse datasets demonstrate that MAEL empowers agents to learn from prior task experiences effectively—achieving faster convergence and producing higher-quality solutions on current tasks.
Introduction: The Problem of "Myopic" Agents
Current Large Language Model (LLM) multi-agent frameworks are often "myopic." When a team of agents is tasked with building a software project or solving a complex math problem, they typically treat the request as if they have never encountered a similar challenge before. Even if they solved a nearly identical problem previously, they start from scratch, often falling into the same trial-and-error traps and redundant reasoning loops.
This lack of cross-task learning leads to two major inefficiencies: redundant computation, where agents waste tokens re-discovering strategies, and suboptimal generalization, where they fail to exploit structural similarities between tasks. For instance, the logic required to build a "user management module" remains largely consistent across different applications, yet standard MAS frameworks do not leverage this prior knowledge.
The MAEL Framework
To overcome these limitations, we propose MAEL (Multi-Agent Cross-Task Experiential Learning). This framework treats a multi-agent collaboration network as a graph where agents are nodes and their individual "experience pools" act as learnable weights. The system operates in two distinct phases: experiential learning and inference.
1. Experiential Learning Phase
During this phase, agents solve a set of training tasks using a structured workflow involving decomposition, solving, critiquing, and aggregation. Every step is assigned a reward based on task-specific metrics, such as code pass rates or mathematical accuracy. These "experiences"—comprising the input, the agent's output, and the resulting reward—are stored in each agent's local experience pool.
2. Inference Phase
When a new task arrives, agents utilize a reward-weighted similarity retrieval mechanism. Instead of guessing, they search their experience pools for past instances that are both similar to the current sub-task and highly successful (high reward). These retrieved experiences are injected into the agent's prompt as few-shot examples, guiding them toward proven solution paths and avoiding past mistakes.
Experimental Evaluation
We evaluated MAEL across five diverse benchmarks to test various reasoning capabilities:
- MMLU: General knowledge and multi-domain QA.
- GSM-8K: Grade-school math involving multi-step arithmetic.
- HumanEval: Function-level code generation.
- CommonGen-Hard: Complex commonsense sentence generation.
- SRDD (Software Repository Development Dataset): Large-scale, project-level software development tasks.
Key Results and Insights
MAEL consistently outperformed state-of-the-art baselines like AutoGen and GPT-4o-mini. On the complex SRDD dataset, MAEL achieved a quality score of 76.43%, a significant improvement over AutoGen’s 56.21%.
Efficiency and Convergence
One of the most striking findings was that having a memory makes agents significantly faster. By referencing successful examples, agents often avoid the lengthy "critique-refine" loops that typically take multiple turns. On software tasks, MAEL reached high-quality solutions 26% faster than agents working without a memory pool. Furthermore, on the CommonGen-Hard dataset, MAEL reduced token consumption by 49% compared to the no-experience baseline.
The Importance of Reward-Weighted Retrieval
Our results indicate that simply finding a "similar" past task is insufficient. If an agent failed a past task, mimicking it could be detrimental. By weighting retrieval by reward, MAEL ensures agents only learn from their most successful prior actions. This is particularly effective in software development, where agents can effectively "copy-paste" successful architectural patterns from their memory.
Limitations and Future Work
While MAEL shows great promise, we observed a "distraction effect" on very simple tasks (like MMLU), where extra context occasionally decreased performance. Additionally, as experience pools grow, more sophisticated memory indexing will be required to avoid retrieval bottlenecks. Future research will focus on refining similarity metrics to be more semantically aware and preventing "negative transfer," where agents might over-rely on experiences that are close but not perfectly applicable to the new task.
Summary updated