A0 Self-Improvement: Why RLM + GEPA Beats Either Alone

How the A0 Self-Improvement plugin combines recursive long-context analysis with reflective prompt evolution—and why authority, replay, canaries, and a bounded autopilot loop matter more than the optimizer brand.

#agents #architecture #automation

A0 Self-Improvement cover with RLM and GEPA linked in a closed loop

Most “self-improving agent” demos share a quiet cheat code: the system rewrites itself, then the author squints at a few happy traces and calls it learning.

That is not self-improvement. That is unsupervised prompt drift with good marketing.

The A0 Self-Improvement plugin (current public version 2.1.0) takes the harder route. It keeps ordinary Agent Zero behavior available when anything is missing, treats model output as hypothesis rather than law, and refuses to promote a change until typed evidence, budgets, and operator authority line up. Under the hood it isolates DSPy 3.3.1, GEPA, and Deno in a hash-locked worker environment, while the Agent Zero framework interpreter stays untouched.

The interesting design question is not “should agents improve?” It is whether RLM, GEPA, or the combination—wrapped in a real control plane—is enough to improve them safely. Version 2.1 answers that with a completed bounded autopilot production loop: still authority-ranked, still fail-closed on promotion, and no longer a green toggle that pretends the hard parts are finished.

What the plugin actually is

Install path: usr/plugins/dspy_rlm (or the Plugin Hub equivalent). Repo: TerminallyLazy/a0-self-improvement.

In one sentence: it is an authority-ranked closed loop for proposing, evaluating, activating, monitoring, and rolling back behavioral changes inside one Agent Zero context—without turning conversation bodies into training fuel by default.

Concretely, it:

  • Records restart-safe, content-free observation facts from the message-loop and tool-result seams (no prompt bodies, tool traffic, provider payloads, paths, or error text in the durable store by default).
  • Creates a safe, no-effect Null Genesis profile per project chat before any improvement can even be considered—and, when enabled, does that automatically for every chat discovered in the Agent Zero project, including parallel agents.
  • Runs deterministic analysis first, then optional model routes: typed Predict or recursive RLM.
  • Emits Improvement Candidates only—structured guidance rules or prompt-patch artifacts—never silent live rewrites. Optimizer output is reconciled into append-only review candidates and audit receipts that are structurally ineligible for activation until the certified path says otherwise.
  • Supports certified fixture replay, calibrated canaries, exact-revision activation, post-promotion monitoring, ancestry-safe rollback, and signed operator commands over Agent Zero auth + CSRF.
  • Exposes a live dashboard: project-colored context picker, six content-free operator views, observations, queued work, candidates, receipts, worker health, generation/promotion gates, nearest scheduling thresholds, and recent activity—with bounded polling that pauses when the tab is hidden.
  • In Autopilot, after explicit operator consent, runs a framework-owned transition runner that can promote and automatically roll back under pinned policy, calibration, plans, and short-lived signed grants—without handing activation to the worker.

Workers may propose. Workers never own activation. That single sentence is still the product.

Authority-ranked closed loop for A0 Self-Improvement

How it improves Agent Zero

Agent Zero already has the surfaces a serious improvement loop needs: readable prompts, plugins, projects, parallel subordinates, memory, skills, and a real computer. What it did not ship as a first-class product was a governed metabolism—a way for runtime experience to become candidate behavior under audit.

A0 Self-Improvement plugs into that skeleton:

  1. Project enrollment — enable the plugin on a project-bound chat and it prepares every discovered chat in that project with an inert activation profile. Parallel agents share the enrollment boundary; they do not silently mutate each other. Manual Genesis remains recovery/admin, not the default UX.
  2. Observation without surveillance theater — the default path stores facts about loops and tools, not the text of your private work. Local system-prompt snapshots are captured only when you explicitly opt in; conversation bodies stay off the automation path.
  3. Candidate search with a budget ledger — analysis and GEPA search reserve capacity before external calls. Library knobs like GEPA max_metric_calls or RLM max_llm_calls sit inside that ledger; they are not the spending boundary.
  4. Evidence before vibes — frozen evaluation envelopes, fixture admission, holdout isolation, and canary conclusions are separate authorities. A high search score is not a promotion. Automatic review-bridge records stay review-only schemas, not activation authority.
  5. Activation as a profile swap — the runtime selects an immutable Activation Profile (artifact slots for guidance and prompt patches). Rollback is ancestry-aware, not “delete the file and pray.”
  6. Bounded autopilot when you mean it — Observe and Review never provision production promotion authority. Autopilot is an explicit one-time authorization that records a consent revision, provisions per-chat policy/canary/monitor/calibration inputs, and lets the transition runner act only inside those fences.
  7. Ordinary Agent Zero keeps working — if observation, search, replay, canary, or authority is unavailable, the chat still behaves like stock Agent Zero. Fail closed on improvement; fail open on usefulness.

That is a different claim from “the agent rewrote its system prompt last night.”

RLM alone: powerful lens, no spine

Recursive Language Models (RLMs) treat oversized context as an external environment. Instead of stuffing a giant trace into one prompt and hoping attention holds, the model programmatically inspects, decomposes, and recursively calls itself over snippets—exactly the DSPy RLM idea now documented upstream.

Agent Zero already has a focused community plugin for this surface (a0-community-plugins/rlm): offload huge external blocks, keep the main conversation in control, return either a normal answer or exact tool-call JSON.

Pros of RLM alone

  • Handles context that would wreck a normal window — long histories, large attachments, unevenly relevant dumps.
  • Better decomposition than a single-shot “summarize everything” compaction.
  • Operationally useful today as a routing/tool strategy without claiming self-modification.
  • Composes with Agent Zero’s model stack rather than forcing a separate agent product.

Cons of RLM alone

  • Analysis is not improvement. A brilliant recursive read of last week’s failures does not change tomorrow’s prompt.
  • No artifact lifecycle — no candidate identity, no incumbent/successor profile, no rollback ancestry.
  • No promotion policy — nothing decides whether a finding is safe to become behavior.
  • Spend can wander if recursion limits are treated as the only budget story.
  • Easy to confuse insight with progress in demos.

RLM is a microscope. Microscopes do not perform surgery.

GEPA alone: strong evolution, weak senses

GEPA (Genetic-Pareto) is reflective prompt evolution: sample trajectories, critique them in natural language, propose new textual components, and keep a Pareto frontier of candidates. The research line (arXiv:2507.19457) and DSPy’s dspy.GEPA integration made “optimize the prompts” feel newly practical—often cheaper than full RL fine-tunes for prompt-shaped systems.

Pros of GEPA alone

  • Directly mutates the thing that steers agents — prompts, instructions, textual policies.
  • Uses language feedback, not only scalar rewards, so domain notes can guide search.
  • Pareto awareness keeps multiple tradeoffs alive instead of collapsing to one brittle score.
  • Fits DSPy programs and measurable tasks with train/val discipline.

Cons of GEPA alone

  • Garbage-in, Pareto-out. If your metric is keyword overlap with yesterday’s answer, GEPA will industriously climb the wrong hill. The A0 plugin is explicit: legacy rule-label Jaccard and prompt token-overlap engines are diagnostic only, not promotion-eligible outcome optimization.
  • Needs clean tasks and holdouts. Without family partitions and a certification holdout, you “optimize” into the test set.
  • No native agent control plane — canary traffic splitting, signed activation, content-free operator views, and project-scoped enrollment are not GEPA’s job.
  • Costly if unbounded — reflection models, metric calls, and retries add up unless an external budget ledger is in charge.
  • Silent improvement is still a safety hazard even when the optimizer is clever.

GEPA is an evolution engine. Evolution without senses and without brakes is how you get confident regressions.

Why the combination is the better approach

Comparison of RLM alone, GEPA alone, and RLM plus GEPA

The A0 design (see the plugin ADRs, especially the analysis-routing and engine-semantics decisions) is blunt about roles:

Layer Role Authority
Deterministic aggregate Counts, joins, windows, contradictions, budget math Factual foundation
Typed Predict One bounded structured inference over a safe view Proposal only
Recursive RLM Iterative exploration across multiple safe views / tools Proposal only
Heuristic / deterministic generators Local candidate drafts without DSPy Candidate only
Outcome GEPA Search for guidance or prompt-patch artifacts under admission Candidate only; search score ≠ activation
Replay + canary + policy Compare incumbent vs successor under frozen envelopes Evidence
Transition runner / signed activation / rollback Swap exact profile revisions under grants and CAS fences Operator authority (manual or consented Autopilot)

That stack answers the failure modes cleanly:

  • RLM without GEPA finds patterns in long-running Agent Zero work but cannot turn them into versioned behavior changes.
  • GEPA without RLM (and without deterministic foundations) optimizes whatever short, clean signal you fed it—often a surrogate that never saw the real mess of tool loops, partial failures, and multi-agent projects.
  • RLM + GEPA without authority is still a self-own waiting to happen: the system can invent a better prompt and apply it globally because a dashboard number went up.
  • RLM + GEPA + authority is the actual product thesis: long-context understanding proposes, reflective search generates, certified comparison judges, operators (or a bounded, consented autopilot runner) activate, and rollback remains first-class.

Automation modes in 2.1.0

Observe, Review, and Autopilot automation modes

The Settings page still offers three one-switch modes. The public default remains Observe.

Mode What it does What it does not do
Observe Records content-free runtime facts only No candidate search, no promotion authority
Review Observe + schedules RLM/GEPA candidate work for humans No production auto-activation path
Autopilot Schedules the same work and runs the certified production loop after explicit selection Does not let workers own activation; does not skip replay/canary/policy fences

Selecting Autopilot is the operator’s one-time authorization for the bounded automatic loop. An Autopilot value saved by an older release stays non-authoritative until you select Autopilot again—that re-selection records the current authority-consent revision. Project setup then creates an exact production policy, canary plan, monitor plan, and signed calibration for each project chat.

Inside that fence, the design stays strict:

  • RLM and GEPA remain proposal engines. They can produce only allowlisted structured guidance; they cannot mutate active state.
  • A worker proposal becomes eligible only after its current lease and fencing token commit a terminal candidate result.
  • The framework-owned transition runner digest-verifies the candidate and replay evidence, assigns each complete user message to one deterministic candidate or incumbent arm, and evaluates failure-rate delta at a fixed calibrated horizon sized so the combined probability that either arm misses its minimum comparable sample stays at most one percent.
  • Every message has at most one durable outcome receipt. Expired canaries terminate. Unknown outcomes do not advance the experiment. Ordinary failures stay separate from explicitly structured hard failures.
  • Promotion uses an active-revision compare-and-swap. The runner monitors the promoted artifact against the measured incumbent arm and can automatically roll back regressions without overwriting manual pointer changes.
  • Every transition revalidates the candidate publication against the current Activation Scope. Every promotion or rollback also requires a short-lived signed grant plus revalidation of the exact policy, calibration, plans, context, candidate, action, and revision under an authority-store write fence.
  • The first candidate has no incumbent guidance artifact for a paired replay. It may advance from the explicit missing_baseline replay state only into the bounded live canary; other replay refusals remain blocked. Later candidates need promotion-ready paired replay before canary admission.
  • The certified system-prompt hook currently exposes a trusted live bucket only for reasoning, so other bucket proposals stay visible for review instead of entering an experiment that cannot receive correctly attributed traffic.

Content-free canary, promotion, monitoring, rollback, and recovery states show up in Recent activity. Review and Observe never provision this authority. That is the difference between “we evaluate gates on a dashboard” and “we shipped a production loop that is still not allowed to lie about what it can do.”

Pros of the combined system

  • Correct division of labor between seeing, searching, proving, and shipping.
  • Truthful engine labels — “GEPA” means an actual GEPA artifact path, not “imports succeeded.”
  • Isolated worker venv with lockfile discipline so Agent Zero’s framework Python is not a dependency dumping ground.
  • Privacy-shaped by construction — content-free projections; fixtures need explicit custody and grants.
  • Project-native — parallel chats enroll together; activation stays context-bound; the dashboard groups inspection by project without switching the underlying conversation.
  • Bounded autopilot with receipts — automatic activation exists, but only after consent, calibration, canary horizon math, CAS fences, and automatic rollback.
  • Honest residual limits — live canary attribution is bucket-honest; non-reasoning proposals do not fake a traffic experiment they cannot run.

Cons of the combined system

  • Complexity tax — schemas, receipts, manifests, and ADRs are real. This is not a three-line “optimize my agent” script.
  • Operational setup — isolated worker build, optional fixture runtime profile, and understanding of modes still matter even with automatic Genesis.
  • Slower dopamine — Observe-first means you will not get fireworks on install day, by design.
  • Model spend still exists when you enable Review/Autopilot search; budgets reduce surprise, they do not make inference free.
  • Autopilot is powerful, not casual — explicit consent, project enrollment, and gate literacy are part of the price of admission.
  • Community maturity — like other advanced Hub plugins, you should scan, read, and treat it as powerful machinery, not a toy toggle.

If you want a slogan: RLM widens the aperture, GEPA searches the policy space, authority decides what is allowed to become you—and autopilot only runs inside the fence you signed.

Where this places Agent Zero among harnesses

The 2026 harness conversation usually names Pi, Hermes, OpenCode, Claude Code, Codex, and a rotating cast of open agents. They are not the same species of product, so a single leaderboard is mostly cosplay. Better axes:

  1. What the harness optimizes for — coding loop depth vs general computer-using agent.
  2. How far self-evolution goes — session notes, skill distillation, prompt search, full harness rewrite.
  3. Whether improvement is governed — metrics, holdouts, canaries, rollback, human authority.

Harness comparison map for self-evolution versus operator authority

Fair comparison, not a dunk contest

Pi Minimal, elegant agent harness energy. Excellent when you want a thin loop and maximum clarity. It is not trying to be a full self-improvement control plane. Strength: simplicity. Gap vs A0+plugin: little built-in metabolism for governed prompt/profile evolution across a project of agents.

OpenCode Coding-centric open harnessing. Strong when the job is repository work with an opinionated agent CLI. Strength: focused software loop. Gap: general-purpose computer agent + plugin-universal core is Agent Zero’s home turf; deep RLM/GEPA authority loops are not the headline.

Codex OpenAI’s coding agent family—CLI toward broader surfaces, parallel agents, diff-centric review. Strength: raw software engineering loop and product polish in-distribution for code. Gap: self-improvement is not the primary identity; you bring process from outside. Agent Zero’s bet is the opposite: the computer, plugins, and orchestration are the product, and improvement can be a plugin.

Claude Code Deep engineering harness with a mature interactive coding workflow, subagents, and huge real-world adoption. Strength: end-to-end coding performance and ergonomics. Gap: closed harness gravity—extension exists, but you do not get Agent Zero’s “builtins are plugins you can shadow” posture, nor a first-class community plugin that installs an authority-ranked RLM/GEPA metabolism beside the core.

Hermes (Nous Research) The closest spiritual neighbor on the “self-improving agent” axis: persistent assistant energy, multi-model support, and explicit skill-evolution loops (including GEPA-flavored work in the ecosystem). Strength: evolution as a product story, not a footnote. Gap: different substrate. Hermes optimizes a Hermes-shaped agent world. A0 Self-Improvement optimizes Agent Zero’s prompt assembly, tool seams, projects, and activation profiles—with content-free operator views and fail-closed promotion. Also, public writeups of skill-evolution loops still warn about weak fitness heuristics; A0’s ADRs obsess over not letting surrogate metrics wear a promotion badge.

Agent Zero + A0 Self-Improvement Places the stack in a sparsely occupied quadrant: high self-evolution ambition with high operator authority. Agent Zero already competed as a general-purpose, transparent, plugin-native computer agent (custom vs general-purpose harness, plugins all the way down). The plugin adds the missing metabolism without collapsing into unsupervised self-rewrite—and 2.1.0 makes automatic promotion a bounded production path, not a demo stub.

Harness Primary center of gravity Built-in self-evolution story Governed promote/rollback as product
Pi Minimal agent loop Light Light
OpenCode Open coding agent Light–moderate Tooling-dependent
Codex Coding agent + surfaces Process outside the core Review/diff strong; metabolism optional
Claude Code Deep coding harness Skills/process, ecosystem experiments Excellent human review loop; not A0-style profile authority
Hermes Persistent / evolving agent Strong (skills, GEPA-style loops) Improving; fitness quality varies by setup
Agent Zero General computer agent + plugins Via plugins/memory/skills A0 Self-Improvement: explicit, now with bounded autopilot

The point is not that coding harnesses are “worse.” For pure in-repo engineering velocity, Claude Code and Codex remain the default muscles many developers flex daily—including Agent Zero’s own maintainers, as the Spynel WIP conversation admits. The point is that Agent Zero is playing a different game: an open, inspectable agent operating system where a community plugin can install a serious improvement loop beside the same hooks the builtins use.

What “better self-improvement” has to mean

If you strip the brand names away, proper self-improvement for agents needs five properties:

  1. Observation that does not require surrendering your data by default.
  2. Proposal engines that match the failure mode — long context → RLM-class analysis; textual policy search → GEPA-class evolution; simple structure → deterministic heuristics.
  3. Evaluation that cannot be gamed by the search objective — holdouts, frozen envelopes, fixture admission.
  4. Activation that is explicit, scoped, and reversible — including automatic paths that still revalidate grants, policy, and revisions on every CAS.
  5. A host agent that remains useful when the loop is off.

RLM alone nails a slice of (2). GEPA alone nails a different slice of (2). Neither delivers (1)–(5) as a system. The A0 plugin’s bet is that the combination plus authority is the minimal serious design—and that shipping Observe-first defaults with a consented, horizon-bounded autopilot runner is more trustworthy than either a forever-blocked “coming soon” switch or a reckless autonomous rewrite.

Who should install it

Yes, if you:

  • Run Agent Zero on real projects with repeated tool patterns.
  • Want candidates and receipts more than vibes.
  • Are willing to start in Observe/Review before trusting Autopilot.
  • Care about rollback, project-scoped enrollment, and content-free operator views.
  • Want automatic promotion only inside calibrated canary math and signed fences.

Not yet, if you:

  • Need a one-click personality makeover.
  • Cannot tolerate worker dependency setup.
  • Want fully unsupervised self-rewrite with no gates, horizons, or rollback story.
  • Are still choosing a coding-only harness for a single repo and nothing else.

How to try it without fooling yourself

  1. Install into usr/plugins/dspy_rlm or via the Hub; enable the plugin.
  2. Assign chats to an Agent Zero project so automatic project setup can enroll parallel contexts.
  3. Leave automation on Observe until the dashboard shows healthy coverage and worker readiness.
  4. Move to Review when you want RLM/GEPA candidates—read them as hypotheses.
  5. Only then select Autopilot if you intend to authorize the bounded production loop; treat that click as consent, not a theme setting. Watch Recent activity for canary, promotion, monitor, and rollback states.
  6. Prefer signed dashboard/API commands for manual canary/activation/rollback when you want hands-on control; keep secrets in Secrets; scan community code.
  7. Remember: disable stops capture and injection; uninstall is a separate retention decision.

Source of truth: github.com/TerminallyLazy/a0-self-improvement (plugin.yaml version 2.1.0 at the time of this update).

The punchline

Self-improvement is not a model feature. It is a systems feature.

  • RLM helps the system see across contexts that used to blur.
  • GEPA helps the system search better textual behavior.
  • Neither alone earns the right to change an agent that can run commands on a computer.
  • Together, under authority-ranked evidence, they become a credible metabolism for Agent Zero—one that other harnesses only partially approximate, usually on a narrower coding substrate or with weaker promotion hygiene.
  • Autopilot in 2.1.0 does not delete that sentence. It operationalizes it: proposals stay proposals until replay, canary, calibration, grants, and CAS say otherwise—and regressions can still lose the pointer automatically.

Agent Zero’s long-standing claim was never “we fine-tune ourselves while you sleep.” It was: open core, real computer, replaceable parts, operator on the loop. A0 Self-Improvement is that claim applied to learning itself.

Updated