工具使用智能体的可控遗忘:可逆上下文整理实践
原标题:Agent-Controlled Forgetting for Tool-Using Agents: Reversible Context Curation in Practice
AI 摘要
该研究提出一种「智能体控制的遗忘」机制:执行任务的模型可主动选择此前观察到的工具结果,将其替换为简短备注,并把原始内容存入可恢复归档,同时保护用户指令与助手消息。在 OpenTelemetry 调试案例中,该方法将提示词 token 从 912,492 降至 231,951,累计输入 token 减少 50%,API 成本从约 4.38 美元降至 1.28–1.44 美元,但请求次数更多、耗时增加 17%。作者指出该机制在噪声较大的工具使用轨迹中可显著节省资源,但效果依赖具体工作负载,某些场景下并无节省甚至质量下降。
正文节选
Agent-Controlled Forgetting for Tool-Using Agents: Reversible Context Curation in Practice Abstract Tool-using agents repeatedly carry observations whose useful content can be much smaller than their original payload. We study agent-controlled forgetting: the acting model selects previously observed tool results, replaces each with a short note at its original position, and retains the exact original in a recoverable archive. A Python harness exposes batch archival and explicit recovery without