Metis: Bridging Text and Code Memory for Self-Evolving Agents

πŸ“… 2026-06-23
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
Existing self-evolving agents statically employ either textual or code-based representations in their experience memory, struggling to balance efficiency, cost, and generalization. This work proposes Metis, the first system to conduct a comparative study of textual and code-based memories over the same set of experiences, revealing their complementary strengths. Building on this insight, Metis introduces a hierarchical dual-representation memory architecture that organizes experiences into textual plans, environmental facts, and common pitfalls, which are crystallized into callable tools upon frequent reuse. The system dynamically selects and transforms memory representations, synergistically combining the generality of text with the execution efficiency of code. Evaluated on the AppWorld benchmark, Metis improves task accuracy by up to 20.6% and reduces execution cost by 22.8% over ReAct, achieving a superior trade-off among accuracy, efficiency, and memory construction cost.
πŸ“ Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

self-evolving agents
text memory
code memory
experience representation
memory trade-offs
Innovation

Methods, ideas, or system contributions that make the work stand out.

self-evolving agents
dual-representation memory
text memory
code memory
tool crystallization
πŸ”Ž Similar Papers