# Prime Agent

> An open-source coding and research agent from Prime Intellect that runs a Recursive Language Model inside a persistent Python REPL and refines its own harness state

- Category: AI Coding / Autonomous Coding Agents
- Language: TypeScript
- Licence: MIT
- Repository: https://github.com/PrimeIntellect-ai/prime-agent
- Canonical page: https://ai-tldr.dev/tools/prime-agent/
- Updated: 2026-08-05

## In short

Prime Agent is an open-source coding and research agent from Prime Intellect, built for general and long-running work. It is organised around two ideas. It sits in the Autonomous Coding Agents category of the AI Coding tools and is open-source, written in TypeScript and licensed MIT. To get started: install.

## Overview

Prime Agent is an open-source coding and research agent from Prime Intellect, built for general and long-running work. It is organised around two ideas. The Recursive Language Model (RLM) treats context as variables — prompt-as-a-variable — and treats tools, including recursive subagents, as function calls inside a persistent Python REPL. The Continual Harness stores supplemental prompts, memories, skill descriptions and reusable subagent specifications as durable state that the agent can refine through small, evidence-backed updates, local to the session by default.

In practice that makes the REPL the agent's main interface: file operations, shell commands, tool use, subagent spawning and context management all happen through code rather than a fixed tool schema. `rlm(...)` spawns real child agents for parallel or background work and returns their results programmatically, skills are importable Python packages, and `/refine` reviews the current trajectory and applies small updates to supplemental harness state — never rewriting the immutable base system prompt, with recorded snapshots so a refinement can be rolled back.

The harness is designed to outlive a single terminal. Daemon-backed sessions keep running when the terminal disconnects and can be reattached later; agents can message one another directly and steer each other's work; and automatic compaction, persistent goals, heartbeats and schedules keep long tasks moving across turns. The README is explicit that this is not a security boundary: Prime Agent executes model-generated Python and project commands with your user permissions, and its worker and kernel processes improve lifecycle isolation and recovery rather than sandboxing — untrusted code or instructions belong in an external sandbox.

## What it does

- Recursive Language Model design: context as variables, tools and subagents as function calls in a persistent Python REPL
- Built-in subagents via rlm(...), which spawn real child agents for parallel or background work and return results programmatically
- Continual Harness plus /refine — durable supplemental prompts, memories and skill specs the agent updates with evidence, with snapshots for rollback
- Executable skills as importable Python packages, with a built-in skill creator for recurring workflows
- Daemon-backed sessions that survive terminal disconnects, plus heartbeats, schedules, persistent goals and automatic compaction
- Direct agent-to-agent messaging so running agents can discover and steer one another

## Getting started

Install the released binary on macOS or Linux, then start the agent in the directory you want it to work in. The installer verifies the release's SHA-256 checksum and can prepare the Python runtime the agent uses.

1. Install

   The install script downloads a versioned release and installs the prime-agent command.

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

2. Start it in a project

   Prime Agent works in the current directory and can run commands and modify files there. The README recommends a disposable clone, a clean worktree, or another checkpoint you can inspect and restore. On first launch, run /login to choose a subscription or API-key provider.

```bash
cd /path/to/project
prime-agent
```

3. Manage sessions

   Sessions are daemon-backed, so they keep running after you detach. These commands browse, reattach to and resume them.

```bash
prime-agent agents
prime-agent attach <agent>
prime-agent --resume [path|id]
```

4. Inspect and maintain the background services

   doctor inspects or repairs the background services; shutdown stops every agent, worker and service.

```bash
prime-agent status
prime-agent doctor [--fix]
prime-agent update [--force]
prime-agent shutdown [--force]
```

5. Let a long task keep itself moving

   /goal keeps an objective in front of the agent, /refine persists reviewable lessons into supplemental harness state, and prime-agent schedule re-enters a session at a set time.

```text
/goal
/refine
/heartbeat
```

## When to use it

- Run long-horizon coding or research work that has to survive terminal disconnects and context limits
- Fan a task out across parallel subagents from inside a Python REPL instead of a fixed tool schema
- Let recurring workflows harden into reusable, importable skills rather than repeated prompts
- Run agent evaluations and research experiments where trajectories and harness refinements need to be recorded and rolled back

## Version history

- 2026-08-05: Prime Intellect open-sourced Prime Agent, an MIT-licensed coding harness running a Recursive Language Model inside a persistent Python REPL. Paired with Opus 5 it reported 95.5% Best@1 on ARC-AGI-3, above the 95.4% human-expert baseline ARC reports.
