PrimeIntellect-ai/prime-agent
A self-improving RLM agent for coding workflows and long-running autonomous tasks.
Prime Agent – an open‑source self‑improving AI coding assistant
What it is
- Prime Agent is a command‑line tool that lets a large language model act as a coding and research agent.
- It builds on two ideas from the authors’ research:
- Recursive Language Model (RLM) – the model treats the prompt as a mutable set of variables and can call sub‑agents (other model instances) as if they were functions.
- Continual Harness – a durable store for supplemental prompts, memories, skill definitions and sub‑agent specs that can be refined over time.
Key capabilities
- Persistent Python REPL – the agent runs inside a long‑living Python interpreter, so code, file operations, shell commands, and tool calls are executed directly.
- Sub‑agents –
rlm.spawn(...)creates child agents that work in parallel or in the background and return results programmatically. - Skill system – reusable workflows can be packaged as Python packages; the built‑in skill creator turns a pattern into a “skill” that the agent can import later.
- Background daemon – sessions keep running after you detach the terminal; you can re‑attach with
prime-agent attach <id>. - Agent‑to‑agent messaging – running agents can discover each other and exchange messages without user mediation.
- Continual refinement – the
/refinecommand lets the harness store small, evidence‑backed updates (new prompts, memories, skill specs) while keeping the immutable base system prompt untouched. Snapshots enable rollback. - Autonomous mode –
/autonomouslets the agent keep working within configurable turn, token and time budgets, optionally gated by user‑defined quality checks. - Scheduling & heartbeats – built‑in commands (
/heartbeat,prime-agent schedule) let the agent re‑enter a session on a timer or at a specific time.
Typical workflow
- Install with the one‑line script (Linux/macOS) or PowerShell installer (Windows).
- Run
prime-agentinside a project directory. - Log in (
/login) to provide an API‑key or subscription for the underlying LLM. - Issue commands such as
rlm.spawn(...),/goal,/refine, or let the agent run autonomously. - When you disconnect, the daemon keeps the Python state, files, and sub‑agents alive; later you can
prime-agent attachto continue.
Safety notes
- The tool executes model‑generated Python with the same permissions as the user; it is not sandboxed. Users are advised to run it only on trusted codebases or inside an external sandbox.
Installation
curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh
# Windows
irm https://app.primeintellect.ai/prime-agent/install.ps1 | iex
Main commands
prime-agent agents– list running/idle/saved sessionsprime-agent attach <agent>– re‑attach to a live sessionprime-agent --resume [path|id]– resume a specific sessionprime-agent status– view daemon healthprime-agent doctor [--fix]– diagnose/repair servicesprime-agent update– pull the latest releaseprime-agent shutdown– stop all agents and background services
Where to learn more
- Blog post on the RLM concept: https://www.primeintellect.ai/blog/rlm
- The research paper describing the Continual Harness: https://arxiv.org/abs/2605.09998
- The accompanying arXiv pre‑print for Prime Agent itself: https://arxiv.org/abs/2608.23552
License & citation
- MIT License.
- Cite the work with the provided BibTeX entry if used in research.
Prime Agent is a genuine open‑source project aimed at enabling long‑running, self‑improving AI‑driven coding and research workflows.
Related
- Dispatch
- Project
- Project
- Project
- Project