让智能体同时用文本和代码记忆,自动选择最优方式提升效率。
Metis: Bridging Text and Code Memory for Self-Evolving Agents

- 构建双层记忆结构,文本记计划与经验,重复项转为可执行代码。
- 在真实任务中准确率提升20.6%,执行成本降低22.8%。
- 适合需要长期进化、兼顾效率与可复用性的智能体系统设计者。
自进化智能体通过提炼过往执行经验并复用于新任务来持续改进。现有系统将经验表示为注入上下文的自然语言文本或作为可调用工具的代码,但该选择通常在设计阶段固定,未依据经验特性动态调整,导致文本与代码记忆的权衡关系不清晰。我们首次在相同经验集上控制对比文本记忆与代码记忆,发现两者在构建成本、执行效率和迁移能力上存在互补性,单一形式均不足。基于此,我们提出Metis,一种基于分层双表示记忆的自进化智能体系统。Metis将文本经验组织为执行计划、环境事实与常见陷阱,并仅在计划重复出现时将其结晶为可验证的可调用工具。该设计结合了文本记忆的广泛适用性与代码记忆的高效执行,仅在重复使用时承担工具生成成本。我们在AppWorld这一挑战性交互智能体基准上评估Metis,结果表明其任务准确率较ReAct最高提升20.6%,执行成本降低最多22.8%。相比代表性自进化系统,Metis始终在准确率、执行效率与记忆构建成本间取得更优平衡。
原文摘要 · Abstract (English)
Self-evolving agents improve over time by distilling experience from past executions and reusing it in future tasks. Existing systems represent such experience either as natural-language text injected into the agent context or as code exposed as callable tools. However, the choice between these representations is typically made at design time rather than derived from the characteristics of the experience itself, leaving the trade-offs between them poorly understood. We present the first controlled study that isolates text memory and code memory over an identical set of experiences. Our results show that the two forms exhibit complementary trade-offs in construction cost, execution efficiency, and transferability, such that neither representation alone is sufficient. Guided by these findings, we propose Metis, a self-evolving agent system built on a hierarchical dual-representation memory. Metis organizes textual experience into execution plans, environment facts, and common pitfalls, and selectively crystallizes recurring plans into validated callable tools. This design combines the broad applicability of text memory with the execution efficiency of code memory while incurring tool-generation cost only when justified by repeated reuse. We evaluate Metis on AppWorld, a challenging benchmark for interactive agents. The results show that Metis improves task accuracy by up to 20.6% over ReAct while reducing execution cost by up to 22.8%. Compared with representative self-evolving agent systems, Metis consistently achieves a better balance between accuracy, execution efficiency, and memory-construction cost.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。