OpenSage-ADK: AI-centric agent development framework
Next generation ADK that enables AI to self-create agent topology, synthesize toolsets, and manage structured memory.
Overview
OpenSage-ADK is an AI-centric ADK. Instead of requiring developers to hand-craft agent topology, tool lists, and memory, OpenSage provides a minimal scaffold that lets the model create and orchestrate these components at runtime.
- Self-generated agent topology: The agent can dynamically create, execute, and terminate sub-agents during task execution, supporting both vertical topology (decomposing a complex task into sequential sub-tasks handled by specialized sub-agents) and horizontal topology (multiple parallel agents execute the same task, then merge results via agent ensemble).
- Dynamic tool and skill synthesis: The agent can create tools and skills during execution. Our ADK provides a sandboxing system that enables tool-isolated execution and state management.
- Hierarchical memory management: File-based memory for both long-term (cross-task) and short-term (per-task) memory, with a built-in dedicated memory agent that can be enabled with a single line of code.
Feature Comparison
The following table compares OpenSage-ADK with state-of-the-art ADKs across key features.
| Category | Feature | OpenSage | OpenAI | Claude | OpenHands | LangChain | |
|---|---|---|---|---|---|---|---|
| Topology | AI-created topology | ||||||
| Agent management | |||||||
| Agent ensemble | |||||||
| Tool | AI-written tools | ||||||
| Tool management | |||||||
| Memory | AI-created memory | ||||||
| Graph-based structure | |||||||
| AI-driven management |
full support partial support not supported
Domain-Specific Toolkit
OpenSage includes a comprehensive toolkit spanning software engineering and security, covering both static and dynamic analysis, enabling agents to perform real-world tasks out of the box.
| Category | Tool Set | Libraries | Features |
|---|---|---|---|
| Static | Code analysis | Joern, CodeQL | CPG query, call graph analysis, dataflow slicing, semantic-aware search |
| Dynamic | Fuzzing | AFL++, LibFuzzer | Customizable seed generation, mutation, scoring |
| Coverage | LLVM-Cov | Query coverage with Neo4j, generate detailed reports | |
| Debugger | GDB, PDB | Breakpoints, inspect states, trace execution, custom commands |
Strong Agent Performance
Using OpenSage-ADK, we build SageAgent and demonstrate that it significantly outperforms state-of-the-art commercial agents (Claude Code, Codex) and open-source agents (OpenHands, SWE-Agent) across multiple benchmarks.
- 🏆 CyberGym: 60.2% (vs. 39.4% OpenHands)
- 🏆 Terminal-Bench 2.0: 78.4%
- 🏆 SWE-Bench Pro: 59.0% (vs. 40.2% SWE-Agent)
- 🏆 DevOps-Gym: 46.8%, only agent that can finish end-to-end tasks
Experiment Insights
Across experiments, we observe rich self-programming behaviors:
- Dynamic sub-agent creation: Backbone models actively create sub-agents for distinct sub-tasks with synthesized system prompts and focused toolsets, such as dedicated debugging agents.
- Autonomous tool writing: Agents construct task-specific tools, including grammar-aware fuzzers and format-specific seed generators, instead of relying solely on general-purpose tools.
- Intelligent memory usage: The memory agent selectively persists high-signal information and leverages graph-based retrieval to avoid redundant queries and keep context focused.
These capabilities significantly enhance agent autonomy and problem-solving ability.
Model Improvement
We observe that current models do not always use these advanced features optimally. In some cases, the invocation frequency of these capabilities remains low; models may forget to reuse existing agents or memory, create sub-agents with mismatched toolsets, or hallucinate tools. This highlights a capability gap: OpenSage's AI-centric features are effective, but stronger models will be needed to fully exploit them.
To address this, OpenSage also provides integrated training support, including large-scale RL post-training rollouts, along with seamless integration with RL frameworks such as AReaL and slime, and sandbox infrastructure designed for parallel and scalable execution.
Get Started
Setup
Clone & install
git clone https://github.com/opensage-agent/opensage-adk.git
cd opensage-adk
uv venv --python 3.12
uv syncCreate Your Agent
Create a directory for your agent and add an agent.py with a mk_agent factory function.
The function receives a session ID and returns an OpenSageAgent instance.
import os
from typing import Optional
from google.adk.models.lite_llm import LiteLlm
import opensage
from opensage.agents import MemoryManagement, OpenSageAgent
def mk_agent(session_id: str, model=None):
session = opensage.get_session(session_id)
if model is None:
model = LiteLlm(
model="YOUR_MODEL_NAME",
api_key=os.environ.get("YOUR_API_KEY"),
)
return OpenSageAgent(
name="my_agent",
description="My custom OpenSage agent.",
model=model,
instruction="You are a helpful assistant.",
enabled_skills="all",
memory_management=MemoryManagement.FILE,
tools=[],
sub_agents=[],
)See the full documentation for how to create your first agent with OpenSage-ADK.
Citation
@article{li2026opensage,
title={OpenSage: Self-programming Agent Generation Engine},
author={Hongwei Li and Zhun Wang and Qinrun Dai and Yuzhou Nie and Jinjun Peng and Ruitong Liu and Jingyang Zhang and Kaijie Zhu and Jingxuan He and Lun Wang and Yangruibo Ding and Yueqi Chen and Wenbo Guo and Dawn Song},
year={2026},
eprint={2602.16891},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2602.16891},
}