SelfEvoPI is a coding-agent harness that measures its own quality and builds the capability it is missing.

RepositoryHarness Leaderboard

A harness that measures itself

One CLI. A multi-provider router, a regression gate, persistent memory and teams, a local event bus, and a core that writes the artifact a task is missing.

Download the CLI

Four events in one turn

Select an event to move the active state marker.

Why the harness matters

+499 tokens over a 1,500 token ceiling

~82 ms cold start, 7 runs

Run the same model in two harnesses. Does the result change?

harness decides

  • Contextwhat enters the prompt
  • Turn lengthhow long the agent works
  • Errorswhat happens when the model is wrong
Context budget: 499 tokens SelfEvoPI overhead + 1001 free

The model supplies answers. The harness decides what reaches the model, how long a turn runs, what happens on error and whether a change is kept. That boundary is the product.

Engine supplies the model and tools; the harness decides context, turn length, errors and promotion

Open the Harness Leaderboard

Rules that shape the harness

Eight constraints decide what gets built and what stays out. They apply to the agent that edits the harness as much as to the harness itself.

Eight design rules around SelfEvoPI: no fork, thin coupling, zero dependencies, native Windows, one source of truth, external judge, verification before claims, external content as data

Each rule in one line

  • The engine is spoken to over RPC and never forked.
  • Configuration first, then skill, command, extension and server.
  • Node built ins only, with no runtime dependencies.
  • Windows native, without Docker, WSL or a virtual machine.
  • Commands, language and models each have one home.
  • A checker outside the author judges the result.
  • A number without a command and a date is a weak claim.
  • Web, MCP and tool output are data, never instructions.

The order of artifacts is a cost order. A config change is cheaper than a new server, so it is tried first.

How it adapts

The core runs a continuous loop. Each stage is independently testable and injectable.

The adaptive cycle Six stages around a central loop: detect, specify, generate, verify, gate, and promote or revert. The filled node marks promotion. detectspecifygenerateverifygatepromote or revert
  1. detectPoints to a repeated failure, a missing capability, or a fragile flow.
  2. specifyWrites a short contract with inputs, outputs, bans, and test cases.
  3. generateProduces the lightest artifact and runs node --check before writing.
  4. verifyProbes the real interface for that artifact kind.
  5. gateCompares with the baseline and requires zero regressions.
  6. promote or revertCommits atomically with memory, or rolls back and revalidates.
Promotion decision: verify feeds gate; green gate promotes, red gate reverts to generate

Artifact hierarchy, lightest first

MCP config
skill
CLI
extension
MCP server

The contract before the code

A gap becomes a short contract with four fields: inputs, outputs, bans and test cases. Generation reads it. The probe checks the artifact against it. The gate compares the result with the baseline.

Contract with inputs, outputs, bans and tests feeding generation and verification

A smoke test that always passes is not evidence. Each artifact kind has its own probe: JSON keys for config, a described capability for a skill, contract flags for a CLI, an import for an extension and JSON-RPC over stdio for a server.

Architecture

A thin layer around the engine. No fork, no bundled dependencies, no required container.

Architecture map A central SelfEvoPI node connects to eight layers: CLI, RPC client, router, evals, memory, sandbox, governance, and graph. CLIRPC clientRouterEvalsMemorySandboxGovernanceGraphSelfEvoPI
  • CLIThe REPL, palette, markdown, activity lines, and overlays.
  • RPC clientThe single point of contact with the engine protocol.
  • RouterProfiles, circuit breaker, retry, and a token ceiling.
  • EvalsDeterministic tasks, checkers, and a regression gate.
  • MemorySession, project, and skills, pruned by evidence.
  • SandboxStatic gate, Permission Model, process containment.
  • GovernanceVerified rollback and specific human approval.
  • GraphA validated graph with checkpoint, pause, and resume.

Data flow and guarantees

One normalized event stream

Normalized event flow: engine to RPC client to CLI to text, tool, settled, error
  • textstreamed answer
  • toolstart and end with target and result
  • settledturn closed
  • errorprovider text in product language

The probe decides the artifact

  • MCP configvalid JSON and keys
  • skillexists and describes the capability
  • CLIprobes the contract flags
  • extensionimports with a mocked host
  • MCP serverJSON-RPC 2.0 over stdio

The verifier runs outside the sandbox and the artifact inside a temporary directory. A smoke test that always passes is not evidence.

Guarantees around the loop

  • Static gate masks comments and literals before analysis
  • Permission Model with no network or child process
  • Tree kill reaches detached grandchildren on timeout
  • Memory promotes from session to project to skills
  • Rollback that fails never updates last known good
  • Graph checkpoints bind each node to a git commit

Anatomy of one turn

The terminal is the only surface. The input line stays at the bottom of the visible frame, and the status and shortcut lines sit directly under it even when a palette or panel opens.

Terminal frame with the answer and tool line above the input and the footer directly below the input

Above the input

  • answerStreamed text in a labelled block, wrapped at the terminal width.
  • toolsOne short line per call, with the target on that same line.
  • reasoningA collapsible block, toggled with Alt+T.

Below the input

  • statusMode, permission, model, context, time, branch and session.
  • hintThe shortcut line. It keeps its place when overlays open.
  • queueTyping during a turn queues the message; clicking a queued line sends it as steer.

In pipe mode the same frame drops carriage returns and cursor erases. Twelve tasks were checked for that. No line in a headless render exceeds 72 columns.

The judge sits outside the author

The harness that proposes a change is not the harness that accepts it. A deterministic checker runs the candidate in a temporary workspace, prints JSON and exits zero or one.

Candidate runs in a temporary workspace, a checker emits JSON and the gate compares with a baseline before promotion

What the gate asks

  • taskWas the target task actually solved?
  • regressionDid any other task get worse against the baseline?
  • budgetIs the token delta inside the accepted range?
  • ledgerIs the decision recorded in an append-only log?

What cannot be edited to pass

  • evals/Tasks, checkers and baseline belong to the judge.
  • core/governance/Modes, approval and rollback are protected.
  • verify-urls.mjsThe source gate is not weakened to make a build green.
  • recoveryA failed rollback never updates the last known good state.

There are 29 eval tasks and 29 matching checkers. A green run is a measurement on a given day, not a promise about future work.

How it compares

Facts with a named source. Where no primary source exists, the cell says not verified.

What sets SelfEvoPI apart

It measures before promotingDeterministic evals compare each task with a baseline. Promotion requires the target task to pass with zero regressions.
It writes the missing capabilityThe core detects a gap, writes the lightest artifact, probes its real interface and promotes only when the gate is green.
It routes with a budgetProfiles, circuit breaker, retry and a token ceiling decide which provider and model run each task.
It contains what it runsA static gate, the Node permission model, process-tree containment and protected areas surround generated code on Windows.
It leaves an audit trailBlock and warn decisions go to a local ledger with redacted excerpts, readable without exposing secrets.
It runs hooks without a shellLifecycle hooks read JSON from stdin, have a timeout and a minimal environment, and never call a shell.

Other harnesses

Claude Code

CLI, IDE, desktop, web and mobile over one engine. Anthropic models with third-party providers on some surfaces. Auto memory, /resume with search, /fork, /rewind and /goal with a separate evaluator. Six named permission modes, MCP, skills and plugins. No primary source says it modifies its own code.

SelfEvoPI adds a baseline regression gate and a core that writes and verifies artifacts. No primary source says Claude Code rewrites its own harness.

OpenCode

The most model-agnostic of the group: TUI, desktop and web through opencode pair. MCP, plugins, skills and agents in Markdown files. /sessions, /fork, /compact and background subagents. No named approval modes; security is allow, ask and deny rules per agent. No /goal or /loop confirmed in the inventory of 34 commands.

SelfEvoPI adds deterministic evals with a regression gate, a native Windows sandbox and a redacted security ledger.

Codex CLI

OpenAI models across CLI, desktop, web and cloud. MCP, skills, subagents and /goal tied to a verifiable condition. It separates sandbox reach from the moment of asking, with automatic approval review. Four named interface modes and /permissions in the CLI.

SelfEvoPI adds an engine-agnostic router with profiles, circuit breaker and a token ceiling. The sources consulted tie Codex to OpenAI models.

Hermes Agent

Model-agnostic across CLI, desktop and messaging gateways. Memory in MEMORY.md and USER.md with FTS5 search over past conversations. Over 40 tools, MCP, skills, plugins and subagents. Declared self-evolution: it creates and improves skills and runs background review. /goal uses an auxiliary Ralph-loop judge. Eight documented security layers.

SelfEvoPI adds a baseline comparison before promotion and probes of the real artifact interface. Both evolve, but the sources describe different gates.

DeepSeek Harness

Everything is a plugin over Cordis: model, tools and agent loop are replaceable by configuration. Web UI, Desktop, CLI, SDK and ACP. Append-only session log with fork and resume. ctx.goals is same-session; no evidence of self-evolution, long-term memory, MCP, REPL or named skills. SAFETY.md calls it a developer preview with no audit and says sandboxing does not guarantee isolation.

SelfEvoPI adds verified rollback, a static gate and memory that persists across sessions. DeepSeek documents same-session goals only.

Unharnessed

One tool: a persistent Python REPL. The model writes the rest. No declared memory, no permission prompts, no subagents. Goal mode ends only with goal.complete(), with a budget that degrades and gates run by the harness. The README warns that the kernel is not a sandbox. The 47 of 66 claim is not verifiable because the benchmark section shows Placeholder data.

SelfEvoPI adds the structure Unharnessed leaves out: router, evals, memory, sandbox and governance. The tradeoff is deliberate, not a defect.

PI Coding Agent

A minimal and extensible harness. Five interfaces: TUI, print, JSON, RPC and SDK. Model-agnostic through pi-ai. Session tree, native MCP, skills as /skill:name, custom keybindings and RPC. The README says it deliberately skips subagents and plan mode and includes no permission system, so it runs with the permissions of the user who launched it.

SelfEvoPI adds a built-in permission system, a native sandbox and a regression gate. The Pi README says it omits a permission system and subagents by design.

SelfEvoPI bets that the right amount of structure wins.

Unharnessed bets that less structure wins. The 47 of 66 tasks claim on its site is unverified: the benchmark section shows Placeholder data.

Harness comparison
Harness Surface Model relation Memory Tools Evolution Sandbox
SelfEvoPICLIAgnostic router, no engine forkPersistent, three levelsCLI commands, MCP, subagentsDetect to promote, with regression gateWindows native, static gate
Claude CodeCLI, IDE, desktop, web, mobileAnthropic, some third-party providersAuto memory, resume, fork, rewindMCP, skills, plugins, hooks/goal with a separate evaluatorSix named permission modes
OpenCodeTUI, desktop, webAgnostic, multi-providerSessions, fork, compactMCP, plugins, skills, Markdown agentsNot verifiedAllow, ask, deny rules per agent
Codex CLICLI, desktop, web, cloudOpenAI modelsResume, fork, persistent goalsMCP, skills, subagents, hooks/goal with a verifiable conditionSandbox and approvals separated
Hermes AgentCLI, desktop, messaging gatewaysAgnosticMEMORY.md, USER.md, FTS5 search40+ tools, MCP, skills, pluginsDeclared self-evolution, Ralph judgeEight documented layers
DeepSeek HarnessWeb, desktop, CLI, SDK, ACPAgnostic by configurationAppend-only log, fork, resumePlugins over CordisSame-session goals onlyDeveloper preview, no audit
UnharnessedVS Code extension, CLI, ACPAgnostic, many providersNone by designOne Python REPL, MCP in kernelGoal and harness-run gatesNone, kernel is not a sandbox
PI Coding AgentTUI, print, JSON, RPC, SDKAgnostic through pi-aiSession tree, resumeMCP, skills, keybindings, RPCNot verifiedNo built-in permission system

Evidence

Every number has a command and a date. These are measurements from one day, not a performance guarantee.

Measured evidence, 23 November 2026
Metric Value Command
Unit tests1303 total, 1296 pass, 7 skipnpm test
Team and event tests64 tests passnode --test core/agent/team.test.mjs core/forge/events.test.mjs
Full verificationexit 0, 33 of 33 URLs return 200npm run verify
Cold start~82 ms mean, 7 runstimed node apps/cli.mjs --version
Prompt overhead+499 tokens over a 1500 token ceilingnode scripts/measure-selfevopi-overhead.mjs --runs 3
Model capabilities48 of 48 checkednpm run models:check
Node app task7.4 s, files created, tool callingTask in a temporary workspace
HTML site task9.2 s, files created, tool callingTask in a temporary workspace
Two parallel subagents3.1 s, both answeredrunSwarmExecution
Lifecycle hooks6 events, no shell, timeout and redactioncore/agent/hooks.test.mjs and end-to-end test
Security ledgerblock and warn decisions with redacted excerptcore/sandbox/telemetry.test.mjs
Text contrastabove 7:1 in every themecore/agent/theme.test.mjs
Pipe outputno carriage return or cursor erase in 12 taskslogs of the 12 tasks
Transitive model error429 followed by an answer is not reported as failureapps/cli.test.mjs

Security and limits

What exists

  • Static gate before execution, Permission Model, process containment
  • evals/ and core/governance/ stay protected
  • Network, credentials, and outside writes pause for approval
  • No secret is printed, logged, or committed
  • Lifecycle hooks read JSON, never call a shell

What does not exist

  • Lexical skills, no embeddings
  • Clock and ledger trigger, no external sources
  • Four models end calls without text
  • No /btw, custom keybindings, or title progress bar
  • Cells use internal tools, no full gateway wiring
  • Real LSP server and real DAP process remain unproven

The layers around generated code

A static gate reads the source before it runs. The Node permission model limits what the process can reach. Process containment reaches detached children on timeout. Protected paths keep the judge out of reach. Decisions go to a local ledger with redacted excerpts.

Concentric containment layers around a generated artifact, with a local ledger recording decisions

What it is and what it is not

A precise boundary is part of the product. It says which promises the harness makes and which it refuses to make.

In the release

  • One conversation in one terminal
  • Router, evals, memory, sandbox and governance
  • An external engine reached by RPC, never forked
  • A provider the user configures, with no key in the repository
  • Twelve themes and three editable slots

Out of scope by decision

  • Desktop app, web panel and editor extension
  • Fork of the engine or bundled runtime dependencies
  • Docker, WSL or a virtual machine as a requirement
  • An operating system sandbox on Windows
  • Multi-user isolation and tenant separation

Install

The repository is the current path. Four commands take a clean checkout to a running CLI.

git clone <repo-url> SelfEvoPI
cd SelfEvoPI
npm run verify
npm run cli

Requirements

Windows, nativeNo Docker, WSL or virtual machine.
Node 22.19.1 or newerNeeded when installing from the repository. The release zip bundles it.
Git 2.55 or newerWith core.longpaths set to true.
The engine CLIInstalled separately. SelfEvoPI speaks to it over RPC and does not fork it.

npm run verify runs unit tests, structural evals and source URL checks. The public release leaves out the private ledger that some development tests read.

Download and first run

The release zip carries the full CLI, SelfEvoPI.exe and Node at its root. Extract it, open the executable, then give it one endpoint and one key. Nothing else needs installing.

Download SelfEvoPI 2.0.0

extraia o zip
SelfEvoPI.exe --version
/providers quick https://openrouter.ai/api/v1 NOME_DA_VARIAVEL
/model

What the executable does

  • launcherUses the bundled node.exe, or the one on PATH if absent.
  • workspaceEnters the application folder so the conversation keeps its place.
  • secretsNo key, no menu and no network call of its own.

Quick provider setup

  • inside/providers quick pulls every model from the endpoint and saves them.
  • outsideproviders-setup --quick asks endpoint and key with the key hidden.
  • resultConfig lands in the user profile. /model then chooses a model.

CLI surface

One surface: a conversation with a command palette. Modes change what the harness may do with the workspace. Commands change what it knows and shows.

Modes

  • /planReads and proposes. It does not write.
  • /buildWrites and runs inside the workspace.
  • /manualBuild with a confirmation before each write.
  • /askAnswers only. It never touches disk.
  • /goal <condição>Adds a completion check that clears itself once satisfied.
Session states: launch → active → resume/fork/compacted

Permission and approver are separate axes from mode, and the status line shows them separately.

In prose, ultrathink raises effort, chillax lowers it, and orchestrate or workflowz set the task role. No code or path changes.

Commands by group

Commands grouped by function
Group Commands
Evolution/evo /detect /memory /skills
Session/sessions /fork /resume /compact /export /undo /redo /diff
Context/cost /status /context /history /verbosity
Provider/providers /model /effort /theme /language /reload
Orchestration/swarm /subagent /worktree /mcp /plugins
Teams and events/agents /team /bus /cell
Editing/paste /attach /images /init /import /hooks /security-log

Teams, events and memory

Version 2.0.0 keeps state between turns without adding a dependency.

Persistent teamsA board, messages and a deterministic step survive a restart. Writes are atomic.
Local event busEvents are deduplicated and keep a saved cursor, so a restart does not replay them.
Automatic memoryFacts are redacted before storage and recalled by term overlap.
Persistent cellsA restricted runtime keeps state between calls. Calls and output have fixed limits.
Agent definitionsFrontmatter files define modes and ordered permission rules.
Refutation auditA claim is tested against the running CLI before it stays in the foundation document.

State that survives a restart

Sessions, facts and team work are written to disk. Nothing is held only in the process, and nothing is read back without a redaction step at the entry.

A fact is redacted, stored in session memory, promoted to project memory and then to skills, with pruning at each level

Three levels of memory

  • sessionHolds what belongs to one conversation.
  • projectKeeps facts that survive across sessions.
  • skillsReceives only what evidence supports.
  • recallLexical first, then PPMI associations, then a glossary.

Teams and events

  • teamA board, messages and a deterministic step survive a restart.
  • busEvents are deduplicated and the cursor is saved.
  • cellsA restricted runtime keeps state with call and output caps.
  • writesAtomic, so a crash does not leave a half board.

Memory has a 400 token ceiling per turn, and it is append-only. Promotion is not automatic just because a fact was written.

Themes

The picker holds twelve built-in palettes and three editable slots. Each palette maps the same semantic roles, so switching one changes the whole interface at once instead of one element at a time.

  • padrao
  • violeta
  • azul
  • ciano
  • verde
  • esmeralda
  • laranja
  • rosa
  • vermelho
  • magenta
  • dourado
  • grafite
  • custom 1
  • custom 2
  • custom 3

Every palette passes WCAG AA on its own background and text roles stay above 7:1 (core/agent/theme.test.mjs). If the terminal does not announce truecolor, the palette degrades to ANSI-256 rather than silently doing nothing.

Keyboard

While the agent works you can keep typing. Enter queues the message and it is sent when the turn finishes.

Keyboard shortcuts
Key Action
Ctrl+OStatus panel.
Ctrl+KSessions, with type-to-filter and a preview of the first message.
Ctrl+PActivity list: shells and subagents.
Ctrl+TInterface task list.
Ctrl+,Settings editor, including language.
Alt+TShow or hide reasoning.
Ctrl+CCancel the turn; with text on the line, clear the line.
EnterQueue the message while the agent works.
!cmdRun a shell command directly in the workspace, without going through the model.
@fileInject a file into the prompt as context.
qQuit.

Hooks & Code Mode

Two opt-in layers sit between the harness and the work: lifecycle hooks that observe a turn, and a code mode that replaces a large tool catalog with one call.

Hooks

Workspaces declare lifecycle hooks in .pi/hooks.json, workspace-local and never your personal agent config. /hooks shows the configuration and the last results.

  • turn_start
  • turn_end
  • tool_start
  • tool_result
  • error
  • compact
  • stdinEach hook receives the event as JSON.
  • shellNever called. Hooks run without one.
  • timeoutEvery hook has one, so a slow hook is stopped.
  • environmentMinimal, by design.
  • failureRecorded, never fatal to the turn.

Code Mode

In a workspace with many MCP servers the tool catalog can flood the context. Opt-in code mode runs a short JavaScript program in a restricted node:vm context whose only effect is tools.call(name, args).

  • node:vmA restricted context, not the main one.
  • tools.callThe only way to reach a tool.
  • blockedNo process, require, fetch, eval or Function.
  • limitsAllowlist, call limit, deadline and output cap.

The gateway is opt-in and registered locally by the user. It discovers servers and tools from the local config at runtime, so no server name, command or credential lives in the repository.

First commands

Five commands take a session from launch to a configured provider.

First commands
Command What it does
npm run cliOpen the CLI.
/providers discover <url>Probe an OpenAI-compatible endpoint.
node scripts/providers-setup.mjsGuided provider setup.
/verbosity [level]Choose what a turn shows.
/language [en|pt]Switch the interface language.

Every launch opens a new session. Resume with --resume <id> or /resume.

Questions people ask

Do I need Docker or WSL?
No. The harness runs natively on Windows with Node 22.19.1 or newer.
Which model does it use?
You configure the provider. The public release ships no key and no preset account.
Does it resume the last session on launch?
No. Every launch opens a new session. Resume with --resume or /resume.
Does the loop install what it writes?
No. It writes the artifact into the workspace. The user registers a server or skill locally.
Is the sandbox an operating system boundary?
No. It is a static gate, a Node permission model, process containment and a protected set of paths. Those are different claims.
Why does English come first?
It is a recorded decision for the public release. /language pt switches the interface.
Can I verify a claim on this page?
Yes. The Evidence table gives a value, a command and a date. claims.md records which statements were measured and which were inferred.