Prime Intellect released Prime Agent on August 5, 2026. The agent was developed for coding workflows and long-running autonomous tasks, and it is built on the Recursive Language Model (RLM) approach. SuperQode adds support for Prime Agent through the Agent Client Protocol (ACP), with a :prime command surface that covers models, recursion depth, goals, autonomous gates, and the agent's background services.
Prime Agent is the second RLM harness that SuperQode supports. The first, RLM Code, has been running as a SuperQode backend for some time, and we launched RLM Code, the first ever RLM based coding agent, in February 2026. This post covers what a Recursive Language Model is, what RLM Code already provided, what Prime Agent does differently, how the integration was built, and where it currently falls short.
Prime Agent retains ownership of its own credentials, model catalog, execution kernel, and recursion. SuperQode provides the connection, the command surface, and the policy context around it.
What a Recursive Language Model is
The conventional way to give a model a large input is to place that input in the prompt. The approach works until the input is a repository, a week of logs, or a transcript of several hundred thousand tokens. At that size the request pays for tokens the model largely ignores, and the attention available for the parts that matter is reduced. The Recursive Language Model approach, described in the 2025 paper, inverts that arrangement. The context is not placed in the prompt. It is held as a variable in a Python REPL. The model receives metadata about that variable, such as its length and a short preview, and then writes code to interrogate it: chunking it, filtering it, searching it, and summarizing selected parts. When a sub-question requires a language model, the code calls one recursively.
Four properties of the agent change as a result. Context becomes data that is queried rather than a budget that is spent. The model's primary action becomes writing code rather than selecting a tool from a list. Recursion becomes a natural operation, because a sub-question is simply another call. Output becomes unbounded, because results are held in variables rather than in the reply.
RLM can be used on large codebases, and we delivered the online talk at the AI Engineer World's Fair on RLM: Recursive Language Models for Large Codebases.
SuperQode and RLM Code
RLM Code began in February 2026, and shipped its first releases that same month, approximately six months before Prime Agent was released. It implements the paper's semantics directly: context as a REPL variable, metadata-only root observations, llm_query() for recursive calls, and FINAL() or FINAL_VAR() for termination.
SuperQode runs RLM Code as a first-class HarnessSpec backend:
runtime:
backend: rlm-code
config:
rlm_code:
profile: lidThree characteristics of RLM Code matter for the comparison that follows. The first is that RLM Code keeps context outside the model window deliberately, and three profiles control how strictly it does so. The reference profile uses a configured root observation with full history and no decomposition hint. The repo_evidence profile reduces the root observation to metadata, switches history to a structural representation, and enables the decomposition hint. The lid profile makes the root observation opaque and of constant shape, offloads root history into history_N variables as it grows, and keeps the decomposition hint enabled. Under lid the root model is prevented from accumulating context at all, and that profile implements the locally in-distribution pattern described in the RLM authors' harness generalization work.
RLM Code sandboxes execution properly. A policy layer selects between the monty, docker, apple_container, command, and local runtimes. The monty runtime is a Python interpreter written in Rust with no filesystem access, no network, no imports, and no eval or exec, with time and memory limits enforced by the virtual machine, and execution state that can be frozen to bytes and resumed. Within that runtime llm_query and FINAL are external functions, so the interpreter pauses and returns control to the host whenever the model reaches outside its own computation. The recursion boundary and the sandbox boundary are therefore the same line. RLM Code is built to be measured. Reward profiles score each action on a clamped scale. Trajectory similarity metrics, including normalized Levenshtein distance, trigram containment, trigram Jaccard, and length ratio, compare a harness against itself across task families and input lengths. RLM Code is an instrument, and the question it answers is whether a harness generalized.
Alongside RLM Code, SuperQode has always provided its own recursive tools, context_handle and spawn_harness, which keep large artifacts outside the prompt inside SuperQode's own agent loop.
What Prime Agent is
Prime Intellect released Prime Agent recently, roughly six months after RLM Code's first release. It is MIT licensed and production oriented. Prime Agent takes the same core idea and makes a different set of engineering decisions throughout. A persistent IPython kernel is the only tool exposed to the model. Files, shell commands, skills, and sub-agents are all reached by writing Python. The separate read, grep, and edit tools that most coding agents provide were removed.
Where RLM Code recurses by calling a model from inside code, Prime Agent spawns entire agents:
handle = await rlm.run("review the auth module for injection risks")That call returns as soon as the child is admitted. The child is a complete agent session in Prime Agent's background service, with its own model and session directory, and it reports back through agent messages after the spawning turn has ended. Running children can be listed and deleted while they work. Prime Agent also maintains a continual harness. Prompts, memory, skills, and sub-agent definitions are held in a structure that the agent creates, updates, and deletes during a session, with versioned entries and recorded refinement events. The agent rewrites its own operating instructions while it runs.
Prime Agent is a TypeScript monorepo that also distributes a Python package, prime-agent-runtime, which runs inside the IPython kernel rather than on the host.
How the two harnesses differ: RLM Code versus Prime Agent
The useful framing is not Prime Agent against RLM Code. RLM Code treats recursion as a bounded, scored, and sandboxed computation. Prime Agent treats recursion as live process orchestration with mutable state.
RLM Code runs in process as a Python package, while Prime Agent runs as a separate TypeScript process hosting an IPython kernel. RLM Code bounds recursion with configured depth, branch width, and children per step, and executes child runs synchronously in a thread pool. Prime Agent spawns live sub-agent sessions that are addressable and disposable while they run and that communicate through messages. RLM Code keeps context out of the model window entirely, while Prime Agent admits context normally and compacts it once a threshold is crossed. RLM Code sandboxes by default, and Prime Agent applies no sandbox by default. RLM Code never modifies itself during a run, leaving improvement to an outer loop, while Prime Agent edits its own harness state in session. RLM Code produces a trajectory that can be replayed and scored but does not stream, while Prime Agent streams live over ACP. One approach prevents context pressure and the other absorbs it. One is instrumented to report whether the harness generalized, and the other is instrumented to report what happened in a session. Both are legitimate, and neither replaces the other.
How the integration works
Prime Agent speaks the Agent Client Protocol natively, and SuperQode has implemented an ACP client for a long time. The integration is therefore small, and most of the work involved finding the points where the two models of the world disagree.
Connecting took one file
The SuperQode agent catalog is TOML, and the Prime Agent entry is a single file:
identity = "primeintellect.ai"
name = "Prime Agent"
short_name = "prime-agent"
protocol = "acp"
type = "coding"
tags = ["open-source", "coding", "acp", "rlm"]
run_command."*" = "prime-agent --mode acp"Prime Agent was driven with SuperQode's existing ACP client before any integration code was written, and it worked unmodified. Prime Agent reports loadSession: false at initialize, and SuperQode gates session resume on that exact capability, so it correctly falls back to a fresh session. Prime Agent fixes its working directory at process start, and SuperQode already launches ACP agents with the project root as their process directory, so the two values agree and no mismatch is ever reported.
Prime Agent also appears under :connect in the Subscriptions group, next to Codex, Cursor, Muse Code and Grok, because what its login buys is a model on a plan you already pay for. That row reaches the same ACP route, and reports the install and sign-in steps when Prime Agent is not ready yet.
Model selection could not use the protocol
This is where the first real disagreement appeared. The ACP method for choosing a model is session/set_model against an advertised availableModels list. A capability probe against the running agent returns nothing to select from:
available models : []
config options : []
available modes : []Prime Agent advertises none of it, because its model is fixed when the process starts. :prime model therefore cannot switch a live session. SuperQode instead pins the selection and applies it to the next launch as --provider and --model arguments, so choosing a model reconnects. The command surface states this rather than implying an in-place change.
The catalog itself is read from prime-agent model list, which carries a quirk worth recording: it prints its table to stderr rather than stdout. Prime Agent reserves stdout for protocol output and applies the same discipline to its CLI. The first parse written against that command found zero models until both streams were read.
The RLM controls are start-time settings
/goal, /autonomous, and /rlm-max-depth are commands inside a Prime Agent session. From outside the process they are not commands at all. Goals and autonomous mode are available as launch flags. Recursion depth has no flag whatsoever, and Prime Agent reads it from the RLM_MAX_DEPTH environment variable.
SuperQode pins all three and applies them at launch:
:prime depth 3
:prime goal "get the release green"
:prime autonomous "pytest -q"
:prime connectDepth required a small addition to the ACP client, a per-connection environment override that never touches SuperQode's own environment. It also had to become part of the ACP client cache key, because a setting that an agent reads only at startup would otherwise continue to be served from a process launched with the previous value.
Setting :prime depth 0 disables recursion outright. Prime Agent computes allowRecursion as depth < maxDepth, so at zero the sub-agent instructions are dropped from the system prompt entirely and the model is never told that it can spawn children.
Watching the recursion
Prime Agent's background service reports a runtime kind and an RLM depth for each session, so :prime agents renders the live recursion tree:
main running active
└─ reviewer running idle depth 1
└─ test-runner running idle depth 1
1 root, 2 RLM subagent(s)Using it
Prime Agent manages its own credentials. SuperQode does not implement Prime Intellect's authentication and does not copy a token. You may need to create a Prime Intellect account. :prime login hands the terminal over so Prime Agent's own sign-in can run, and SuperQode re-reads the credential store when Prime exits.
curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh
prime-agent
# then run /loginSubscription logins are available for ChatGPT Plus or Pro, Claude Pro or Max, and GitHub Copilot. API keys for Anthropic, OpenAI, Google, Groq, OpenRouter, and other providers are read from the environment or from Prime Agent's auth file.
Connect from the SuperQode terminal:
:prime local
:prime models qwen
# pick a row with the arrows or a click; selecting connectsThat example is deliberate. Prime Agent reads additional providers from ~/.prime/agent/models.json, so local Ollama, LM Studio, and vLLM endpoints work without an API key or network access:
{
"providers": {
"ollama": {
"baseUrl": "http://localhost:11434/v1",
"api": "openai-completions",
"apiKey": "ollama",
"compat": { "supportsDeveloperRole": false },
"models": [{ "id": "qwen3.5:9b" }]
}
}
}The apiKey value is required by the configuration format and ignored by Ollama, and setting compat.supportsDeveloperRole to false is required for servers that reject the developer role used by reasoning-capable models. Writing that file by hand is optional: :prime local scans for running local servers, registers every chat model it finds, skips embedding and reranking models, and leaves any provider it did not discover untouched. Local providers then appear in :prime models alongside subscription models. An RLM coding agent driven from SuperQode, running entirely on a local model at zero cost, was verified end to end during the integration, which disproved the earlier assumption that Prime Agent would have to be marked as incompatible with offline work.
We tested the cheaper route first with GitHub Copilot, because it was the easiest and least expensive way to get model access. One point to note when logging in with GitHub Copilot: the catalog lists Prime Agent's full Copilot model set, but an account only serves models that have been enabled for it. A model that is listed but not enabled fails with the message "The requested model is not supported". The model is enabled in VS Code under Copilot Chat, model selector, Enable.
The prime command surface
SuperQode exposes Prime Agent through a command family that matches the other vendor agents in the terminal.
:prime connect [model] connect Prime Agent over ACP
:prime models [search] pick a model from the catalog, optionally filtered
:prime model <provider/id> set a model directly, without the picker
:prime local register local model servers with Prime Agent
:prime depth [n] recursion depth for the next launch
:prime goal [text] seed a persistent goal
:prime autonomous [gate] autonomous mode and completion gates
:prime agents live sessions and the RLM subagent tree
:prime schedule scheduled and recurring prompts
:prime packages installed capability packages
:prime status binary, version, logins, local providers
:prime doctor background service health
:prime update run Prime Agent's own updater
:prime login hand the terminal to Prime Agent to sign inThe alias :prime-agent is accepted, and :connect acp prime-agent reaches the same route using Prime Agent's default model.
Watch the demo
Connecting Prime Agent from SuperQode, picking a model, and running a turn through its IPython kernel.
What does not work yet: RPC coming soon
Prime Agent's IPython kernel runs with the permissions of the user who launched it, and it sends no ACP permission requests, so SuperQode's approval prompts never appear on this route. A Prime Agent session is equivalent to running Python and shell commands directly. Untrusted repositories require external isolation, such as a container or a dedicated worktree. This is the sharpest contrast with RLM Code, which sandboxes by default. Prime Agent sends no token usage over ACP, so its sessions report no token or cost accounting in SuperQode. That data is available through the RPC transport, which SuperQode does not yet speak.
ACP mode hosts one session per process by design, because the underlying session is fixed at startup, so parallel work requires parallel processes. Session resume is unavailable because Prime Agent reports loadSession: false.
Prime Agent has no login subcommand, and neither its ACP nor its RPC mode exposes an authentication call. Its /login lives only in the interactive terminal, as a widget under modes/interactive. SuperQode therefore cannot drive that OAuth itself. :prime login suspends SuperQode and hands the terminal to Prime Agent instead, which keeps the user in one place but still requires signing in inside Prime and quitting it to return. Closing that gap needs a headless login on Prime Agent's side.
The remaining in-session commands, including /refine, /compact, and /heartbeat, are not reachable over ACP, and they fail quietly rather than loudly. Prime Agent advertises an empty command list at initialize and its ACP mode performs no command expansion, so there is no way to invoke them. Sending one as a prompt does not produce an error. The text reaches the model, and a capable model answers as though the command had run. This was observed during the integration with /context, which returned a plausible session summary composed by the model rather than the output of the command. That failure mode is documented because it resembles success.
The gap worth building: a Python host SDK
Prime Agent's official host SDK is createAgentSession() from its TypeScript package. The Python package it distributes, prime-agent-runtime, is a kernel-side client: it is imported by the model inside the IPython kernel and communicates with the TypeScript host over a Jupyter comm. It is not a host SDK, and no Python host client for Prime Agent currently exists. Prime Intellect forked Pi and built on top of it, which explains the language choice. RLM is Python research at its core, and the runtime it drives is a Python kernel, so hosting that kernel from TypeScript is an unusual fit. It is not clear why a Python host was not built.
Prime Agent deliberately exposes ACP, RPC, and JSON modes for embedding, and RPC mode carries the surface that matters for serious use. It includes refine for continual harness refinement with rollback, compact for context compaction with custom instructions, get_session_stats for the token and cost accounting that ACP does not send, observe for live observation of sub-agent sessions, and the heartbeat and schedule commands for long-running and recurring work. Every one of those is reachable from any language that can speak newline-delimited JSON over a pipe.
SuperQode has built a comparable component before. PiPy is a native Python harness implemented in the shape of pi, and the scope lesson from that work applies directly here. A pure-Python reimplementation of Prime Agent's RLM engine would be a long race against a moving TypeScript target with no clear win at the end. A typed asynchronous Python client that drives the released Prime Agent binary over RPC is a bounded piece of work with an immediate consumer:
async with PrimeSession(model="ollama/qwen3.5:9b") as session:
await session.prompt("port the auth module to the new API")
result = await session.refine(instructions="...")
stats = await session.get_session_stats()The engine remains Prime Intellect's. The Python interface becomes available to evaluation harnesses, notebooks, and research code, which are predominantly written in Python. If Prime Intellect later publishes an official Python SDK, a client that mirrors the existing RPC contract can be adapted or contributed rather than discarded.
RPC transport is the next milestone for this integration. It closes the token accounting gap and brings refine under SuperQode's evaluation and promotion gates. Prime Agent refines its harness but never evaluates the refinement. RLM Code provides the entire evaluation apparatus and performs no self-improvement. SuperQode owns the promotion gate. Prime Agent proposes, RLM Code measures, and SuperQode gates, which is a loop that no single project can build alone.
RLM is coming to coding agents: three modes in SuperQode
SuperQode now runs three RLM routes. RLM Code applies when a run must be contained and measured. Prime Agent applies when a run must keep going over a long horizon. The recursive tools apply when the work belongs inside SuperQode's own loop and must remain local and offline.
RLM Code is the instrument, Prime Agent is the engine, and the recursive tools are the local workbench. Keeping all three under one HarnessSpec, one policy layer, and one evidence model is the point of treating the harness as an engineering artifact rather than a product to be locked into.
Prime Agent support ships in the latest SuperQode release. Documentation is available for Prime Agent, RLM Routes Compared, and RLM Code Integration. If you need more information, check out SuperQode on GitHub, read the docs, or get in touch with any questions.

