arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2607.00692cs.AI
收藏

Self-GC:面向长周期LLM智能体的自管理上下文

Self-GC: Self-Governing Context for Long-Horizon LLM Agents

Xubin Hao, Hongjin Meng, Xin Yin, Jiawei Zhu, Chenpeng Cao

AI总结:

提出Self-GC框架,通过将工具结果、文件等上下文对象索引化,并利用侧信道规划器进行折叠、掩码和剪枝操作,实现长周期智能体的上下文生命周期管理,显著减少前缀令牌且不影响未来延续。

摘要:

长周期LLM智能体积累的工具结果、文件、计划和用户约束过于结构化,不能作为可丢弃的文本后缀处理。当前系统主要依赖运行时的启发式方法(如按时间顺序剪枝和工具输出掩码)或在上下文限制接近时的最终自我总结。启发式方法成本低但对未来依赖关系视而不见;总结保留了叙述状态但往往隐藏了确切的证据、定位器和可编辑工件。我们提出Self-GC,其中GC表示自管理上下文,同时有意呼应垃圾回收:系统不仅回收未使用的令牌,还管理智能体上下文对象的生命周期。Self-GC将用户轮次、工具片段和技能状态转化为索引对象;要求侧信道规划器提出折叠、掩码和剪枝操作;并让执行器强制实施可恢复的侧车、安全提交边界和缓存感知提交。在33个会话的Hard Set上,Self-GC剪枝了43.95%的前缀令牌,同时使84.85%的未来延续不受影响,而启发式基线的无影响率为54.55%至69.70%。在332个会话的生产衍生套件上,三个规划器骨干达到了91.27%至94.58%的无影响率,而基线保持在77.71%至87.46%。在生产中,在线账户级拆分使白天平均输入令牌减少10%至15%,峰值减少接近20%。这些结果表明,上下文管理是对索引化、可恢复对象的运行时生命周期控制,而非事后文本清理。

英文摘要:

Long-horizon LLM agents accumulate tool results, files, plans, and user constraints that are too structured to be treated as a disposable text suffix. Current systems mostly rely on in-run heuristics such as chronological pruning and tool-output masking, or on final self-summary near a context limit. Heuristics are cheap but blind to future dependencies; summaries preserve narrative state but often hide exact evidence, locators, and editable artifacts. We present Self-GC, where GC denotes self-governing context while deliberately echoing garbage collection: the system does not merely reclaim unused tokens, but governs the lifecycle of agent context objects. Self-GC turns user turns, tool spans, and skill state into indexed objects; asks a side-channel planner to propose fold, mask, and prune actions; and lets the harness enforce recoverable sidecars, safe commit boundaries, and cache-aware commit. On a 33-session Hard Set, Self-GC prunes 43.95% of prefix tokens while leaving 84.85% of future continuations unaffected, compared with no-impact rates of 54.55% to 69.70% for heuristic baselines. On a 332-session production-derived suite, three planner backbones reach no-impact rates of 91.27% to 94.58%, while baselines remain at 77.71% to 87.46%. In production, an online account-level split reduces daytime average input tokens by 10% to 15%, with peak reductions near 20%. These results point to context management as runtime lifecycle control over indexed, recoverable objects rather than post hoc text cleanup.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑