Prime Agent: Inside Prime Intellect’s Self-Improving RLM Coding Harness

Prime Agent is an open-source, self-improving coding harness released by Prime Intellect in early August 2026. It is built around two core abstractions — the Recursive Language Model (RLM) and the Continual Harness — which together let the agent write code, test it, learn from results, and rewrite its own harness as it works. Running on Opus 5, the self-improving RLM harness scores 95.5% on ARC-AGI-3 (RHAE Best@1), edging past the claimed human-expert baseline of 95.4%, and ships under the MIT License with a single install command.

Diagram of how Prime Agent works: one IPython kernel, rlm() sub-agents, /refine, task solved
How Prime Agent works: one persistent kernel, sub-agents spawned via rlm(), and a harness it refines as it goes.

What Prime Agent Is and Who Built It

A self-improving harness, not just another coding agent

Prime Agent is a general-purpose coding harness presented by Prime Intellect on August 5–6, 2026. What distinguishes it from stateless coding agents is simple but consequential: the harness treats its own prompts, memory, sub-agents, and skills as editable state — and updates that state while it works. There is no external fine-tuning loop. The self-modification happens live, inside the active trajectory. The project is fully open-source under the MIT License and is available at github.com/PrimeIntellect-ai/prime-agent, built on top of pi, an open-source minimal agent harness by earendil-works.

Who is Prime Intellect

Prime Intellect describes itself as a company pursuing an open-stack path to superintelligence. As of mid-2026 it carries a valuation of roughly $1 billion, having closed a $130M Series A in July 2026 that brought total funding above $150M. Backers include Radical Ventures, NVIDIA Ventures, and Intel Capital. Before Prime Agent the company had shipped Environment Hub and a verifiers stack for reinforcement learning — both open-source, both feeding into the infrastructure that Prime Agent now runs on. The full technical announcement is available on the Prime Intellect blog.

The Recursive Language Model (RLM): Context as a Variable

The Recursive Language Model is the theoretical backbone of the open-source coding and research agent. The concept was introduced by Alex L. Zhang in a blog post in October 2025 and later formalised in arXiv paper 2512.24601. The core idea: context is not a fixed buffer to fill — it is a variable the model actively programs over.

One tool: a persistent IPython kernel

The recursive agent harness gives the model exactly one tool: a persistent IPython kernel (REPL). Every action — reading files, running tests, calling APIs, spawning sub-agents — is expressed as Python executed inside that kernel. Because state persists across turns, the model can hold useful context outside its active token window: computed variables, downloaded data, imported modules. This makes the RLM harness unusually token-efficient without sacrificing expressiveness.

Subagents as function calls

Where most multi-agent systems pass messages through queues or JSON schemas, the RLM delegates work the way a Python program does: as function calls. The syntax await rlm("inspect the authentication flow") spawns a child agent that runs in its own context, returns a result, and exits. The root agent runs on the most capable (and expensive) model; sub-agents can be routed to cheaper models. This parent/sibling/child topology — what Prime Intellect calls A2A (agent-to-agent) messaging within a “nuclear family” — keeps cost proportional to task complexity.

The Recursive Language Model treats context as a first-class variable, enabling sub-agent delegation through ordinary function calls rather than opaque message-passing infrastructure.

Alex L. Zhang, arXiv 2512.24601

The Continual Harness: How Prime Agent Rewrites Itself

The Continual Harness is the second major abstraction in Prime Agent, described in Karten, Zhang et al. (arXiv 2605.09998). It formalises the harness state as a four-tuple H = (ρ, G, K, M): the base system prompt (ρ), sub-agents (G), skills (K), and memory (M). The agent can create, read, update, and delete any element of that tuple from inside its own trajectory — with one hard constraint: the base system prompt is immutable, so the agent cannot undermine its own foundation.

Harness state you can create, read, update, delete

Skills in the Continual Harness are importable Python packages. When the agent discovers a useful pattern — a better way to parse logs, a helper for a particular API — it can codify that pattern as a skill and import it in future tasks. Memory works similarly: structured information the agent decides to keep persists across sessions. Sub-agents can be added or removed depending on what the current task requires.

ComponentSymbolWhat it is
Base promptρImmutable system-level instructions
Sub-agentsGNamed agents the harness can spawn
SkillsKImportable Python packages authored by the agent
MemoryMStructured data the agent persists across sessions

/refine and rollback

Self-improvement is exposed through the /refine command — a CRUD surface over the H tuple. Refinements are designed to be small and evidence-backed: the agent must justify each change before committing it. Snapshots are taken before every modification, and rollback by snapshot ID is available at any point. A demonstration of the continual learning mechanism appears in a Pokémon task from the Karten, Zhang et al. paper, where the agent progressively improved its own harness across episodes.

Continual Harness self-improvement flow: harness state, /refine edits, snapshot and rollback
The Continual Harness lets Prime Agent rewrite its own skills and memory via /refine — while the base prompt stays locked and every change can be rolled back.

Benchmarks: 95.5% on ARC-AGI-3 and Beyond

Prime Intellect published benchmark results across several evaluation settings. The headline number is on ARC-AGI-3, but the general-purpose coding harness also shows gains on longer-horizon autonomous tasks.

The ARC-AGI-3 result

Running on Opus 5, Prime Agent scores 95.5% RHAE Best@1 on ARC-AGI-3, above the claimed human-expert baseline of 95.4%. Three independent runs produced 95.0, 95.2, and 95.5; the median is 95.2. Best@3 accuracy reaches 99.97%, and all 183 of 183 levels are solved. One important caveat: these numbers are vendor-reported and do not appear on the official arcprize.org leaderboard, a point discussed in more detail in the criticism section below.

ModelHarnessARC-AGI-3 (Best@1)
Opus 5Prime Agent95.5%
Opus 5Claude Codelower (6/9 tasks lost)
GPT-5.6 SolPrime Agentbeats Codex in 6/9 tasks
GPT-5.6 SolCodexlower (6/9 tasks lost)
GLM-5.2Prime Agentbeats pi-mono in 8/9 tasks
GLM-5.2pi-monolower (8/9 tasks lost)

Gains across models and long-horizon tasks

The pattern holds across model families: the self-improving RLM agent outperforms its model’s native harness in most head-to-head tasks. GLM-5.2 paired with Prime Agent beats pi-mono in 8 out of 9 tasks. Opus 5 in Prime Agent beats Claude Code in 6 out of 9. GPT-5.6 Sol in Prime Agent beats Codex in 6 out of 9. No model in these comparisons was trained specifically around Prime Agent — the gains come from the harness, not from model fine-tuning.

Bar chart of Prime Agent task wins out of 9 across three model families
Same models, better results: paired with Prime Agent they beat their native harnesses in most head-to-head tasks (out of 9).

On longer autonomous tasks, Prime Agent reaches a Factorio production score above 100,000 within hours, including episodes where the agent discovered reward hacking via RCON commands. On EmulatorBench the agent reconstructs gameplay logic for SEGA Genesis and Game Boy Color titles.

Installing and Running Prime Agent

One-command install and supported models

Installation on macOS or Linux requires one command:

curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh

The installer verifies a SHA-256 checksum before placing the CLI. Authentication supports several paths:

  • Prime Intellect subscription login
  • Direct API keys (Anthropic, OpenAI, Zhipu)
  • Azure OpenAI and Amazon Bedrock endpoints
  • Self-hosted inference via vLLM, Ollama, or LM Studio

Validated models as of the August 2026 release are Opus 5, GPT-5.6 Sol, and GLM-5.2. The harness is model-agnostic by design; support for additional backends is expected as the open-source community extends the project.

Four steps to install and run Prime Agent
Getting started with Prime Agent: one-command install, plug in any model login or API key, run in the cloud or self-hosted, then hand it a goal in autonomous mode.

How to run Prime Agent on a long task

Here is the basic flow for launching an autonomous session:

  1. Install via the curl command above and authenticate with your chosen provider.
  2. Open a terminal in your project directory.
  3. Start an interactive session: prime-agent.
  4. Describe your objective and let the agent set a persistent goal for the session.
  5. Enable autonomous mode with the --autonomous CLI flag — optionally specify turn budget, token budget, or wall-clock time limit.
  6. Monitor progress via scheduled heartbeat messages that report current agent state without interrupting execution.
  7. Review the harness snapshot log and use rollback if an unwanted /refine was committed.

Sub-agents have a built-in idle timeout of 30 minutes. Quality gates can be configured to pause autonomous execution when confidence drops below a threshold.

Prime Agent vs Claude Code and Codex

A harness layer, not a model

The most important distinction between Prime Agent and Claude Code or Codex is architectural. Claude Code and Codex are proprietary harnesses built and controlled by their respective model vendors (Anthropic and OpenAI). Prime Agent is a model-agnostic open-source harness layer that sits on top of any supported model. This means the same model — Opus 5, for instance — can be run through either Claude Code or Prime Agent, and the harness choice affects results independently of model capability.

FeaturePrime AgentClaude CodeCodex
LicenseMIT (open-source)ProprietaryProprietary
Model supportMulti-vendorAnthropic onlyOpenAI only
Tool callingProgrammatic (Python REPL)JSON tool schemaJSON tool schema
Self-modificationYes (/refine)NoNo
Multi-agent topologyA2A parent/sibling/childLimitedLimited
Self-hosted inferenceYes (vLLM/Ollama/LM Studio)NoNo

What’s actually different

Programmatic tool calling is the sharpest technical difference. Claude Code and Codex surface tools through JSON schemas that the model populates at each turn. Prime Agent uses a persistent Python REPL: tools are just functions imported into the kernel and called like any other Python code. This removes the schema overhead and lets the agent chain tool calls, pass results between them, and handle errors without re-entering the model’s generation loop.

Comparison of a proprietary harness versus the open, model-agnostic Prime Agent
The core difference: Claude Code and Codex are closed and vendor-locked, while Prime Agent is an open (MIT), model-agnostic harness layer.

Self-modification via /refine has no equivalent in Claude Code or Codex. And agent-to-agent messaging (A2A) in Prime Agent follows a structured family tree — parent, sibling, child — with explicit scoping of what each agent can see and modify.

Criticism, Limits, and Security

Benchmark skepticism

Community discussion of Prime Agent raises a concern worth taking seriously: Prime Intellect’s ARC-AGI-3 result does not appear on the official arcprize.org leaderboard. ARC-AGI-3 is a few-shot benchmark, and critics note that a self-improving harness could theoretically allocate itself more attempts than a standard evaluation would permit — making the Best@1 framing harder to interpret. The community has also flagged a practical annoyance: the installer places the CLI binary in a Homebrew-managed directory without providing an uninstall path, and the repository is described as significantly larger than expected for its scope.

These are legitimate concerns, not dismissals. The benchmark gains across model families (GLM-5.2, Opus 5, GPT-5.6 Sol) are consistent enough that the harness likely provides real value — but independent third-party evaluation on a standardised leaderboard would substantially strengthen the claims.

Not a sandbox

The README is explicit: Prime Agent is not a security sandbox. Python generated by the agent runs with the full permissions of the user who launched the process. That means file system access, network access, and the ability to execute arbitrary code without containment. Running Prime Agent on untrusted tasks or in shared environments without additional isolation (Docker, VMs, restricted user accounts) carries real risk. This is not unusual among open-source coding agents, but it is worth stating clearly before pointing the harness at production systems.

FAQ

keyboard_arrow_up