Capability evolution today · end-to-end model evolution ahead
Finish the task. Grow the system.
AgentEvolver orchestrates specialist agents, evolves reusable components, and captures reward-annotated trajectories for SFT/RL—connecting task execution to a future train, evaluate, and serve loop.
Version0.1.0ImmutablecoreVersionedextensionsTrainabletrajectoriesRollbackbuilt in
AGENTEVOLVER / SYSTEM LOOP
NowExecute
Specialists act in one project
NowObserve
Trace every meaningful event
NowEvaluate
Tests, judges and benchmarks
NowEvolve
Versioned capabilities, reversible
NowCollect
Rewarded SFT/RL trajectories
NextTrain & serve
Update weights, gate, feed back
Implemented in the current runtimeEnd-to-end model-training roadmap
What it is
A task runtime that can preserve what it learns
The MetaAgent delegates today's work. When tests or review expose a reusable gap, an evolution loop can turn the missing method into a component for tomorrow.
Multi-agent planning, execution, review, and escalation
Tools, skills, agents, connectors, environments, workflows, and memory as extensions
Evaluation, version history, staging, promotion, and rollback
Reward-annotated trajectories for SFT and RL pipelines
What it is not
Uncontrolled mutation—or a finished trainer
Evolution is constrained and evaluated. The current release captures training-oriented SFT/RL records but does not yet update weights, manage checkpoints, and feed a trained model back into serving inside one run.
Tasks already produce reward-annotated SFT/RL trajectories
In-system training and model feedback are the next-stage roadmap
Tests, benchmarks, and human approval remain part of the loop
Design choices
Ten decisions that shape the system
The value is not a large capability count. It is the way orchestration, evaluation, inspectability, and rollback fit together.
Evidence before evolution
A failed check, recurring structural defect, or measured quality ceiling must establish the need. The normal response to a first fixable error is still to fix it.
Everything is HTML you can open
Prompts, workflows, task documents, memory reports and per-step snapshots are complete HTML documents — executable by the runtime and browsable, diffable, reviewable by a human.
Core and extensions stay separate
Hand-written built-ins remain in the package. Evolved components are staged, versioned, promoted, and rolled back outside it, limiting the mutation surface.
Budgets the model can see
Step, token and wall-time limits aren't just kill-switches: the remaining budget is rendered into the prompt every step as NORMAL / TIGHT / CRITICAL, so the agent plans around it instead of being cut off.
Four views, one project
Chat, a visual flow canvas, real VS Code in the browser, and a Science workstation with a live Jupyter kernel — all editing the same workspace, over one WebSocket protocol.
Execution becomes training data
TrajectoryHook records the effective prompt, native tool-calling target, observations, token use, and late-arriving reward—then exports SFT or pluggable RL formats such as VERL.
A step is a decision, not a wait
A long command, a terminal send, or a delegated sub-agent starts in the background and hands back a job id; the agent collects the output when it wants it. A step spent blocking is a decision the agent never got to make.
Code mode: one program, one turn
The model can write a program instead of emitting one tool call per turn. Its calls return through a guarded dispatch, and the program runs in its own interpreter — no framework object is one import away from model-written code.
Nothing changes until a person says go
In plan mode a run may read, search and reason, and nothing else. The gate reads what a capability declared about itself — mutates: false, or a read-only permission mode — never its name. One that declared neither is refused, bash_tool included.
A prompt prefix a cache can keep
The capability catalogs are frozen at their first render and sent ahead of the volatile agent state, with a cache breakpoint after them. Measured on one run: 72,647 of about 98,800 input tokens per step served from cache, against none before.
Fit & trade-offs
Powerful when the task justifies the machinery
AgentEvolver is designed for work where reusable methods, specialist coordination, and auditability matter more than minimum latency.
A good fit
Long-running engineering, data, or scientific tasks with several specialist roles
Teams that want task-specific methods to become reusable capabilities
Research on agent runtimes, SFT/RL data flywheels, evaluation loops, and human oversight
Projects that need detailed artifacts, visual control, and reversible extension changes
Think twice
Simple Q&A or one-step automation where a script or single agent is enough
Strict low-latency or low-token workloads; orchestration and evaluation add calls
Zero-operations expectations; the full stack needs Docker, Node.js, and credentials
High-risk use without task-specific tests, policy, approval, and rollback drills
Reusable capability ↔ maintenance
Extensions compound over time, but their contracts, evaluation data, and versions need ownership.
Richer coordination ↔ more cost
Specialist agents and baseline comparisons improve coverage while increasing model calls and wall time.
Rollback ↔ not a proof
Reversible changes reduce risk. They do not make an unverified extension safe or correct.
Architecture
One planner, many specialists
The MetaAgent plans and dispatches work over the Agent Bus to specialist sub-agents that run in parallel and return results for evaluation.
Runtime is how messages move; protocol is what a conversation means. Spawning an agent wraps it in a handle with its own inbox and a pump that drains it — which is what makes a running agent something you can talk to, pause, and pick back up.
spawnWrap a live agent in a ref: inbox, pump task, status, pending reply.
sendFire-and-forget a message into the inbox.
ask · invokeRun it and await a typed Response.
suspend · resumePark a coroutine on a key; anyone elsewhere can wake it by that key.
publish · subscribeFan a message out to every running subscriber of a topic.
stop · cancel · pauseGraceful stop drains first; control messages reach a mid-flight agent.
Getting stuck is a message, not a dead end
Escalation is the clearest use of suspend/resume: a blocked sub-agent asks its parent and parks itself, costing nothing while it waits, and carries on the moment an answer arrives.
blocked
The sub-agent asksIt posts an EscalationMessage to its parent — reason, situation, and what it suggests doing.
parked
It suspends on its own idA one-shot future is registered under its task_id. The coroutine holds no loop and burns no budget while it waits.
answered
The parent replies by idreply(task_id, guidance) resolves that future, and tells the caller whether anyone was actually still waiting.
or not
Nobody hangs foreverNo parent, a dead parent, or a timeout all return a graceful-stop instruction instead of blocking the subtask indefinitely.
One detail that had to be got right: a caller's timeout on ask must not cancel the future the agent owns. Cancelling the shared future would turn a normal late completion into an InvalidStateError and take the long-lived pump down with it — so the wait is shielded, and a slow answer is merely late, not fatal.
The Evolution Engine
A framework that extends its own capabilities
For each evolvable component type, specialized agents create, judge, and refine extensions without treating the hand-written core as mutable working memory.
1 · decide
Fix it, or evolve?Would re-dispatching the same agent with "fix X" plausibly succeed using what it already has? Yes → just fix it. That is the default.
2 · act
Generate or optimizeA generator writes a new capability into extension/; an optimizer rewrites an existing evolvable one in place. Both take the target by name.
3 · judge
Evaluate against baselineThe matching evaluator scores it under a read-only tool guard, then the same actor can run twice — with the new capability and without — to see if it actually helped.
4 · keep
Adopt or roll backChanges are live immediately but unverified. Every version is archived, so a regression unloads with one call.
It only fires on a defect somebody actually saw
Absence of visible defects is not evidence the work is good — usually it means nobody looked. Until a check has run and failed, the right move is to go get the signal, never to evolve.
01
Missing capability
The task needs an operation no tool, skill or connector provides, and retrying with the existing ones cannot work. "The agent didn't think to do it" does not count.
→ generator
02
Recurring structural failure
The same agent fails the same way twice or more despite corrective guidance. One dispatch can never satisfy this — re-dispatch with explicit guidance first and see if it returns.
→ optimizer, or a skill that encodes the fix
03
Quality ceiling
Output is systematically below bar on a dimension you have actually measured, because no method exists to do better. If you cannot name the measurement, you have signal-gathering to do.
→ generator, carrying the methodology
And the cases where it must not fire
A first-time, fixable defect in the deliverable — redo the work instead.
A one-off transient error — retry.
A TIGHT or CRITICAL budget — finish the task the user asked for.
A capability that is already there but was never wired in or never used — the single most common cause of weak output.
A frozen built-in — enable_evolving blocks it at registration; generate an extension/ capability instead.
Generator
writes a new component
Evaluator
scores whether it helped
Optimizer
rewrites an existing one
Evolving Ecosystem
Immutable core, versioned extension layer
Hand-written built-ins live in agentevolver/. Evolved components live in an external extension/ tree, loaded and versioned by the ExtensionManager. This limits where evolution writes and makes rollback possible; evaluation is still required.
ToolsSkillsAgentsEnvironmentsConnectorsWorkflows
The data flywheel
Every run can become training data
Trajectory is the bridge between using a model and improving one: it preserves the exact behavior seen at inference, attaches evaluation rewards, and projects the result into SFT or RL records.
implemented · capture
Run real tasksThe lifecycle hook records each effective prompt, reasoning turn, native tool call, observation, token count, and task relationship.
implemented · export
Build SFT / RL recordsRewards can arrive after judging. SFT uses OpenAI Chat turns; the pluggable RL interface includes a text-level VERL episode format.
roadmap · train
Train and version modelsConnect trainers, tokenizer-aware annotation, checkpoints, lineage, and model registration without importing training stacks into the runtime core.
roadmap · apply
Evaluate, promote, serveGate a candidate against baselines, approve promotion, serve it back to agents, and collect the next generation of trajectories.
z_tThe effective messages actually sent to the model
a_tReasoning plus native tool calls—the byte-faithful assistant target
o_tResults and errors returned by every action
r_tA benchmark or evaluator reward, backfilled after the run
One system, two forms of evolution
Component evolution gives agents new methods immediately. Model training internalizes successful behavior over time. AgentEvolver's end-state connects both through the same tasks, rewards, evaluations, and deployment controls.
Status: capture, reward backfill, JSONL persistence, SFT export, and RLFormat/VERL export exist today. The in-system trainer, checkpoint lifecycle, and trained-model feedback are planned integrations.
HTML-native
The agent's files are the files you open
Prompts, workflows, task documents and step snapshots are complete HTML documents — executed by the runtime and rendered in a browser from the same bytes. There is no "export to HTML" step that can drift.
Agent promptprompt/default/<agent>.html — run by prompt_manager, styled by prompt.css
Dynamic workflowworkflow/default/<name>.html — compiled by WorkflowCompiler into the runtime
Task documentexamples/tasks/*.html — loaded by task/loader.py
Memory reportFileSystemMemory — a JSON twin backs the runtime, the HTML is for you
Step snapshot<log_root>/messages/<agent>/NNNN.html — every step, in the same stylesheet as the prompt
Registry-driven
Nine kinds of capability, one contract
Every callable manager implements the same get_schema() — json returns the exact function-calling object sent to the model, md returns a human-readable contract. The prompt carries only a compact roster; full schemas travel in the request.
A React workbench talks to the Python Gateway over a WebSocket: four workspaces on one session, a live capability catalogue, a desktop the agent can actually use, and a conversation column carrying the goal, the jobs still running, and every step of a run.
A task sandbox usually needs some network — the agent's brain has to reach a model endpoint — while the work itself must not reach the open internet. A boolean flag cannot express that.
No interface at allNot a filter that must catch everything — the container simply has nowhere to go.
A socket, not a portFile permissions are a boundary; a listening port would be reachable by anything else on the machine.
deny beats allowAlways. With default_allow=False a forgotten host fails closed.
Derived allowlistModel hosts come from the deployment's own *_API_BASE, never hardcoded.
Every attempt recorded"The work had no internet access" becomes a claim a run can substantiate.
Three more layers sit around this one: six sandbox backends for isolation, a permission manager that classifies command intent before anything runs, and a write-ahead ledger that force-removes containers a dead run leaked.
Evaluate everything
Benchmarks out of the box
Datasets are read locally first, then snapshot-downloaded from HuggingFace on demand.
AIME 24/25GPQAGSM8KHLELeetCodeDeepWebProgramBench
Documentation
A guided path, not a link dump
Everything above is what this is and why. These are how — written, bilingual, and kept next to the code they describe.
# 2 · set one provider in .env
GOOGLE_API_KEY='...'# 3 · run an inline task
python examples/run_meta_agent.py \
--task "Reverse a string + add unit tests"# run from a task document
python examples/run_meta_agent.py \
--task-file examples/tasks/qsar_egfr_experiment.html
The full setup, including Model X, Vault, provider variables, and optional dependencies, is documented inscripts/INSTALL.md →
Close the loop from task execution to model improvement
Evolve reusable components today, collect training trajectories on every run, and help build the train–evaluate–serve loop next.