Source-linked AI summary
Graph-based Agent Memory: Taxonomy, Techniques, and Applications
Chang Yang, Chuang Zhou, Yilin Xiao, Su Dong, Luyao Zhuang, Yujing Zhang, Zhu Wang, Zijin Hong, Zheng Yuan, Zhishang Xiang, Shengyuan Chen, Huachi Zhou, Qinggang Zhang, Ninghao Liu, Jinsong Su, Xinrun Wang, Yi Chang, Xiao Huang
TL;DR
Graph-based agent memory addresses the need for accumulated knowledge, iterative reasoning, and self-evolution in long-horizon LLM-agent tasks. This survey synthesizes taxonomies, lifecycle techniques, resources, applications, and research directions, while highlighting limitations in graph-memory quality, scalability, privacy, and security.
Problem
LLM-agent memory must support knowledge accumulation, reasoning, personalization, and adaptation beyond static model knowledge and finite context windows.
Method
The survey organizes graph-based agent memory by taxonomy and lifecycle, covering extraction, storage, retrieval, evolution, libraries, benchmarks, and applications.
Results
The survey consolidates graph-based agent memory research and identifies applications, open-source resources, critical challenges, and future research directions.
Takeaways & Limitations
Graph-based memory provides a structured perspective for designing self-evolving agent memory and selecting structures and techniques for specific applications.
Takeaways & Limitations
Graph-memory systems remain constrained by scarce intrinsic quality metrics, quadratic-or-worse graph-operation complexity, privacy risks, and adversarial memory manipulation.
Abstract
from arXiv · showhide
Memory emerges as the core module in the Large Language Model (LLM)-based agents for long-horizon complex tasks (e.g., multi-turn dialogue, game playing, scientific discovery), where memory can enable knowledge accumulation, iterative reasoning and self-evolution. Among diverse paradigms, graph stands out as a powerful structure for agent memory due to the intrinsic capabilities to model relational dependencies, organize hierarchical information, and support efficient retrieval. This survey presents a comprehensive review of agent memory from the graph-based perspective. First, we introduce a taxonomy of agent memory, including short-term vs. long-term memory, knowledge vs. experience memory, non-structural vs. structural memory, with an implementation view of graph-based memory. Second, according to the life cycle of agent memory, we systematically analyze the key techniques in graph-based agent memory, covering memory extraction for transforming the data into the contents, storage for organizing the data efficiently, retrieval for retrieving the relevant contents from memory to support reasoning, and evolution for updating the contents in the memory. Third, we summarize the open-sourced libraries and benchmarks that support the development and evaluation of self-evolving agent memory. We also explore diverse application scenarios. Finally, we identify critical challenges and future research directions. This survey aims to offer actionable insights to advance the development of more efficient and reliable graph-based agent memory systems. All the related resources, including research papers, open-source data, and projects, are collected for the community in https://github.com/DEEP-PolyU/Awesome-GraphMemory.
I. INTRODUCTION
LLM-based agents need memory to overcome static knowledge, finite context, and limited adaptation in complex tasks. This survey organizes graph-based agent memory through its taxonomy, lifecycle techniques, resources, applications, and open challenges.
- Agent Memory Motivation: Memory addresses knowledge cutoff and personalization challenges by storing user preferences, interaction histories, task contexts, and external information.It supports tailored responses and reasoning beyond finite context windows without parameter updating.
- Graph-Based Memory: Graph-based memory extends linear, unstructured, and key-value storage with relational dependencies, hierarchical organization, temporal connections, and flexible traversal.The survey positions graphs as a general framework in which plain memory can represent a degenerate graph with trivial relationships.
- Survey Scope: The survey proposes a taxonomy spanning short-term versus long-term, knowledge versus experience, and non-structural versus structural memory.It includes an implementation view focused on graph-based memory.
- Survey Scope: It analyzes memory extraction, storage, retrieval, and evolution as lifecycle techniques for transforming, organizing, accessing, and updating memory contents.These techniques support the management and evolution of agent memory through write, read, update, and delete operations.
- Survey Scope: The survey also covers open-source libraries, benchmarks, application scenarios, critical challenges, and future directions for efficient and reliable graph-based memory.Its stated aim is to help researchers advance memory design and practitioners select structures and techniques for specific applications.
- Agent Memory Motivation: LLM-based agents use perception, reasoning, memory, and action modules to autonomously complete complex tasks.The memory system includes short-term memory for immediate reasoning and long-term memory for experience retention.
III. TAXONOMY OF AGENT MEMORY
The survey categorizes agent memory by temporal scope, cognitive function, and source, distinguishing transient working information from persistent knowledge and experience. These categories provide complementary views of how agents retain facts, skills, associations, interactions, and affect.
- The taxonomy includes temporal scope, functional roles, representational structures, and a unified graph-based implementation view.
- Temporal scope: Short-term memory rapidly maintains recent, immediately relevant context but is volatile and may be consolidated into long-term storage.
- Temporal scope: Long-term memory preserves knowledge, historical interactions, learned patterns, and preferences across sessions for continuity and personalization.
- Cognitive structure: Cognitive memory types include semantic facts, procedural skills and rules, associative links, working-state scratchpads, episodic histories, and sentiment records.
- Knowledge versus experience: Knowledge memory is a passive, static repository of objective, global, verifiable facts and procedures, whereas experience memory actively records interactions, observations, actions, outcomes, and feedback.
D. Non-structural vs. Structural Memory
The survey contrasts flat or sequential memory stores with structural graph-based memory, which represents memory units and their relationships explicitly. It also frames extraction as converting heterogeneous knowledge and experience sources into structured representations for downstream memory systems.
- Non-structural memory: Linear, vector, and key-value or log-based memories support basic recall but struggle with relational context, structured reasoning, hierarchy, complex queries, and dynamic updates.
- Structural memory: Graph-based memory models events, entities, concepts, and observations as nodes connected by semantic, temporal, causal, or logical edges.
- Structural memory: Graph structures support explicit relationship modeling, hierarchical organization, temporal structuring, and traversal-based multi-hop retrieval.
- Structural memory: Traditional memory forms can be represented as simplified graph cases, making graph-based memory a unified and extensible framework rather than only a replacement.
- Memory extraction: Memory extraction transforms text, trajectories, images, observations, and structured records into entities, relationships, events, and other organized memory representations.
V. MEMORY STORAGE: ORGANIZING THE MIND
Memory storage organizes extracted artifacts through graph structures selected according to trade-offs among relational precision, abstraction, temporal fidelity, and preservation of complex interactions. The survey covers knowledge, hierarchical, temporal, and hypergraph paradigms and their construction mechanisms.
- Storage design: Storage design trades relational precision and multi-hop reasoning against compression and abstraction, while temporal fidelity motivates temporal knowledge graphs and hybrid structures.
- Knowledge graphs: Knowledge graphs store factual knowledge as interconnected (head entity, relation, tail entity) triples for structured reasoning and multi-hop queries.
- Knowledge graphs: KG construction uses LLM-based extraction followed by integration operations including conflict detection, relationship pruning, and schema evolution.
- Hierarchical structures: Hierarchical memory organizes information into parent-child trees, enabling top-down querying, bottom-up summarization, semantic clustering, and recursive abstraction.
- Temporal structures: Temporal graphs model evolving validity with time-aware structures, including bi-temporal histories, mention-event time separation, and chronological reasoning constraints.
- Hypergraphs: Hypergraphs preserve n-ary interactions by connecting arbitrary numbers of nodes and can jointly retrieve entities with the hyperedges that bind them.
E. Hybrid Graph Architectures
Hybrid graph architectures combine graph structures with complementary memory stores or internal working states to balance relational precision, breadth, and adaptability. Retrieval composes semantic, structured, and policy-based operators across knowledge and experience memory.
- E. Hybrid Graph Architectures: Hybrid architectures separate static knowledge from dynamic experience to balance graph precision with vector retrieval breadth.Optimus-1 combines a hierarchical directed knowledge graph for game mechanics with a multimodal experience pool for success and failure trajectories.
- E. Hybrid Graph Architectures: External knowledge graphs can be paired with lightweight internal working memory that tracks reasoning history, tool definitions, and intermediate observations.KG-Agent uses an external knowledge graph alongside an internal Knowledge Memory scratchpad.
- E. Hybrid Graph Architectures: Knowledge memory favors relational or containment graphs, whereas experience memory benefits from temporal sequences, interaction trajectories, or user–action networks.The choice of graph type depends on whether memory is stable and context-independent or dynamic and personalized.
- E. Hybrid Graph Architectures: Retrieval pipelines preprocess queries, retrieve candidates, and prune evidence using semantic, structured, and policy-based operators.Semantic retrieval supports fuzzy matching, structured retrieval enforces explicit constraints, and policy-based retrieval selects memory types, operators, budgets, and stopping conditions.
- E. Hybrid Graph Architectures: Pure similarity retrieval can miss task-specific relevance, multi-hop connections, temporal context, and precision as memory scales.These limitations motivate structured retrieval aligned with memory organization and policy-driven operator composition.
3) Temporal-Based Operator:
Temporal retrieval handles time-dependent facts, changing interactions, and evolving experience relevance, while graph traversal connects retrieved evidence across relational and hierarchical memory structures. Adaptive and agentic operators further treat retrieval as a sequential, tool-using decision process.
- 3) Temporal-Based Operator: Temporal operators filter facts by validity and rank experience episodes according to recency and inferred query time ranges.Zep uses explicit validity windows, while LiCoMemory applies decay to older facts and systems can restrict retrieval to parsed time windows.
- 3) Temporal-Based Operator: Graph retrieval expands from query-conditioned anchor nodes into task-relevant subgraphs containing relational evidence.It supports short paths, induced subgraphs, compositional joins, and coherent state–action–reward chains.
- 3) Temporal-Based Operator: Hierarchical graph retrieval traverses within layers and across abstraction levels linking summaries, dialogue chunks, and interaction logs.Examples include entity-centric expansion, bounded-hop neighborhood search, layer-by-layer routing, and bidirectional traversal.
- 3) Temporal-Based Operator: Reinforcement-learning retrieval learns adaptive policies that select memory items, navigation steps, tool calls, or stopping decisions using downstream task rewards.RL-free retrospective labeling and heuristic scoring offer lower-cost alternatives to online end-to-end LLM reinforcement learning.
- 3) Temporal-Based Operator: Agent-based retrieval forms a planning-feedback loop that can call external tools, supplement internal graphs, and store verified results for future use.The agent may choose memory stores and indexes, navigate nodes or abstraction layers, and issue SQL or search requests.
1) Multi-round Retrieval:
Multi-round retrieval iteratively refines queries using previously retrieved evidence, while post-retrieval and hybrid-source strategies expand retrieval beyond a single pass or internal memory. Memory evolution then consolidates, reasons over, reorganizes, and grounds graph contents through interaction.
- 1) Multi-round Retrieval: Multi-round retrieval repeatedly generates queries from the original request and accumulated evidence until the retrieved context is sufficient.Policies can decide whether to re-query, how to refine queries, and when to stop.
- 1) Multi-round Retrieval: Query decomposition enables targeted sub-query retrieval and can reduce semantic drift during complex evidence gathering.Sub-queries may be rewritten to make them more expressive.
- 1) Multi-round Retrieval: Knowledge-oriented loops seek consistent supporting facts, whereas experience-oriented loops seek enough recent and relevant episodic context.The stopping rule therefore depends on the memory type and its evidentiary needs.
- 1) Multi-round Retrieval: Post-retrieval generates an intermediate representation before retrieving memories from inferred topics, entities, relations, or imagined subgraphs.For experience memory, the representation can supply unstated goals, constraints, or previously attempted actions.
- 1) Multi-round Retrieval: Hybrid-source retrieval coordinates internal memory with document indexes, online search, or task environments, requiring source selection, evidence merging, and conflict resolution.External resources cover changing or unseen information, while internal experience preserves personal and local details.
- Memory Evolution: Internal memory evolution consolidates experience into generalized knowledge, resolves contradictions, predicts links, and enriches graphs through inferred relationships.These operations transform raw trajectories into more connected and logically coherent memory structures.
3) Graph Reorganization:
Graph reorganization maintains memory quality by pruning low-utility content and optimizing topology, while external exploration grounds memory through feedback and active inquiry. Libraries and benchmarks support development, but current evaluations incompletely test selective updates, privacy, and graph-guided exploration.
- 3) Graph Reorganization: Significance-based pruning removes or compresses rarely accessed or low-contribution nodes, while topology optimization shortens paths between frequently associated concepts.These mechanisms address retrieval latency, noise, and graph efficiency as memory accumulates.
- 3) Graph Reorganization: Feedback-driven adaptation uses execution outcomes to crystallize successful trajectories and analyze failures into reusable lessons.ExpeL and Matrix distinguish successful and failed trajectories when updating memory content and management policies.
- 3) Graph Reorganization: Active inquiry detects uncertainty or missing nodes and autonomously formulates goals to expand memory beyond assigned tasks.It complements reactive adaptation, which remains subject to coverage bias.
- 3) Graph Reorganization: Explicit use of graph structure for exploration remains underexplored, including topology-guided discovery of sparse clusters and disconnected bridges.The survey suggests multi-granularity exploration that coordinates relational patterns with concrete instances.
- 3) Graph Reorganization: OpenMemory and Mem0 provide broad graph-memory functionality spanning construction, updates, lifecycle management, temporal awareness, and graph management.The survey identifies several other graph-based libraries, including Cognee, MemMachine, Memary, and Graphiti.
- 3) Graph Reorganization: Interaction benchmarks evaluate recall, contextual reuse, and consistency across extended histories, but many do not explicitly supervise conflicting-fact updates.Personalization tasks also often assume clear storage supervision, leaving selective writing and privacy-aware retention less addressed.
4) LongContext: Long-document Understanding and Retrieval:
The survey organizes agent-memory evaluation around long-context, continual, environment-based, and tool/workflow benchmarks, while noting that benchmark performance may conflate memory with other capabilities. It also surveys application-specific memory systems in dialogue, software engineering, recommendation, and finance.
- LongContext: LongContext benchmarks test evidence aggregation, multi-step reasoning, and needle-in-a-haystack retrieval, but many remain single-turn and do not require persistent memory writes.The survey lists NQ, TriviaQA, PopQA, HotpotQA, 2wikimultihopQA, Musique, LongBench, RULER, BABILong, MM-Needle, and HaluMem.
- Continual: Continual benchmarks evaluate online updates, test-time adaptation, forgetting, and transfer under streaming or sequential task distributions.MemoryBench, LifelongAgentBench, StreamBench, and Evo-Memory are presented as examples, but reporting remains nonstandard because metrics vary and gains may reflect parametric updates or retrieval.
- Environments: Environment-based benchmarks test experiential memory under partial observability, but memory benefits must be separated from environment-specific planning and tool-use skills.Ego4D, EgoLife, ALFWorld, BabyAI, ScienceWorld, AgentGym, and AgentBoard cover episodic memory, navigation, experimentation, and multi-round planning.
- Tool/Gen: Tool and generation benchmarks assess process memory by requiring agents to retain intermediate hypotheses, failed attempts, and workflow traces during iterative reasoning.ToolBench, SWE-Bench, GAIA, xBench-DS, and GenAI-Bench also expose operational concerns such as traceability.
- Benchmark strategy: Benchmark selection should match the memory capability under study, with LongContext for large-input retrieval, Continual for learning over time, and interaction or environment tasks for persistence and experience.The survey recommends ablations, changing-information settings, clear efficiency metrics, and reproducible environments to isolate memory effects.
- Applications: Agent-memory applications span conversational dialogue, software engineering, recommendation, finance, and other domains requiring persistent, structured, or evolving information.Examples include multi-session personalization, code-dependency reasoning, dynamic user histories, and financial memory that balances recency with preserved patterns.
E. Game Agents
Game agents require memory that combines world knowledge and experience across dynamic, partially observable environments with long-term goals. The survey situates this need within broader graph-memory applications and identifies structured relational memory as a direction for improving reasoning and reliability.
- Game agents: Game environments require memory for world knowledge, successes, failures, real-time access, skill acquisition, exploration, and multi-step reasoning.The challenge is driven by dynamic rules, long-term goals, and open-world interaction.
- Generalist agents: Generalist game agents use unified interfaces such as screenshots and keyboard-mouse actions, making episodic memory important for retaining cross-interaction context and accumulated gameplay experience.Cradle is presented as an example that operates across multiple commercial games without game-specific APIs.
- Embodied agents: Embodied agents must ground decisions in dynamic, partially observable physical worlds while performing long-horizon manipulation across multiple episodes.Memory bridges high-level language instructions and executable actions in systems such as HELPER and MAP-VLA.
- Trajectory memory: Trajectory retrieval can improve through flexible matching of variable-length motion subsequences, while dual-memory designs target perception stability and long-term maintenance.STRAP uses dynamic time warping for trajectory retrieval; TrackVLA++ uses dual memory for perception stability and maintenance.
- Future direction: Embodied-agent memory remains mostly flat or weakly structured, motivating graphs for spatial relations, hierarchical tasks, and action–effect causality.This is identified as a future direction for complex relational reasoning and hierarchical abstraction.
- Open challenges: Graph-based memory systems face broader challenges involving graph quality, scalability, privacy, schema transfer, interpretability, theoretical foundations, and multi-agent coordination.The survey identifies quadratic-or-worse graph operations, inference risks, domain-specific schemas, and inconsistent shared-memory updates as open issues.
- Survey scope: Across applications, the survey frames graph memory as a structured representation supporting reasoning, personalization, continual learning, and reliable autonomous agents.Its review covers taxonomy, lifecycle techniques, resources, applications, challenges, and future directions.
APPENDIX A PRELIMINARIES
The appendix establishes graph representations and the main structures and algorithms used to describe graph-based agent memory. It covers graph variants, knowledge and temporal graphs, embeddings, and traversal procedures for retrieval and reasoning.
- Graph fundamentals: A graph is represented as G = (V, E, X), with nodes, relational edges, and node-associated features.The adjacency matrix A characterizes relations between node pairs, while node features may be vectors or texts.
- Graph fundamentals: Graphs may be unweighted or weighted, with adjacency entries indicating edge presence or numerical relation strength.Weighted edges use w_ij to quantify relation strength or confidence.
- Graph variants: Knowledge graphs represent entities and typed semantic relations as directed triples (h, r, t), whereas temporal graphs attach timestamps or intervals to edges.Temporal graphs support evolving neighborhoods, event sequences, state transitions, and temporal reasoning.
- Graph variants: Hypergraphs extend pairwise graphs by allowing one edge to connect more than two vertices, thereby representing higher-order relations.Neighborhoods are induced by shared hyperedge membership rather than only pairwise adjacency.
- Graph variants: Task-driven graph variants include binary, text-attributed, and chunk-based graphs, which impose different constraints on edges, node features, or text units.These variants support relation-existence modeling, language-aware representations, and finer-grained text decomposition.
- Graph embeddings: Graph embeddings map nodes to continuous vectors while preserving structural or semantic information through topology-based, GNN-based, or language-model-based methods.Node2Vec uses biased random walks, GNNs aggregate neighborhoods, and Transformer encoders represent text-attributed nodes.
- Graph traversal: Graph traversal methods explore topology for reachable nodes, structural paths, or task-relevant subgraphs supporting retrieval and reasoning.BFS expands shortest-path neighborhoods, DFS explores paths deeply, random walks generate stochastic sequences, shortest paths minimize accumulated weights, and subgraph extraction retrieves k-hop neighborhoods.
B. LLM-based Agents
LLM-based agents use memory within a perception–retrieval–reasoning–action–update loop to incorporate observations, interaction history, and stored experience into decision-making.
- An LLM-based agent uses a large language model as its central reasoning component to interact with an environment and accomplish a task.
- Agent Interaction Loop: At each time step, the agent receives partial observations, retrieves contextual information, reasons with the LLM, and executes an action that changes the environment.
- Agent Interaction Loop: The agent integrates observations, retrieved memory, and interaction history during reasoning and decision-making.
- Agent Interaction Loop: The selected action is executed in the environment, inducing a state transition.
- Agent Interaction Loop: Memory is updated with new experience and feedback through M ← Update(M, o_t, a_t, r_t).
- The memory module stores experience tuples and knowledge representations while supporting retrieval and update operations.
2) Prompt Construction from Memory:
Memory conditions LLM-agent behavior by inserting retrieved context into prompts, while graph representations organize memory units and their relations for retrieval and updating.
- 2) Prompt Construction from Memory:: At each time step, the agent combines system instructions, retrieved memory, and the current task context into a composite prompt.
- 2) Prompt Construction from Memory:: The prompt’s system component specifies the agent’s role and operational constraints, while the observation represents the current query or task context.
- 2) Prompt Construction from Memory:: The memory context is obtained by querying the memory module with a task-dependent query, typically through similarity-based retrieval.
- 2) Prompt Construction from Memory:: Similarity-based retrieval ranks individual memory units using a similarity function over their representations.
- C. Graph-based Memory: Structured memory can be represented as a graph that supports relational modeling, efficient retrieval, and incremental updates over time.
- 1) Memory as Graph Format:: Graph-based agent memory is formalized as a dynamic attributed graph containing memory nodes, relations, and node- or edge-associated attributes.
- 1) Memory as Graph Format:: Nodes represent entities, events, concepts, or textual chunks, while edges encode semantic, temporal, or causal dependencies.
2) Graph Memory Mechanism:
Graph memory is constructed from data, queried through similarity or traversal, and updated incrementally; evaluation covers retrieval, graph structure, downstream utility, and available library capabilities.
- Graph Memory Construction: Graph memory construction maps a corpus or experience set into an initial graph independently of online agent actions.
- Graph Memory Construction: Construction extracts nodes such as entities, events, concepts, or text chunks and relations that form edges among them.
- Graph Memory Retrieval: Graph retrieval queries the graph for relevant nodes or subgraphs using textual, structural, or embedding-based queries.
- Graph Memory Retrieval: Retrieval can combine semantic similarity over node representations with graph traversal from query-relevant nodes.
- Graph Memory Update: Graph updates use observations, actions, and feedback to modify nodes, edges, attributes, or relations in the current memory graph.
- Graph Memory Update: Unlike static graph construction, online graph updates operate incrementally and enable continual adaptation during agent interaction.
- Evaluation Criteria: Evaluation covers retrieval effectiveness, graph structural quality, and task-level utility, including relevance, coherence, completeness, and task success.
- Open-sourced Libraries: The library comparison considers construction mode, graph support, retrieval, lifecycle management, temporal modeling, reasoning, personalization, hierarchy, and agent-framework integration.