EXG: Self-Evolving Agents with Experience Graphs

TL;DR

EXG uses experience graphs to enable self-evolving agents, achieving 150% improvement in task performance and 45.7% efficiency gains.

cs.AI 🔴 Advanced 2026-05-18 25 views
Yuxin Jin Siyuan Zhang Hanchen Wang Lu Qin Ying Zhang Wenjie Zhang
self-evolving agents experience graph LLM optimization code generation reasoning tasks

Key Findings

Methodology

EXG organizes agent successes and failures into structured nodes connected by relational edges representing task association, semantic similarity, and error correction. It supports both online real-time reuse and offline external memory.

Key Results

  • EXG achieves 150% improvement in pass@1 and 30% in pass@2 for code generation tasks in online experiments.
  • Offline experiments show 45.7% fewer LLM calls and 30.5% lower inference latency.
  • Ablation studies confirm semantic and correction edges significantly enhance task performance.

Significance

EXG addresses the static nature of deployed agents by providing a unified framework for organizing and reusing experience. It improves solution quality while reducing computational costs, enabling scalable deployment.

Technical Contribution

EXG introduces the first graph-based mechanism for self-evolving agents, bridging online and offline experience reuse while offering modular plug-and-play integration for existing architectures.

Novelty

EXG is the first framework to structure experience as a graph, overcoming limitations of reflection and unstructured memory, enabling cross-task reuse in a unified design.

Limitations

  • EXG's reliance on graph construction may increase storage overhead in high-frequency tasks.
  • Semantic similarity computation depends on embedding quality, which may limit generalizability.

Future Work

Future research could explore EXG's adaptability in dynamic task environments and optimize graph construction/retrieval efficiency for larger-scale applications.

AI Executive Summary

EXG addresses the challenge of static behavior in deployed agents by introducing an experience graph framework that organizes successes and failures into structured nodes connected by relational edges.

Experiments demonstrate EXG's effectiveness in code generation and reasoning tasks, achieving 150% improvement in pass@1 for online tasks and reducing LLM calls by 45.7% in offline settings. Its modular design allows seamless integration into existing agent architectures.

While EXG faces limitations in storage overhead and embedding quality, its unified experience organization framework provides a solid foundation for scalable self-evolving agents. Future work could optimize graph efficiency and explore applications in dynamic task environments.

Deep Analysis

Background

Recent advances in large language models (LLMs) have enabled agents to perform complex reasoning and problem-solving. However, most agents remain static, failing to systematically learn from past tasks, leading to repeated errors and increased computational costs.

Core Problem

Existing self-evolving methods are limited to single-task reflection or unstructured memory, lacking mechanisms for cross-task experience reuse. The absence of a unified framework for organizing experience is a key bottleneck.

Innovation

EXG introduces an experience graph framework that structures agent interactions as nodes and edges. It supports online real-time reuse and offline external memory, overcoming limitations of prior methods.

Methodology

  • �� Abstract task attempts into structured case nodes.
  • �� Construct an experience graph with nodes representing cases and edges encoding task association, semantic similarity, and error correction.
  • �� Retrieve relevant cases and construct experience hints during online tasks.
  • �� Reuse a pre-built experience graph for offline tasks as an external memory module.

Experiments

Experiments use datasets like HumanEval and EvalPlus to evaluate EXG's performance in code generation and reasoning tasks. Baselines include reflection and unstructured memory methods, with metrics like pass@1 and LLM call frequency.

Results

EXG improves pass@1 by 150% in online tasks and reduces LLM calls by 45.7% in offline tasks. Ablation studies highlight the importance of semantic and correction edges.

Applications

EXG is applicable in code generation, complex reasoning tasks, and scenarios requiring cross-task experience reuse, such as automated programming assistants and intelligent Q&A systems.

Limitations & Outlook

EXG's reliance on storage and embedding quality may limit its scalability in dynamic environments. Future work could optimize graph efficiency and explore more general embedding models.

Plain Language Accessible to non-experts

Imagine a chef who keeps improving recipes. Each time they try a new dish, they record the successes and failures. These records are organized into a cookbook, where each entry includes tips like which ingredients work well together and what mistakes to avoid. EXG acts like this cookbook, helping agents learn and improve with every task.

ELI14 Explained like you're 14

Think of playing a video game where every time you fail, the game gives you hints like 'try this weapon' or 'avoid this trap.' EXG is like a game guide that records your attempts and gives better advice for the next level, making you stronger and smarter each time you play!

Glossary

Experience Graph

A structured graph for organizing agent task experiences, including nodes and relational edges.

Used for online and offline task experience reuse.

Task Anchor Node

A node in the experience graph grouping all cases for the same task.

Connects task case nodes.

Semantic Similarity Edge

An edge in the experience graph representing semantic similarity between cases.

Used for cross-task experience retrieval.

Correction Edge

An edge capturing error-repair relationships between cases.

Optimizes task-solving processes.

pass@1

An evaluation metric indicating success rate on the first attempt.

Used in code generation task performance evaluation.

Open Questions Unanswered questions from this research

  • 1 How can experience graph storage efficiency be optimized for dynamic environments?
  • 2 How can semantic similarity computation quality be improved for better cross-task reuse?

Applications

Immediate Applications

Code Generation Assistant

Optimizes code generation tasks by reducing repeated errors and improving efficiency.

Intelligent Q&A Systems

Reuses experience hints in multi-turn Q&A to improve response quality.

Long-term Vision

Dynamic Task Adaptation

Supports real-time experience learning in complex dynamic environments, advancing general AI development.

Abstract

Large language model (LLM)-based agents have demonstrated strong capabilities in complex reasoning and problem solving through multi-step interactions, yet most deployed agents remain behaviorally static, with knowledge acquired during execution rarely translating into systematic improvement over time. In response, a growing line of work on self-evolving agents explores how agents can improve through experience during deployment, but most existing approaches either rely on ad hoc reflection limited to single-task correction or adopt unstructured memory that accumulates fragmented experience with delayed usability. To address this limitation, we introduce EXG, an experience graph framework for self-evolving agents that explicitly organizes accumulated successes and failures into a structured, relational representation. EXG is the first experience graph designed for self-evolving agents, supporting both online, real-time graph growth during execution for immediate cross-task experience reuse, and offline reuse of a consolidated experience graph as an external memory module. This design also enables EXG to serve as a plug-and-play component for existing self-evolving agents, organizing prior experience into a unified experience graph and improving both solution quality and resource efficiency as deployment progresses. Extensive experiments across code generation and reasoning benchmarks show that EXG attains more favorable performance-efficiency trade-offs than reflection- and memory-based baselines in both online and offline evaluations. Our results suggest that structuring experience as a graph provides a principled foundation for scalable and transferable self-evolving agent behavior.

cs.AI