Prime Agent is an open source terminal coding agent from Prime Intellect that gives the model a single tool, a persistent IPython kernel, instead of the usual menu of file and shell tools. It went to the top of GitHub's daily trending page this week with roughly 2,290 stars in a day and about 7,000 total, and a first working install takes under five minutes: one install script, then /login.
- Install is one curl-to-shell command on macOS and Linux; the installer verifies a SHA-256 checksum and can prepare the IPython runtime for you.
- Windows works, but only through a bash shell: Git for Windows is enough, and Prime Agent finds it automatically.
- Authentication is either a subscription login (Claude Pro/Max, ChatGPT Plus/Pro via Codex, GitHub Copilot) or any of roughly two dozen API-key providers.
- Sessions are daemon-backed, so closing the terminal detaches the client rather than killing the work, and
prime-agent attachpicks it back up.
What is Prime Agent and why is it trending?
Prime Intellect is better known for distributed training work, so a coding agent is a sideways move for them. The repository went public on 8 May 2026 and sat quiet for months before this week's spike, which is the usual shape when a project gets picked up by a large account rather than growing steadily.
RelatedReasonix Setup: A Free Terminal AI Coding Agent
The technical pitch is the part worth taking seriously. Prime Agent exposes exactly one built-in tool to the model, called ipython, backed by a long-lived Python kernel. Reading files, editing them, running npm run check, parsing output, calling a skill and spawning a child agent all happen as code inside that kernel. Prime Intellect calls this a Recursive Language Model: context becomes variables, and tools become function calls.
The practical consequence is where working state lives. In a conventional agent, every tool result is a message, so a long session either fills the window or gets compacted and loses detail. Here a parsed test report can sit in a Python variable across turns and survive compaction, because the model only pulls back the slice it needs. The second piece is rlm(...), which spawns real child agents from inside the kernel. The call returns immediately with a handle rather than the child's answer; children report back through explicit messages or by writing files.
Layered on top is what the project calls a Continual Harness: a /refine command that reviews the current session and writes small, evidence-backed updates into supplemental prompts, memories and skill descriptions. It never touches the immutable base system prompt, and refinements are snapshotted so you can roll them back. That is the "self-improving" claim, and it is a narrower claim than the phrase usually implies.
How do you install Prime Agent on macOS or Linux?
One command. The installer pulls a versioned release, checks its SHA-256, installs the prime-agent binary and offers to prepare the IPython runtime the agent needs.
# latest stable release
curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh
The current stable tag is v0.7.1, published 7 August 2026, with the main package weighing 8.9 MB. If you want what is on main instead, the same script takes a channel argument:
# beta channel, built from main
curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh -s -- beta
Then start it inside the project you want it to work on. Prime Agent operates in the current working directory and can modify files there, so start in a clean git worktree or a disposable clone the first time:
cd /path/to/project
prime-agent
Prefer running from source? That path needs Node.js 22.8.0 or newer. The prime-agent.sh runner preserves the directory you invoked it from, so you can keep one checkout and call it from anywhere:
git clone https://github.com/PrimeIntellect-ai/prime-agent
cd prime-agent
npm ci
./prime-agent.sh
How do you run it on Windows?
Prime Agent needs a bash shell on Windows and looks for one in a fixed order: a custom path in ~/.prime/agent/settings.json, then Git Bash at C:\Program Files\Git\bin\bash.exe, then any bash.exe on PATH, which covers Cygwin, MSYS2 and WSL. Installing Git for Windows is enough for most people and requires no further configuration.
If your shell lives somewhere unusual, point at it explicitly in the settings file:
# ~/.prime/agent/settings.json
{
"shellPath": "C:\\cygwin64\\bin\\bash.exe"
}
How do you connect a model?
Two routes. The first is a subscription login: start Prime Agent and run /login, then pick Claude Pro/Max, ChatGPT Plus/Pro through Codex, or GitHub Copilot. Tokens land in ~/.prime/agent/auth.json and refresh themselves. One thing the docs are refreshingly blunt about: third-party harness usage on a Claude Pro or Max account draws from extra usage and is billed per token, not against your plan limits. Budget accordingly.
The second route is an API key. Set the environment variable before launching, or store it through /login:
export ANTHROPIC_API_KEY=sk-ant-...
prime-agent
The provider table is long: Anthropic, OpenAI, Google Gemini, DeepSeek, Mistral, Groq, Cerebras, xAI, OpenRouter, Fireworks, Hugging Face, both Cloudflare gateways, Vercel AI Gateway, MiniMax, Kimi, Xiaomi MiMo and Prime Intellect's own inference endpoint. The auth file is written with 0600 permissions and takes priority over environment variables. Keys can also be a shell command prefixed with !, so a 1Password or Keychain lookup works instead of a plaintext secret.
Inside a session, /model or Ctrl+L switches models and /effort sets the reasoning level. Project instructions go in an AGENTS.md file, which Prime Agent reads from the current directory, parent directories, and ~/.prime/agent/AGENTS.md for global rules. It also reads CLAUDE.md, so an existing repo probably already has one.
How do the background sessions work?
This is the feature that distinguishes it from most terminal agents. Sessions run in resident worker processes owned by a local supervisor, not by your terminal. Closing the TUI detaches the client; the worker keeps the session, the IPython kernel, any schedules and any child agents alive.
RelatedKaneo Setup: Self-Host a Free Jira Alternative in 10 Minutes
prime-agent agents # browse running, idle and saved sessions
prime-agent attach <agent> # reattach to a running session
prime-agent rename <agent> <name> # give it a stable readable name
prime-agent stop <agent> # stop one agent
prime-agent status # inspect background service state
prime-agent doctor --fix # diagnose or repair service state
prime-agent shutdown --force # stop every agent and background service
For unattended work there is a bounded autonomous mode, disabled by default, with real limits rather than a loop-until-done switch. Defaults are 3 continuations, 12 turns, 80,000 tokens and 30 minutes, and you can attach shell commands as quality gates that must pass before a run is allowed to finish:
prime-agent -p \
--autonomous \
--autonomous-gate "npm run check" \
--autonomous-max-turns 12 \
--autonomous-max-tokens 80000 \
--autonomous-timeout-ms 1800000 \
"Fix the failing check and report the verified result."
Sessions are saved automatically under ~/.prime/agent/sessions/. prime-agent -c continues the most recent one, and prime-agent -p "..." runs a one-shot prompt for scripting.
| Prime Agent | Claude Code | Codex CLI | |
|---|---|---|---|
| License | MIT, open source | Proprietary | Open source |
| Model tool surface | One, ipython | Many built-in tools | Many built-in tools |
| Provider choice | ~24 providers plus subscriptions | Anthropic models | OpenAI models |
| Survives terminal close | Yes, daemon workers | No by default | No by default |
| Extra runtime needed | Python with ipykernel | None | None |
What are the gotchas before you rely on it?
It is not a sandbox. The README says so directly: Prime Agent executes model-generated Python and project commands with your user permissions, and the worker and kernel processes exist for lifecycle isolation, not security. Untrusted repositories, skills and extensions belong in a container or VM, not in your home directory.
Python is a hard dependency. The kernel runtime bootstraps itself into ~/.prime/agent/kernel-venv on first use. If you already maintain a Python environment with ipykernel, point PRIME_AGENT_KERNEL_PYTHON at it and skip the second copy.
Background workers keep running. That is the point, but it also means an abandoned session can quietly hold a kernel and burn tokens on a heartbeat or schedule. Get in the habit of checking prime-agent agents and using prime-agent shutdown at the end of a work session.
A passed gate proves only what the gate checks. The docs are careful here and you should be too: hitting an autonomous limit does not mean the task succeeded, and a green npm run check does not mean the change was right.
It is young. Three months old, at v0.7.1, with a pre-1.0 version number that is doing honest work. The npm workspace names in the source tree are explicitly not the public install path, so ignore anything that looks installable there.
- Whether the RLM model spreads. One tool plus a persistent kernel is a genuinely different bet from tool-per-capability. If it holds up on long tasks, expect other agents to copy it.
- Refinement quality.
/refinewriting its own supplemental prompts is the interesting and the risky part. Snapshots and rollback exist; whether the edits are actually good is an open question. - A 1.0 and a stability promise. At v0.7.1 the CLI surface can still move under you. Scripts built on JSON or RPC mode should expect churn.
- Sandboxing. Right now the answer to untrusted code is "use something else." A first-party sandbox story would widen who can run this safely.
Our take
The single-tool design is the reason to try this, not the self-improvement branding. Anyone who has watched a coding agent burn a context window re-reading the same test output will recognize the problem it targets, and keeping parsed state in a live Python kernel is a cleaner answer than yet another compaction heuristic. The daemon-backed sessions are the second real feature: agent work that outlives the terminal is genuinely useful and surprisingly rare.
The costs are equally clear. You are adding a Python runtime and a background supervisor to your machine for a three-month-old tool that runs model-generated code with your permissions and explicitly does not sandbox it. That is a fine trade in a throwaway container or a scratch clone, and a poor one on a laptop holding production credentials. Install it, point it at a repository you would not mind restoring from git, and judge it on a long task rather than a quick one, because long tasks are the only place its architecture actually pays.
- OfficialPrimeIntellect-ai/prime-agent on GitHub , MIT licensed, README and install instructions
- ReleasesLatest Prime Agent release , v0.7.1, published 7 August 2026
- DocsPrime Agent quickstart and CLI reference , install, auth, sessions and autonomous limits
- ResearchRecursive Language Models , Prime Intellect's write-up of the model behind the agent
- Dependencypi , the agent and TUI foundation Prime Agent is built on
Setup steps verified against the project's own README and documentation on 8 August 2026. Star counts from GitHub trending and the GitHub API on the same date.
