Source-linked AI summary

G-Memory: Tracing Hierarchical Memory for Multi-Agent Systems

Guibin Zhang, Muxin Fu, Guancheng Wan, Miao Yu, Kun Wang, Shuicheng Yan

arXiv:2506.07398v2cs.MAcs.CLcs.LG

TL;DR

Existing MAS memory mechanisms are overly simplified, limiting self-evolution by neglecting collaborative trajectories and cross-trial, agent-specific memory. G-Memory addresses this with a three-tier hierarchical graph memory architecture, improving MAS performance across tasks and frameworks, including a 20.89% gain on embodied action tasks.

  • Problem

    Existing MAS memory mechanisms are often limited to inside-trial memory or rudimentary cross-trial artifacts, failing to capture collaborative experience and agent-specific customization.

  • Method

    G-Memory organizes lengthy MAS interaction histories into insight, query, and interaction graphs, providing customized hierarchical memory cues that evolve across episodes.

  • Results

    G-Memory consistently improves performance across task domains and MAS frameworks, with up to a 20.89% improvement on embodied action tasks.

  • Takeaways & Limitations

    G-Memory can be integrated into state-of-the-art MAS frameworks while enhancing self-evolution and cooperation efficiency without modifying the original frameworks.

  • Takeaways & Limitations

    If the underlying language model is compromised or adversarially manipulated, G-Memory’s memory mechanisms could amplify incorrect reasoning.

Abstract

from arXiv · show

Large language model (LLM)-powered multi-agent systems (MAS) have demonstrated cognitive and execution capabilities that far exceed those of single LLM agents, yet their capacity for self-evolution remains hampered by underdeveloped memory architectures. Upon close inspection, we are alarmed to discover that prevailing MAS memory mechanisms (1) are overly simplistic, completely disregarding the nuanced inter-agent collaboration trajectories, and (2) lack cross-trial and agent-specific customization, in stark contrast to the expressive memory developed for single agents. To bridge this gap, we introduce G-Memory, a hierarchical, agentic memory system for MAS inspired by organizational memory theory, which manages the lengthy MAS interaction via a three-tier graph hierarchy: insight, query, and interaction graphs. Upon receiving a new user query, G-Memory performs bi-directional memory traversal to retrieve both $\textit{high-level, generalizable insights}$ that enable the system to leverage cross-trial knowledge, and $\textit{fine-grained, condensed interaction trajectories}$ that compactly encode prior collaboration experiences. Upon task execution, the entire hierarchy evolves by assimilating new collaborative trajectories, nurturing the progressive evolution of agent teams. Extensive experiments across five benchmarks, three LLM backbones, and three popular MAS frameworks demonstrate that G-Memory improves success rates in embodied action and accuracy in knowledge QA by up to $20.89\%$ and $10.12\%$, respectively, without any modifications to the original frameworks. Our codes are available at https://github.com/bingreeky/GMemory.

1 Introduction

The paper identifies simplistic MAS memory as a bottleneck for self-evolution and proposes G-Memory, a three-tier graph architecture that retrieves and updates collaborative experience. Experiments report substantial gains while preserving practical resource use.

  • Existing MAS often rely on fixed workflows or topologies and lack agility to self-adjust from accumulated collaboration experience.
  • MAS memory is commonly limited to inside-trial context or coarse cross-trial artifacts, overlooking nuanced inter-agent collaboration trajectories.
  • G-Memory organizes MAS experience into insight, query, and interaction graphs for hierarchical storage and retrieval.The insight graph abstracts generalizable insights, the query graph records task metadata and connectivity, and the interaction graph stores fine-grained communication logs.
  • For each new query, G-Memory traverses the query graph upward for high-level insights and downward for task-relevant interaction subgraphs.This bidirectional retrieval is designed to provide actionable guidance while mitigating information overload.
  • 20.89% and 10.12% are the reported maximum improvements on embodied action and knowledge QA tasks, respectively.The system also maintains comparable or lower token usage than mainstream memory designs.

2 Related Works

Related work shows that single-agent memory has matured across inside-trial and cross-trial settings, whereas MAS memory remains underexplored and often fails to preserve collaborative processes.

  • Single-agent memory supports context retention within a query and experience accumulation across tasks.These mechanisms have been applied to applications including personalized chat, recommendation, embodied action, and social simulation.
  • Some MAS frameworks omit memory, while others use simplistic inside-trial schemes or compress cross-trial experience into final outcome artifacts.Such designs overlook the nuanced interactions involved in multi-agent task solving.
  • Many LLM-based MAS frameworks rely on predefined workflows, while newer systems generate dynamic MAS in response to environmental feedback.The related-work discussion characterizes continual evolution through interaction with the environment as limited in task-solving MAS.

3 Preliminary

The preliminary section formalizes MAS as communicating agents and defines G-Memory’s three graph levels for representing agents, queries, interactions, and distilled insights.

  • Multi-agent System Formalization: A MAS is represented as a directed graph whose nodes are agents and whose edges define communication channels.Each agent includes a base model, role, memory state, and auxiliary tools.
  • Multi-agent System Formalization: Agents communicate over synchronous epochs in topological order, so each agent processes inputs after its predecessors act.A global aggregation operator then fuses agent responses into an interim solution, with iterations continuing until a limit or stopping criterion.
  • Memory Architecture: The interaction graph represents a query’s trajectory as utterance nodes containing speaker and text, connected by temporal edges.
  • Memory Architecture: The query graph stores tackled queries, task status, associated interaction graphs, and semantic relationships between queries.Its topology supports retrieval beyond coarse embedding similarity.
  • Memory Architecture: The insight graph contains distilled insight nodes linked to supporting queries through contextualizing hyper-connections.

4 G-Memory

G-Memory manages MAS experience through a hierarchical memory workflow that retrieves both abstract insights and fine-grained collaboration trajectories. After execution, it updates the hierarchy using the new query, interaction history, and distilled insights.

  • Coarse-grained Memory Retrieval: G-Memory first retrieves relevant historical queries through coarse-grained similarity search and query-graph hop expansion.The expanded set addresses superficial similarity while avoiding direct insertion of excessive records into the MAS context.
  • Bi-directional Memory Traversal: Upward traversal projects relevant queries into the insight graph to retrieve distilled, generalized knowledge for strategic task guidance.The query-to-insight projector selects insight nodes whose supporting query sets intersect the retrieved query set.
  • Bi-directional Memory Traversal: Downward traversal uses an LLM-facilitated graph sparsifier to retain core inter-agent dialogue elements from historical interaction graphs.This provides concise procedural trajectories while preserving reasoning patterns associated with successful or failed collaborations.
  • Bi-directional Memory Traversal: The retrieved insights and sparsified interaction graphs are filtered for each agent’s role to initialize specialized internal memory before reasoning.G-Memory therefore supplies multi-granularity support rather than identical historical context to every agent.
  • Hierarchy Memory Update: After execution, G-Memory records the new interaction graph, adds the query and its connections, and integrates newly generated or updated insights.Environmental feedback, including execution status and token usage, informs the hierarchical update process.
  • Hierarchy Memory Update: G-Memory continuously refines collective memory from ongoing experience and operates as a plug-in for mainstream MAS frameworks.The architecture is updated across all three hierarchical levels after task completion.

5 Experiment

The experiments evaluate G-Memory across benchmarks, resource costs, sensitivity settings, ablations, and illustrative cases. G-Memory consistently improves MAS performance while maintaining token efficiency, with both hierarchical memory components contributing to results.

  • Experimental Setup: The evaluation covers five benchmarks across knowledge reasoning, embodied action, and game domains, and compares single-agent and multi-agent memory baselines.
  • Main Results: G-Memory improves performance across task domains and MAS frameworks, exceeding the strongest baselines by average gains of 6.8% with AutoGen and 5.5% with MacNet on Qwen-2.5-7b.
  • Cost Analysis: 10.32% improvement over no memory on PDDL+AutoGen requires only 1.4 × 10^6 additional tokens, while MetaGPT-M uses 2.2 × 10^6 tokens for a 4.07% gain.
  • Sensitivity Analysis: 1-hop expansion performs best or near-best, while larger hop counts and k values can introduce irrelevant information and reduce task performance.The experiments use 1-hop expansion and k ∈ {1, 2}.
  • Ablation Study: Removing either high-level insights or fine-grained interactions reduces performance; interaction-only variants drop 4.47% for AutoGen and 3.82% for DyLAN.Insight-only variants drop 3.95% and 3.39%, respectively, while interactions have a slightly larger impact.
  • Case Study: A case study shows G-Memory retrieving an analogous clean-object task and a trajectory in which one agent intervenes before an object is cleaned.

6 Conclusion & Limitation

The paper concludes that G-Memory equips MAS with customized hierarchical memory that evolves across episodes and improves self-evolution. It reports gains up to 20.89% on embodied action tasks but calls for validation on more diverse tasks.

  • G-Memory organizes MAS interaction trajectories into insight, query, and interaction graphs, providing customized memory cues from generalizable insights to task-critical collaborative segments.
  • The memory hierarchy dynamically evolves across episodes and integrates into state-of-the-art MAS frameworks without requiring framework modifications.
  • 20.89% improvement: experiments report gains up to this level on embodied action tasks.
  • The evaluation spans three domains and five benchmarks, while further validation on more diverse tasks such as medical QA remains future work.

Impact Statement

G-Memory may support scalable and adaptive collective intelligence, but compromised or adversarially manipulated language models could cause its memory mechanisms to amplify incorrect reasoning.

  • G-Memory’s broader potential applications include long-term robotic planning, real-world decision-making, and collaborative AI assistants.
  • Compromised or adversarially manipulated language models could amplify incorrect reasoning through the memory mechanisms.The paper urges continual validation, adversarial robustness checks, and alignment with human values.

A.1 Dataset Descriptions

The evaluation uses five benchmarks spanning knowledge reasoning, embodied action, and games, with task-specific metrics. It compares G-Memory against single-agent and multi-agent memory baselines across AutoGen, DyLAN, and MacNet.

  • Datasets and Benchmarks: ALFWorld evaluates text-based household navigation and object interaction through natural-language commands.
  • Datasets and Benchmarks: ScienceWorld evaluates interactive science tasks requiring room navigation, experimentation, procedural reasoning, and scientific exploration.
  • Datasets and Benchmarks: PDDL comprises strategic games in which agents use PDDL expressions to complete complex tasks.
  • Evaluation Metrics: FEVER and HotpotQA use exact-match accuracy, ScienceWorld and PDDL use progress rate, and ALFWorld uses success rate.

B.1 RQ1 Results

Across ALFWorld trials, G-Memory helps multiple MAS frameworks succeed with fewer trials and reach higher final performance ceilings. The reported trajectories cover AutoGen, DyLAN, and MacNet.

  • Performance trajectories: G-Memory enables MAS frameworks to achieve ALFWorld success with fewer trials and higher final performance ceilings.
  • Performance trajectories: The ALFWorld performance trajectories include AutoGen, DyLAN, and MacNet.

B.2 RQ2 Results

G-Memory improves performance while adding little or no token cost, and its graph hierarchy organizes transferable insights and collaborative experiences. Its prompts extract, assess, merge, and customize experience for agents and tasks.

  • Cost analysis: G-Memory incurs only a marginal or no token-cost increase over Generative and MetaGPT-M while delivering the largest performance improvements.
  • Insight graphs: Insight graphs show dense links within similar ALFWorld task categories and meaningful links across categories.These patterns reflect transferable patterns across task types.
  • Query graphs: Query graphs cluster semantically similar queries into dense subgraphs, while sparse inter-cluster edges capture cross-task inspirations.A directed edge indicates that one query’s historical trajectory provides useful guidance for another query.
  • Insight extraction: The learning prompt contrasts failed and successful trajectories to produce concise, actionable insights grounded in their behavioral differences.
  • Insight extraction: The success-learning prompt extracts common behaviors, strategies, and decisions from multiple successful trajectories without speculation.
  • Memory customization: The system merges redundant insights and adapts general insights into personalized guidance for a specified agent role and trajectory.The merge prompt limits the number of refined insights, while the projection prompt tailors them to the agent’s role.
Loading 2506.07398v2…