Prime Agent
An open-source self-improving RLM (Recursive Language Model) agent for coding workflows and long-running autonomous tasks, built by Prime Intellect.
At a Glance
About Prime Agent
Prime Agent is an open-source coding and research agent developed by Prime Intellect, released under the MIT License. It is designed for general and long-running autonomous work, combining a persistent Python control environment with durable harness state so that useful working context and reusable operating patterns can outlive a single chat window. The project reached v0.7.0 as of August 2026 and has accumulated nearly 2,000 GitHub stars.
What It Is
Prime Agent is a CLI-based autonomous coding agent built around two core abstractions. The first is the Recursive Language Model (RLM), which treats context as variables (prompt-as-a-variable) and tools like recursive subagents as function calls inside a persistent REPL. The second is the Continual Harness, which 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. Together, these abstractions allow Prime Agent to handle tasks that span multiple turns, terminal sessions, and parallel workstreams.
Architecture and Programming Model
Prime Agent's architecture is built around a daemon, worker, kernel, and persistence boundary model:
- Persistent IPython REPL is the built-in model tool; file operations, shell commands, tool use, subagents, and context management all happen through code.
rlm(...)spawns real child agents for parallel or background work and returns their results programmatically.- Daemon-backed continuity keeps active sessions, IPython state, schedules, and subagents running when the terminal disconnects; sessions can be reattached later.
- Skills are importable Python packages — the built-in skill creator can turn recurring workflows into project or personal skills.
- Running agents can communicate directly, exchanging messages and orchestrating one another without routing through the user.
Self-Improvement via the Continual Harness
A distinctive feature is the /refine command, which reviews the current trajectory and can apply small, evidence-backed updates to supplemental harness state — including supplemental prompts, memories, reusable skill descriptions, or subagent specifications. Refinement history is recorded and snapshots support rollback. The immutable base system prompt is never rewritten. This design is grounded in the Continual Harness paper (arXiv:2605.09998).
Long-Running and Autonomous Capabilities
Prime Agent is explicitly built for long-running evaluations and research workflows:
- Heartbeats and schedules (
/heartbeat,rlm_heartbeat,prime-agent schedule) can re-enter a session periodically or at a specific time. - Persistent goals (
/goal) keep an objective and its progress active across turns until completed, paused, or cleared. - Bounded autonomous mode (
/autonomous) continues within configured turn, token, and time budgets and can run user-defined quality gates. - Automatic compaction and retained subagents preserve progress across turns and terminal sessions.
Setup Path
Prime Agent installs on macOS or Linux via a single curl command that downloads a versioned release, verifies its SHA-256 checksum, and installs the prime-agent CLI. On first launch, /login selects a subscription or API-key provider. The agent works in the current directory and can run commands and modify files there. The README explicitly warns that Prime Agent executes model-generated Python and project commands with user permissions and is not a security sandbox — untrusted code should be run in an external sandbox or restricted environment.
Update: v0.7.0
The latest release is v0.7.0, published on August 5, 2026. The repository was created in May 2026 and has been actively developed, with the last push recorded on August 6, 2026. The project is written primarily in TypeScript and builds on the pi TUI library. Related Prime Intellect open-source projects include verifiers, prime-rl, and pi-mono.
Community Discussions
Be the first to start a conversation about Prime Agent
Share your experience with Prime Agent, ask questions, or help others learn from your insights.
Pricing
Open Source
Fully open-source under the MIT License, free to use, modify, and distribute.
- Full CLI agent
- Persistent IPython REPL
- Subagent spawning
- Continual Harness with /refine
- Daemon-backed sessions
Capabilities
Key Features
- Recursive Language Model (RLM) programming model
- Persistent IPython REPL as built-in model tool
- Subagent spawning via rlm(...) for parallel work
- Continual Harness with /refine for self-improvement
- Durable harness state with rollback snapshots
- Daemon-backed session continuity across terminal disconnects
- Session reattach and resume
- Heartbeats and schedules for periodic re-entry
- Persistent goals across turns
- Bounded autonomous mode with turn/token/time budgets
- Direct agent-to-agent communication
- Importable Python skill packages
- Built-in skill creator for reusable workflows
- Automatic context compaction
- JSON mode and RPC mode for headless automation
- SHA-256 verified installer
- CLI reference with agents, attach, resume, status, doctor, update, shutdown commands
