Self-Context: Graph-Based Context Self-Management for Long-Horizon Agents
Ziheng Wang, Chengyi Yang, Renxu Bao, Zhishang Xiang, Chengsong Huang, Wenhao Li, Junnan Zhu, Delai Qiu, Yining Wang, Shengping Liu, Jinsong Su
Abstract
Effective context management is essential for long-horizon agents because context is a finite resource, and context windows of any size remain subject to context pollution and information relevance concerns. However, existing approaches assume that keeping critical findings in the interaction history is sufficient for later decisions and struggle with accumulating context noise and irreversible context compaction. To address these challenges, we propose Self-Context, a graph-based plug-and-play framework between the LLM and its native harness. It allows the LLM to take over context management through two components: graph management for structured exploration and history management for preserving critical interaction details. Graph management records exploration attempts and their findings in an editable working graph. History management uses fold and unfold to replace interaction history with summary notes and restore the original history when needed. Extensive experiments on three agent tasks show that Self-Context improves both task performance and interaction efficiency by keeping critical findings available for later decisions and maintaining exploration coherence.
Create a lesson
Metadata
- Comments
- 17 pages, 10 figures, 4 tables. Project page: https://self-context.github.io | Code: https://github.com/XMUDeepLIT/Self-Context
Related papers
WebRelay: Plan-First Synthesis of Verifiable Long-Horizon Tasks for Browser Agents
Shared title terminologycs.AIChenting Xu, Chuang Peng, Zilin Guo et al.
HybridSpec-CUA: Accelerating Long-Horizon Computer-Use Agents with Hybrid Interfaces via Irreversibility-Aware Speculation
Shared title terminologycs.AILe Zhou, Xichong Zhang, Zirui Tang et al.
World Decision Model: Decision-Aware World Modeling for Reliable Long-Horizon Agents
Shared title terminologycs.AIBo Shen, Junjie Zhang, Peijie Gao et al.
Self-Evolve Safely: Quantifying and Mitigating Misevolution in Multimodal Agents with Uncertainty and Intent
Shared title terminologycs.AITarık Ege Bilsel, Ekin Şahin, Ender Enes Tan et al.
D-ACR: Dialogue-Aware Context Retrieval for Long-Term Conversational Memory
Shared title terminologycs.AINayoung Choi, Jonathan Zhang, Jinho D. Choi
ReBranch: Self-Evolving Agents through Retrospective Branching
Shared title terminologycs.AIJie Deng, Dan Liu, Libo Zhang