README.md

June 15, 2026 · View on GitHub

GenericAgent

GenericAgent (GA)

A Token-Efficient Self-Evolving LLM Agent via Contextual Information Density Maximization

arXiv Code Version

Advantage AI Agent Lab (A³ LAB) · Shenzhen Aquaintelling Technology × Fudan University


GA is a self-evolving LLM agent that matches or beats Claude Code / OpenClaw on hard tasks while spending ~1/6 the tokens. It uses just 9 atomic tools, a 92-line core loop, and gets cheaper the more you use it (−89.6% tokens over 9 rounds).

This repo hosts the Technical Report (PDF · arXiv) and all evaluation datasets. For the runnable agent, see the source-code repo: GenericAgent.

Contents

News

Highlights

  • 🪶 9 atomic tools, not 50+ — capability through composition (vs. 53 in Claude Code).
  • 📉 ~1/6 the token cost at matched-or-better success (188.8k vs 537.4k on the 5-task long-horizon benchmark).
  • 🔁 Self-evolving — −89.6% tokens, −78.2% runtime, −84.4% LLM calls over 9 rounds, no prompt tuning.
  • 📚 No vector DB — beats embedding retrievers (Mem0, A-MEM) on LoCoMo with pure hierarchical memory.
  • 🛡️ No context explosion — 2,298-token prompt after 20 skills (~10–20× smaller than baselines).
  • 🌐 Web-ready — 3× the BrowseComp-ZH score at ~1/6 the tokens vs. OpenClaw.
  • ⚙️ Minimal — 92-line core loop, ~3.3k LoC total (vs. ~530k for OpenClaw).

How It Works

GA framework

GA runs a unified agent loop and maximizes context information density across four mechanisms:

MechanismIdea
Minimal Atomic Toolset9 primitives across 5 capability classes; broad capability via composition, not enumeration.
Hierarchical Memory4 layers (L1 index → L2 facts → L3 SOPs → L4 archive); only the compact L1 stays in-prompt, the rest is retrieved on demand.
Self-EvolutionReflection compresses verified trajectories into SOPs → executable code; triggered by the memory system, not the user.
Context CompressionTruncation, periodic tag-level compression, FIFO eviction past 60% budget — targeting a <30k token budget.

Emergent capabilities built on top: subagent dispatch (GA CLI as a sub-process), Reflect Mode (event-driven watchdog + cron-style tasks), and autonomous exploration over a persistent skill tree.

Evaluation Results

GA is evaluated along five dimensions against Claude Code, OpenAI Codex, and OpenClaw under Claude Sonnet 4.6 / Opus 4.6, GPT-5.4, and MiniMax M2.7 backbones. Full details in the Technical Report.

Model version names follow our internal evaluation pipeline; see §4.1.1 of the report for exact backbone configs.

1. Task Completion & Token Efficiency

Efficiency = Accuracy / Total Tokens (M).

BenchmarkAgentBackboneAccuracyTotal TokensEfficiency
SOP-BenchGAClaude Sonnet 4.6100%2.08M0.48
OpenClawClaude Sonnet 4.6100%2.64M0.38
Claude CodeClaude Sonnet 4.685%1.25M0.68
GAMiniMax M2.790%0.92M0.97
OpenClawMiniMax M2.795%2.96M0.32
Lifelong AgentBenchGAClaude Sonnet 4.6100%0.24M4.15
OpenClawClaude Sonnet 4.670%1.45M0.48
Claude CodeClaude Sonnet 4.675%0.81M0.92
GAMiniMax M2.790%0.42M2.12
OpenClawMiniMax M2.770%1.22M0.57
RealFin-BenchmarkGAClaude Sonnet 4.665%0.11M5.70
Claude CodeClaude Opus 4.660%0.31M1.95
Claude CodeClaude Sonnet 4.655%0.24M2.31
OpenClawClaude Sonnet 4.635%0.25M1.39
CodexGPT-5.460%0.89M0.67

📌 On Lifelong AgentBench, GA hits 100% accuracy with 27.7% of Claude Code's input tokens and 15.5% of OpenClaw's.

2. Tool-Use Efficiency

GA exposes 9 atomic tools, vs. 53 in Claude Code (20 base + 33 conditional) and 18 factories in OpenClaw.

Long-horizon complex tasks (5 tasks, Claude Sonnet 4.6):

AgentSuccessTotal TokensTime (s)RequestsTool Calls
GA100.0%188,829220.811.012.8
Claude Code100.0%537,413320.832.622.6
OpenClaw80.0%633,101183.115.016.6

📌 GA matches Claude Code's success while using 35.1% of its tokens, 33.7% of its requests, 56.6% of its tool calls.

Tool-use efficiency radar
Tool-use efficiency radar — GA leads on token, request, and tool-call axes while preserving quality.

3. Memory System Effectiveness

(a) Condensed memory ablation — SOP-Bench (dangerous goods):

ConfigurationMemory Size (tokens)Task Success Rate
No-Memory013.87%
Full-Memory57552.44%
Redundant-Memory28866.48%
Condensed Memory16566.48%

(b) Long-term factual memory — LoCoMo (no embedding model, no vector DB):

SystemMulti-Hop F1Temporal F1Open-Domain F1Single-Hop F1
Mem039.3250.0318.3240.32
A-MEM29.0346.8313.1144.68
OpenClaw21.4322.569.5623.44
GA43.3352.2320.4145.69

(c) Context-explosion stress test — full prompt length after installing 20 skills:

SystemFull Prompt Length
Claude Code22,821 tokens
Codex23,932 tokens
OpenClaw43,321 tokens
GA2,298 tokens

📌 GA's prompt stays ~10–20× smaller after extensive skill expansion — idle memory is kept strictly off-prompt.

4. Self-Evolution Capability

Nine-round longitudinal study (LangChain GitHub research task). Stage transitions are triggered autonomously by the memory system.

RoundStageTimeLLM CallsTotal Tokens
#1Initial run7m30s32222,203
#2SOP optimization4m19s1266,341
#3SOP optimization2m53s849,825
#4SOP optimization2m29s951,758
#5SOP optimization2m50s735,536
#6Codified SOP2m24s625,762
#7Codified SOP1m41s523,014
#8Codified SOP1m35s522,689
#9Codified SOP1m38s523,010

📌 Round #1 → #9: −89.6% tokens, −78.2% runtime, −84.4% LLM calls — savings come from removing whole reasoning loops, not just shorter responses.

Across 8 web tasks (3 runs each), GA cuts tokens by 61.0%–92.4% (overall −79.3%); OpenClaw shows no comparable convergence.

Cross-task self-evolution convergence
GA converges to a stable low-cost regime across eight web tasks; OpenClaw does not.

5. Web Browsing Capability

Both GA and OpenClaw use Claude Opus 4.6.

Benchmark# TasksEval ProtocolGA ScoreOpenClaw ScoreGA TokensOpenClaw Tokens
WebCanvas12Automatic0.8340.7220.18M0.71M
BrowseComp-ZH10LLM-as-Judge0.6000.2000.47M1.31M
Custom Tasks22Human + LLM0.5770.5000.26M0.76M

📌 On multi-hop BrowseComp-ZH, GA triples OpenClaw's score (0.60 vs. 0.20) at ~1/6 the tokens; 2.9×–3.9× token reduction across all three benchmarks.

Repository Layout

GA-Technical-Report/
├── GA_Technical_Report.pdf       # Full technical report
├── assets/                       # Figures
└── datasets/                     # Evaluation datasets (each with its own README)
    ├── lifelong_agentbench/
    ├── locomo/
    ├── realfin_benchmark/
    ├── sop_bench/
    ├── tool_efficiency_benchmark/
    └── web_browsing/

Each benchmark folder ships its own README with task setup, evaluation protocol, and reproduction notes.

Citation

@misc{liang2026genericagenttokenefficientselfevolvingllm,
      title={GenericAgent: A Token-Efficient Self-Evolving LLM Agent via Contextual Information Density Maximization (V1.0)}, 
      author={Jiaqing Liang and Jinyi Han and Weijia Li and Xinyi Wang and Zhoujia Zhang and Zishang Jiang and Ying Liao and Tingyun Li and Ying Huang and Hao Shen and Hanyu Wu and Fang Guo and Keyi Wang and Zhonghua Hong and Zhiyu Lu and Lipeng Ma and Sihang Jiang and Yanghua Xiao},
      year={2026},
      eprint={2604.17091},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2604.17091}, 
}
© 2026 Advantage AI Agent Lab (A³ LAB). Released alongside the GenericAgent system at github.com/lsdefine/GenericAgent.