Agents usually learn within a fixed body. EvoGen changes the body.
EvoGen is an outer-loop capability engineering harness for autonomous agents. It observes an agent operating in a partially understood environment, converts repeated failures into evidence-backed capability issues, coordinates isolated implementation work, and retains only changes that generalize under revealing, variant, regression, and long-horizon evaluation.
A generation is a reproducible version of the complete agent system: source, models, prompts, tools, memory, policies, capability manifests, configuration, and build artifacts. EvoGen does not require model-weight training or a genetic algorithm.
This is a runnable alpha, not only a scaffold. It includes:
- strict Pydantic contracts for generations, trajectories, capabilities, issues, specifications, candidates, experiments, and lineage decisions;
- append-only JSONL trajectories with explicit observation, affordance, binding, dispatch, receipt, and later-outcome events;
- a content-addressed artifact store and SQLite ledger;
- a conservative reference diagnostician that fails closed into probe work when the evidence is insufficient;
- environment investigation and capability specification boundaries;
- isolated Python capability candidates and adversarial static review;
- deterministic retention gates that require issue closure, structural variants, regression preservation, long-horizon success, and matched predictions;
- JSON-over-stdio interfaces for substituting real coding-agent roles;
- a Git worktree adapter for real subject repositories;
- a small KAE JSONL normalization adapter; and
- a complete deterministic microworld proof.
uv run --frozen --extra dev python scripts/verify.pyThis single command installs the locked development environment, runs Ruff and strict mypy, checks the committed schemas, runs the full test suite, reproduces the deterministic microworld retention result in a disposable workspace, and checks the diff for whitespace errors.
The demonstration starts with an intentionally impoverished agent. The world supports inspecting opaque containers, but the baseline agent body exposes only movement and acquisition of already-visible items.
The complete cycle then:
- runs the baseline through three independent hidden-container scenarios;
- records normalized causal trajectories;
- diagnoses an absent
reveal_contentseffect rather than an execution error; - inspects the actual environment operation surface;
- writes an evidence-backed
inspect_containercapability specification; - generates real Python plugin code in an isolated candidate workspace;
- compiles and reviews the candidate for revealing-case shortcuts;
- reruns baseline and candidate on one revealing case, three structural variants, two regressions, and one longer chain;
- applies deterministic retention rules; and
- records the retained generation and lineage.
Expected result:
Revealing success 0% -> 100%
Variant success 0% -> 100%
Regression success 100% -> 100%
Long-horizon success 0% -> 100%
Verdict: retain
The workspace contains:
.evogen-demo/
artifacts/ content-addressed immutable objects
candidates/ generated candidate source
traces/ raw normalized JSONL trajectories
subjects/ baseline subject configuration
evogen.sqlite3 generations, runs, issues, experiments, lineage
cycle-result.json complete typed result
report.md human-readable evidence report
runtime plane
world -> observation -> affordances -> decision -> binding -> execution
-> later causal evidence -> continuity -> next observation
evolution plane
trajectories -> diagnosis -> investigation/probe -> capability specification
-> isolated implementation -> review/evaluation
-> retain | revise | reject -> next generation
The executor does not rewrite itself casually during a run. Candidate changes are produced outside the runtime plane, evaluated against the unchanged parent, and promoted only through lineage gates.
The offline demo uses deterministic role implementations so the orchestration, evidence contracts, code-generation boundary, and retention logic can be tested without API credentials. It does not prove that a general model can yet infer arbitrary missing capabilities from arbitrary environments.
For open-ended use, replace one or more reference roles with
JsonStdioRoleBackend, or implement the protocols in evogen.adapters. The
external process receives one typed role packet and must return one typed JSON
result. Candidate deployment authority remains separate from agent authorship.
Inspect installed subjects without loading them, or run the subject-neutral API 1.1 conformance kit in disposable scratch storage. An explicit doctor workspace must be a brand-new path; existing paths, symlinks, repositories, and protected locations are refused:
evogen subject list
evogen subject doctor microworld
evogen subject doctor microworld --jsonThe doctor checks authority manifests, deterministic capabilities, trajectory and scenario isolation, candidate workspace safety, evaluation symmetry, and direct retained-generation materialization. Subject doctor output is additional evidence only and cannot certify generic checks.
A practical first integration uses observer mode:
- normalize the subject's trajectory events;
- publish a generation and capability manifest;
- expose scenario execution through
SubjectRunner; - expose environment/source investigation through
EnvironmentInvestigator; - create candidates through a project-specific builder or Git worktree; and
- evaluate them through
ExperimentEvaluator.
See docs/contracts.md and docs/kenshi-integration.md.
The codebase completes one honest deterministic end-to-end prototype and supplies extension boundaries for external roles. It does not yet prove a real game integration or model-generated diagnosis. Its local cycle is resumable at completed persisted stage boundaries, with typed receipts and content-addressed outputs; arbitrary instruction-level crash recovery is not claimed.
For a human-readable view of what is closed, what is next, what can run, and which claims remain withheld, open the offline project evidence cockpit. It is deterministically rebuilt from the checked-in plan, checkpoint, and reviewed capability narrative:
python scripts/build_project_cockpit.py
python scripts/build_project_cockpit.py --checkThe current repository authority and next unstarted bounded goal are recorded in docs/INTEGRATION_CHECKPOINT.md. The cross-repository delegation and evidence handoff protocol is recorded in docs/SEQUENCED_SUBAGENT_EXECUTION_PLAN.md.