Metis: Bridging Text and Code Memory for Self-Evolving Agents
The paper introduces Metis, a self-evolving agent system that employs a hierarchical dual-representation memory to dynamically combine natural language text and executable code, thereby achieving superior task accuracy and execution efficiency compared to existing approaches by leveraging the complementary strengths of both memory types.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are teaching a very smart, but forgetful, robot assistant how to do complex tasks, like managing your digital life or running a small business. Every time the robot tries a task, it learns something. The big question is: How should we save that learning so the robot can use it later?
The paper "METIS" argues that there are two main ways to save this knowledge, and most systems pick just one way by default. The authors discovered that neither way is perfect on its own, so they built a new system that uses both in a smart, hierarchical way.
Here is the breakdown using simple analogies:
1. The Two Ways to Remember
The paper compares two methods of storing experience:
- Text Memory (The "Notebook"):
- What it is: The robot writes down what happened in plain English, like a diary entry or a set of instructions.
- Pros: It's cheap and fast to write. It's also very flexible. If the robot faces a slightly different situation later, it can read the note and figure out how to adapt.
- Cons: It's slow to use. Every time the robot needs to do the task, it has to read the note, think about it, and then do the steps one by one. It's like reading a recipe every time you want to make toast.
- Code Memory (The "Robot Arm"):
- What it is: The robot turns a routine into a pre-made tool or a script it can just click and run.
- Pros: It's incredibly fast. Once the tool is built, the robot just hits "go" and the task is done instantly.
- Cons: It's expensive and risky to build. You have to test it perfectly to make sure it works. Also, it's rigid. If the situation changes even a little, the tool might break or do the wrong thing because it was built for a very specific scenario.
2. The Problem with Current Systems
Most current AI systems pick one style and stick with it.
- Some only use the Notebook. They are flexible but slow and repetitive.
- Some only use the Robot Arm. They are fast but brittle; if the world changes, they fail.
The authors found that neither is enough on its own. You need the flexibility of the notebook for new situations and the speed of the robot arm for common tasks.
3. The Solution: METIS (The "Smart Librarian")
The authors created a system called METIS that acts like a smart librarian who knows exactly when to write a note and when to build a tool.
How it works:
The Foundation (The Notebook): METIS starts by saving everything as text. It organizes these notes into three specific types:
- Plans: General steps for how to do things.
- Facts: Rules about the environment (e.g., "The database is slow on Mondays").
- Pitfalls: Warnings about mistakes to avoid (e.g., "Don't click this button twice").
- Why? This is cheap to do and helps the robot handle new, weird situations.
The Upgrade (The Robot Arm): METIS doesn't turn every note into a tool. It watches the robot's behavior.
- If the robot tries to use a specific "Plan" over and over again for different tasks, METIS says, "Okay, this is a pattern! Let's build a permanent tool for this."
- It then carefully builds a tool, tests it to make sure it's safe, and adds it to the library.
- If a note is just a one-time warning or a specific fact, it stays as text.
The Result:
- For new or weird tasks: The robot reads the flexible notes (Text Memory) to figure things out.
- For common, repeated tasks: The robot skips the thinking and just uses the pre-built tools (Code Memory).
4. Why This Matters (The Results)
The authors tested this on a difficult benchmark called AppWorld (a simulated environment with many apps).
- Better Accuracy: METIS solved more tasks correctly than systems that only used notes or only used tools.
- Faster Execution: Because it used tools for common tasks, it finished jobs faster and used fewer computer resources.
- Cheaper to Build: Surprisingly, even though building tools is expensive, METIS spent less total effort building its memory than other advanced systems. This is because it only built tools when they were truly needed (when a pattern repeated), avoiding the waste of building tools for one-time tasks.
Summary Analogy
Imagine you are learning to cook.
- Text Memory is like reading a cookbook. It's great for learning new recipes, but you have to read and follow steps every time.
- Code Memory is like having a sous-chef who can instantly chop onions or boil water. It's super fast, but you have to train them first, and they can't handle a recipe you haven't taught them yet.
METIS is the head chef who reads the cookbook to learn new dishes, but once they realize "I make pasta sauce every Tuesday," they train the sous-chef to do it automatically. This way, you get the best of both worlds: the ability to learn new things and the speed to do routine things instantly.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.