OpenSage: Self-programming Agent Generation Engine

OpenSage is a novel Agent Development Kit that empowers LLMs to autonomously generate their own agent topologies, toolsets, and hierarchical memory structures, thereby outperforming existing human-dependent frameworks and advancing the shift toward AI-centered agent development.

Hongwei Li, Zhun Wang, Qinrun Dai, Yuzhou Nie, Jinjun Peng, Ruitong Liu, Jingyang Zhang, Kaijie Zhu, Jingxuan He, Lun Wang, Yangruibo Ding, Yueqi Chen, Wenbo Guo, Dawn Song

Published 2026-03-16
📖 5 min read🧠 Deep dive

Imagine you are trying to build a team of robots to solve a complex problem, like fixing a broken spaceship or writing a new video game.

The Old Way (Current AI Tools):
Right now, building these robot teams is like hiring a human construction crew. You, the boss, have to draw the blueprints. You decide exactly how many robots you need, what tools each one gets (a hammer, a wrench, a computer), and how they talk to each other. If the job changes, you have to stop, erase the blueprints, and start over. It's slow, expensive, and if you forget to give a robot a screwdriver, the whole project fails. This is what current "Agent Development Kits" (ADKs) do: they give you the tools, but you have to design the team.

The New Way (OpenSage):
The paper introduces OpenSage, which is like handing the blueprints and the construction site to a Master Architect AI. Instead of you telling the AI what to do, you just say, "Build me a team to fix this spaceship."

OpenSage is the first system that lets the AI program itself. It doesn't just follow orders; it builds its own team, invents its own tools, and remembers everything it learns.

Here is how OpenSage works, broken down into three simple parts:

1. The Self-Organizing Team (Agent Topology)

  • The Analogy: Imagine a general in a war room. In the old way, the general had to call specific, pre-named lieutenants. In OpenSage, the general can look at the battlefield and say, "I need a sniper team here and a medic team there," and the system instantly creates those teams on the fly.
  • How it works: The AI can create "sub-agents" (little helper robots) whenever it needs them.
    • Vertical Team: It breaks a big job into small steps and assigns a different robot to each step (like a factory assembly line).
    • Horizontal Team: It can hire five different robots to solve the same problem at the same time, then pick the best answer (like a panel of judges).
    • The Magic: The AI decides who to hire and when to fire them, without you touching a single line of code.

2. The Magic Toolbox (Dynamic Tool Synthesis)

  • The Analogy: Usually, if a robot needs a specific tool (like a "space-wrench"), and you didn't pack one, the robot is stuck. With OpenSage, if the robot needs a space-wrench, it 3D prints one right there in the moment.
  • How it works:
    • Writing Tools: If the AI needs to do something specific (like analyze a computer virus), it writes its own software tool to do it.
    • Safe Sandbox: Imagine these new tools are built in their own little glass bubbles (containers). If a tool crashes or has a virus, it only breaks the bubble, not the whole system.
    • Specialized Kits: It comes with a pre-loaded "Software Engineering Kit" that knows how to fix code, debug programs, and run tests, which other systems can't do as easily.

3. The Super-Brain Memory (Hierarchical Memory)

  • The Analogy: Most robots have a short-term memory (like a sticky note) and a long-term memory (a messy filing cabinet). If the note gets too full, they forget things. OpenSage gives the robot a living, breathing library.
  • How it works:
    • Short-Term: It keeps a graph (a web of connections) of what happened right now.
    • Long-Term: It saves the "big ideas" and "lessons learned" in a structured database.
    • The Librarian: There is a special "Memory Agent" (a librarian robot) that organizes this library. It doesn't just dump data; it connects the dots. If you ask, "How did we fix that bug last week?" it finds the exact page, the code, and the solution, rather than just showing you a list of words that sound similar.

Why Does This Matter?

The researchers tested OpenSage on three very hard challenges:

  1. CyberGym: Finding security holes in code.
  2. Terminal-Bench: Solving complex computer terminal tasks.
  3. SWE-Bench: Fixing real-world software bugs.

The Result: The AI teams built by OpenSage crushed the competition. They solved problems that other systems couldn't even touch.

  • In one test, OpenSage solved 60% of security problems, while the next best system only solved 39%.
  • In software fixing, OpenSage solved 59% of bugs, while the next best only solved 40%.

The Big Picture

The paper argues that we are shifting from a "Human-Centered" world (where humans build the robots) to an "AI-Centered" world (where AI builds its own robots).

Think of it like the evolution of cars:

  • Old ADKs: You have to build the engine, the wheels, and the steering wheel yourself.
  • OpenSage: You get a self-driving car that can build its own engine and wheels if it realizes it needs a faster one.

This isn't just about making AI smarter; it's about giving AI the freedom to evolve. It's the first step toward a future where AI doesn't just answer questions, but builds the entire team and toolkit needed to solve the problem on its own.

Get papers like this in your inbox

Personalized daily or weekly digests matching your interests. Gists or technical summaries, in your language.

Try Digest →