Prime Agent: Prime Intellect's Open RLM Agent

8 min read · · MoClaw Editorial
Prime Agent: Prime Intellect's Open RLM Agent

Prime Agent is Prime Intellect's open-source RLM coding agent for long-running work. What a recursive language model is, and what self-improving means.

Table of Contents

Share this

Prime Agent is Prime Intellect's open-source coding and research agent, built for work that runs longer than a chat window stays open. Two ideas hold it together: a Recursive Language Model that turns context into variables inside a live Python REPL, and a Continual Harness that lets the agent write durable lessons back into its own scaffolding between sessions.

The word doing the most work in the pitch is "self-improving," and it does not mean what people usually assume. Nothing here trains a model. What improves is the harness around it.

PrimeIntellect-ai/prime-agent opened on May 8, 2026. It crossed 11,500 stars by August 10, up from around 6,700 two days earlier, which is the sort of curve that follows a release rather than a slow build. Three versions shipped inside 72 hours: v0.6.1 and v0.7.0 on August 5, then v0.7.1 on August 7. MIT licensed, TypeScript, macOS and Linux.

Key Takeaways:

  • RLM stands for Recursive Language Model, not reinforcement learning. Context becomes variables; subagents become function calls; a persistent IPython session is the substrate.
  • Self-improvement happens through /refine, which writes evidence-backed updates into supplemental harness state. The base system prompt is immutable and snapshots allow rollback.
  • Sessions are daemon-backed, so closing the terminal doesn't kill the work, and prime-agent attach picks it back up.
  • Running agents can message each other directly instead of routing everything through you.
  • The README says outright that the worker and kernel processes are not a security sandbox. It executes model-generated Python with your permissions.

What Prime Agent is, in plain terms

A terminal agent that works in whatever directory you launch it from, with a persistent Python interpreter as its main tool rather than a menu of function calls.

That last detail changes the feel of using it. Most coding agents expose file reads, shell commands and search as discrete tools the model selects from. Here, file operations, shell commands, tool use, subagent spawning and context management all happen through code the model writes into a live IPython session. State carries between turns because it's sitting in the interpreter, not because someone re-summarised it into the prompt.

Installation is a single curl from app.primeintellect.ai, which fetches a versioned release, checks its SHA-256, installs the prime-agent command and prepares the IPython runtime. First launch wants /login to pick a subscription or API-key provider. The agent then operates on the current directory, which is why the docs push you toward a disposable clone or a clean worktree.

The TUI sits on top of pi, credited in the acknowledgements, and the wider Prime Intellect stack around it includes verifiers and PRIME-RL. This is a lab shipping a tool that fits its research programme, not a standalone product.


Prime Intellect's own write-up of the Recursive Language Model, the abstraction Prime Agent is built on (primeintellect.ai, August 10, 2026)
Prime Intellect's own write-up of the Recursive Language Model, the abstraction Prime Agent is built on (primeintellect.ai, August 10, 2026)

What "RLM" actually means

The Recursive Language Model is a programming model, and two phrases from the docs carry it.

Prompt-as-a-variable means context is a value you can hold, slice, pass around and inspect rather than a monolithic string that grows until it blows the window. Programmatic tool and sub-agent calling means rlm(...) is a function you call from inside the REPL; it spawns a real child agent, that child does its work in parallel or in the background, and its result comes back into your session as data.

Recursion is the point. A child agent can spawn its own children, each with a bounded slice of the problem and its own context, and the parent gets the answer without ever loading the child's transcript. Anyone who has watched a long agent session degrade as the window fills will recognise what problem that solves. It's the same instinct behind good context engineering for agents, pushed down into the language the agent writes in.

Skills follow the same logic: they're importable Python packages, not prompt fragments, and a built-in skill creator turns a workflow you keep repeating into something installable at project or personal scope.


Notes about your repo only help if something is still working.
Prime Agent accumulates lessons across sessions. That compounding is worth very little if every session ends when you shut the laptop.
Pick this back up tomorrow morning and keep going…See MoClaw →

The self-improving part, and its limits

Here's where careful reading pays off, because "self-improving agent" is a phrase that has been stretched past breaking in 2026.

Prime Agent's mechanism is the Continual Harness, described in arXiv 2605.09998, Continual Harness: Online Adaptation for Self-Improving Foundation Agents. It stores supplemental prompts, memories, skill descriptions and reusable subagent specifications as durable state. The /refine command reviews what just happened in the session and can apply small, evidence-backed updates to that state.

Three constraints keep it honest. The immutable base system prompt is never rewritten. Refinements are recorded as snapshots, so a bad lesson can be rolled back. And by default the state is local to the session rather than shared globally, so one confused afternoon doesn't poison every future run.

What it is not: no weight updates, no fine-tuning, no reinforcement learning loop. The model is whatever your provider serves. The agent gets better at your particular repo by accumulating notes about your particular repo, which is a real and useful thing, and a much smaller claim than the phrase suggests. We've gone through the broader category in the guide to self-improving coding agents if you want the comparison.


Three layers get called self-improvement. Prime Agent changes the third one
Three layers get called self-improvement. Prime Agent changes the third one

Long-running work, which is the actual pitch

Strip out the RLM vocabulary and what remains is a set of features aimed squarely at tasks that outlast a sitting.

Sessions are daemon-backed. Detach the terminal and the agent, its IPython state, its schedules and its subagents keep going; prime-agent agents lists what's running, idle or saved, and prime-agent attach <agent> puts you back in. /goal holds an objective across turns until you complete, pause or clear it. /heartbeat, rlm_heartbeat and prime-agent schedule re-enter a session on a timer or at a set time. Retained subagents and automatic compaction carry progress forward.

Agent-to-agent messaging is the feature that feels newest. Running agents and retained subagents can find each other, exchange messages and steer active work without you sitting in the middle relaying. Whether that's an improvement or a debugging nightmare depends on how much you trust the population you started, a tension familiar to anyone who has run several coding agents in parallel.

/autonomous runs within configured turn, token and time budgets and can enforce user-defined quality gates. The docs attach a caveat that most tools of this shape leave out: a passed gate only verifies what that gate checks, and hitting a budget limit says nothing about whether the task succeeded. Refreshing to see it written down.


The security posture you're accepting

The README puts this in a warning block rather than a footnote, so it's worth repeating at the same volume.

Prime Agent runs model-generated Python and project commands with your user permissions. The worker and kernel processes exist for lifecycle isolation and recovery; they are explicitly not a security sandbox. The guidance is to use trusted repositories, instructions, skills and extensions, and to run anything untrusted inside an external sandbox.

Read that alongside the feature list and the shape of the risk becomes clear. An agent that persists across terminal sessions, re-enters itself on a schedule, spawns children, messages other agents and edits its own supplemental prompts is a lot of surface area for a prompt injection to land on and stay. Not a reason to avoid it. A reason to give it a machine that isn't the one holding your SSH keys, which is the same argument for agent sandboxes generally.


How it differs from Claude Code and Codex

The obvious question, since nobody adopts a terminal agent in a vacuum.

Claude Code and Codex both give you a capable single session with a curated tool set, and both have grown their own answers to persistence. What Prime Agent does differently is make the programming model the interface. The agent doesn't pick from a tool menu; it writes Python that happens to read files, run commands and spawn children, and the interpreter it writes into stays alive. If you like scripting your way out of problems, that's a better fit. If you want a well-worn path with fewer ways to shoot yourself, it isn't.

The second difference is the subagent model. rlm(...) returns a child's result as a value, so a parent can fan out work and consume the answers programmatically rather than reading through a transcript. Parallelism becomes a language feature instead of a UI affordance.

The third is honesty about scope. Prime Agent describes itself as built for long-running work, "especially for evaluations in research," which is a narrower claim than general-purpose pair programming. Prime Intellect builds distributed training infrastructure; an autonomous coding agent that can be left running across hundreds of evaluation tasks is a tool they need for themselves. That focus shows up in what got built first: schedules, heartbeats, retained subagents, budget-bounded autonomy. Not autocomplete.

Set against the crowded field of coding assistants, the interesting bet here isn't code quality. It's whether an agent that keeps notes about your repo, and can be re-entered on a timer, beats a smarter agent that starts from zero every morning. Nobody has published a comparison that settles it.

Long-running agents need a machine that stays awake.
A daemon that survives a detached terminal still dies with the laptop lid. Running the agent somewhere hosted removes the question, and keeps model-generated code off the machine holding your keys.
Keep working this refactor overnight and report what broke…Try MoClaw →

FAQ

Is Prime Agent free and open source?

Yes, MIT licensed, with the full source in the repository. You still pay for inference: /login on first launch connects it to a subscription or API-key provider of your choosing, and the model bill is yours.

What does RLM stand for in Prime Agent?

Recursive Language Model. It's a programming model where context is held as variables (prompt-as-a-variable) and subagents are invoked as function calls (programmatic tool and sub-agent calling) inside a persistent IPython session. It has nothing to do with reinforcement learning, despite the initials inviting that reading.

What is a self-improving coding agent?

An agent that changes something durable about how it works based on what happened in previous sessions. The definition splits on what changes. Some projects mean model weights. Prime Agent means harness state: supplemental prompts, memories, skill descriptions and subagent specs, updated through /refine with evidence from the session, snapshotted for rollback, and never touching the immutable base prompt.

Can Prime Agent keep running after I close the terminal?

Yes. Sessions are daemon-backed, so agents, their IPython state, schedules and subagents survive a detached terminal. prime-agent agents shows what's alive and prime-agent attach reconnects. That said, "the terminal closed" and "the machine went to sleep" are different problems, and only the first one is solved here.

Is Prime Agent safe to run on my main machine?

The project's own answer is a warning block: it executes model-generated Python with your user permissions, and the worker and kernel processes are not a security sandbox. Use trusted inputs, work in a disposable clone or clean worktree, and put anything untrusted in an external sandbox.

Continue Reading

M
MoClaw Editorial MoClaw editorial team

The MoClaw editorial team writes about workflow automation, AI agents, and the tools we build. Default byline for industry overviews, listicles, and collaborative pieces.

Turn insights into action.

MoClaw automates the recurring work your analysis points to. No engineering required.

recursive language model prime intellect prime agent self improving coding agent autonomous coding agent long running ai agents continual harness

References: PrimeIntellect-ai/prime-agent on GitHub · Prime Agent v0.7.1 release · Recursive Language Model (Prime Intellect blog) · Continual Harness: Online Adaptation for Self-Improving Foundation Agents (arXiv 2605.09998) · pi (earendil-works) · PrimeIntellect-ai/verifiers · PRIME-RL · Prime Intellect