What it is: Prime Agent (github.com/PrimeIntellect-ai/prime-agent) is an open-source (MIT) harness for coding and long-running autonomous tasks, released by Prime Intellect on 2026-08-05. Instead of the familiar loop where the model emits one JSON tool call and waits, Prime Agent hands the model a persistent IPython kernel and lets it write Python to inspect data, call tools, reshape its own context, and launch sub-agents. Prime Intellect calls the pattern an RLM — Recursive Language Model: context is a variable, and sub-agent delegation is a function call inside a REPL.

Why it matters: This is the cleanest shipped expression of the "code-mode" idea that has been circulating for a year — programmatic tool calling and CodeAct — turned into a runnable harness you can curl and drive today, rather than a pattern you hand-roll. If you have watched an agent's context window fill with tool output it barely used, the pitch lands immediately.

Who should care: Builders running agents on long tasks — multi-hour refactors, research runs, anything where the JSON-tool-call loop starts to creak under context pressure. If your agent work is short and interactive, a polished daily driver like Claude Code is still the lower-friction choice; Prime Agent's payoff shows up when the task outlives the context window.

The two ideas that make it different#

Context is a variable. In a classic tool loop, every result you fetch — a 400k-token log, a directory listing, a giant JSON blob — gets appended to the model's context whether it needs the whole thing or not. In Prime Agent that result is a Python object. The model can filter it, summarize it, count it, or hand a slice to a sub-agent, and only what it deliberately surfaces ever costs context. That reframes compaction from a background garbage-collection problem into an explicit operation the agent performs in code.

Sub-agents are function calls. You don't hand a sub-agent a paragraph of instructions and block on it. You call it like a function; per Prime Intellect's writeup it returns immediately on admission and delivers its result asynchronously, so the main session keeps working while three sub-agents grind in parallel. It's the Python-class model of an agent taken one step further — the class can spawn more of itself.

Getting started#

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

# authenticate (subscription/API key)
export ANTHROPIC_API_KEY=sk-ant-...

# run it in your project
cd /path/to/project
prime-agent

Once inside, you work in the kernel. The shape of a turn looks less like a tool schema and more like ordinary Python:

# context is a variable — pull a big log, keep only what matters
log = read_file("build.log")              # 380k tokens, never enters the window
errors = [l for l in log.splitlines() if "ERROR" in l][-40:]

# a sub-agent is a function call — non-blocking
fix = subagent("Propose a patch for these errors", context=errors)

# ...keep working while `fix` resolves, then use it
apply_patch(fix.result())

Skills come in two forms — plain markdown and Python-backed — and you can ask Prime Agent to write them for you, which is the same skill-authoring flow other harnesses have adopted, just closer to the code.

The self-improving part, described honestly#

"Self-improving" is a loaded phrase, so be precise about what it is and isn't. Prime Agent adds a continual harness that makes small, evidence-backed changes to the scaffolding around the model — supplemental prompts, memories, skill descriptions, and sub-agent specifications. Crucially, those edits are explicit, persisted, and reversible. It is not touching weights and it is not learning in any gradient sense; it is editing its own config files and keeping a trail so you can roll a change back. That's a much safer and more auditable thing than the name suggests — but it is also new, and a harness that rewrites its own instructions is exactly the kind of thing you want running in a sandbox first.

Should you switch?#

Not wholesale, not yet. The headline benchmark — 95.5% on ARC-AGI-3 with Opus 5, just over the 95.4% human-expert baseline the team cites — is a real signal that the harness is competitive, but a single-harness number on one benchmark is a reason to try it, not a reason to migrate your production stack. The honest read: Prime Agent is the most legible open-source implementation of code-as-tools to date, it's MIT-licensed so there's no lock-in to evaluate it, and the context-as-variable model is genuinely the right shape for long tasks. Point it at a real refactor in a sandbox, watch what it does with your context, and decide from there. If you've been building your own training loop around Prime Intellect's stack, this is the inference-time companion to that bet.