A self-improving RLM agent for coding workflows and long-running autonomous tasks.
Rust
refresh Prime Agent README (#610)
Seth Karten784159caea08
diff --git a/README.md b/README.mdindex 78ce8961f7..5fe5181b12 100644--- a/README.md+++ b/README.md@@ -9,10 +9,11 @@</p><h3 align="center">-Prime Agent: RLM-native Coding and Research Harness+Prime Agent: A Self-Improving RLM Agent</h3><p align="center">+ <a href="packages/coding-agent/docs/index.md">Documentation</a> •<a href="https://github.com/PrimeIntellect-ai/verifiers">Verifiers</a> •<a href="https://github.com/PrimeIntellect-ai/prime-rl">PRIME-RL</a> •<a href="https://github.com/badlogic/pi-mono">pi-mono</a>@@ -27,68 +28,89 @@ Prime Agent: RLM-native Coding and Research Harness</a></p>-Prime Agent is a coding and research agent built for long-running tasks.+Prime Agent is an open-source coding and research agent for general and long-running work. It is designed around two core abstractions:-Most agents are optimized for short, single-threaded sessions. As tasks grow, logs and tool output lead to context rot, compaction drops useful details, and one model becomes the bottleneck. Their skills are simply markdown instructions, and sessions require a client to remain open.+- The **[Recursive Language Model (RLM)](https://www.primeintellect.ai/blog/rlm)** treats context as variables (*prompt-as-a-variable*) and tools like recursive subagents as function calls (*programmatic tool /sub-agent calling*) inside a persistent REPL.+- The **[Continual Harness](https://arxiv.org/abs/2605.09998)** stores supplemental prompts, memories, skill descriptions, and reusable subagent specifications as durable state that Prime Agent can refine through small, evidence-backed updates, local to the session by default.-Prime Agent combines a [Recursive Language Model (RLM)](https://www.primeintellect.ai/blog/rlm) runtime with durable background processes:+Prime Agent combines a persistent Python control environment with durable harness state, so useful working context and reusable operating patterns can outlive a single chat window.-- **Everything is programmatic:** persistent IPython is the only built-in model tool; file operations, shell commands, tool use, and context management happen through code.-- **Subagents are built in:** `rlm(...)` spawns real child agents from Python for parallel or background work and returns their results programmatically.+- **Everything is programmatic:** persistent IPython is the built-in model tool; file operations, shell commands, tool use, subagents, and context management happen through code.+- **Subagents are built in:** `rlm(...)` spawns real child agents for parallel or background work and returns their results programmatically.+- **The harness can improve:** `/refine` reviews the current trajectory and can apply small, evidence-backed updates to supplemental harness state. It never rewrites the immutable base system prompt, and recorded snapshots support rollback.- **Skills are executable:** skills are importable Python packages, and the built-in skill creator can turn recurring workflows into project or personal skills.- **Sessions run in the background:** daemon-backed agents keep running when the terminal disconnects and can be reattached later.- **Agents communicate directly:** running agents can exchange messages and orchestrate one another without routing everything through the user.-- **Long tasks keep moving:** automatic compaction, persistent goals, heartbeats, cron schedules, autonomous mode, and retained subagents preserve progress across turns and terminal sessions.+- **Long tasks keep moving:** automatic compaction, persistent goals, heartbeats, schedules, autonomous mode, and retained subagents preserve progress across turns and terminal sessions.## Getting Started-Install the latest stable release:+Install the latest stable release on macOS or Linux:```bash-curl -fsSL https://pub-728493de92a943e2a9b2d17b4719f318.r2.dev/install.sh | sh+curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh```-Install the latest beta built from `main`:+The installer downloads a versioned release, verifies its SHA-256 checksum, installs the `prime-agent` command, and can prepare the IPython runtime used by the agent.++To try the latest beta built from `main`:```bash-curl -fsSL https://pub-728493de92a943e2a9b2d17b4719f318.r2.dev/install-beta.sh | sh+curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh -s -- beta```-Stable advances when a version bump lands on `main`; beta advances on every commit to `main`.+Use the stable channel for normal work. Beta advances with successful builds from `main`.-Then start Prime Agent:+Start Prime Agent from the repository or directory you want it to work in:```bash+cd /path/to/projectprime-agent```-Public releases are currently installed from versioned release artifacts through these installer scripts. The repository still contains inherited npm workspace identifiers for source compatibility; they are not the user-facing Prime Agent install path.+On first launch, run `/login` to choose a subscription or API-key provider. Prime Agent works in the current directory and can run commands and modify files there. Use a disposable clone, clean worktree, or another checkpoint you can inspect and restore.++> [!WARNING]+> Prime Agent executes model-generated Python and project commands with your user permissions. Its worker and kernel processes improve lifecycle isolation and recovery; they are **not** a security sandbox. Review changes and use trusted repositories, instructions, skills, and extensions only. Run untrusted code or instructions in an external sandbox or restricted environment.-Other useful commands:+Useful commands:```bash-prime-agent agents # Search running, idle, and inactive sessions-prime-agent --resume <path|id> # Resume a specific session+prime-agent agents # Browse running, idle, and saved sessions+prime-agent attach <agent> # Reattach to a running session+prime-agent --resume <path|id> # Resume a saved session+prime-agent status # Inspect background service stateprime-agent doctor [--fix] # Inspect or repair background servicesprime-agent update [--force] # Update Prime Agentprime-agent shutdown [--force] # Stop every agent, worker, and background service```## Built for Long-Running Work+Prime Agent is built for long-running work, especially for evaluations in research. These features are available in the TUI, and when run autonomously.+- **Continual Harness:** `/refine` can persist focused, reviewable lessons as supplemental prompts, memories, reusable skill descriptions, or subagent specifications, with recorded refinement history. It does not replace packaging and reviewing new executable skills.- **Direct agent-to-agent communication:** running agents and retained subagents can discover one another, exchange messages, steer active work, or queue follow-ups.- **Daemon-backed continuity:** active sessions, IPython state, schedules, and subagents keep running when the terminal detaches and can be reattached later.- **Heartbeats and schedules:** `/heartbeat`, `rlm_heartbeat`, and `prime-agent schedule` can re-enter a session periodically or at a specific time.- **Persistent goals:** `/goal` keeps an objective and its progress active across turns until it is completed, paused, or cleared.-- **Bounded autonomous mode:** `/autonomous` continues working until its quality gates pass or a configured turn, token, or time limit is reached.+- **Bounded autonomous mode:** `/autonomous` continues within configured turn, token, and time budgets and can run user-defined quality gates. A passed gate checks only what that gate verifies; reaching a limit does not imply task success.## Documentation-- [Documentation index](packages/coding-agent/docs/index.md)-- [Architecture overview](packages/coding-agent/docs/architecture.md)-- [Quickstart](packages/coding-agent/docs/quickstart.md)-- [RLM programming model](packages/coding-agent/docs/rlm.md)-- [Long-running and background agents](packages/coding-agent/docs/long-running-agents.md)-- [Usage and CLI reference](packages/coding-agent/docs/usage.md)-- [Provider setup](packages/coding-agent/docs/providers.md)-- [Development](packages/coding-agent/docs/development.md)+- [Quickstart](packages/coding-agent/docs/quickstart.md) — install, authenticate, and run a first session+- [Usage and CLI reference](packages/coding-agent/docs/usage.md) — commands, sessions, autonomous limits, and output modes+- [Long-running and background agents](packages/coding-agent/docs/long-running-agents.md) — detach and reattach, goals, heartbeats, and schedules+- [RLM programming model](packages/coding-agent/docs/rlm.md) — persistent IPython, subagents, skills, and the trust model+- [JSON mode](packages/coding-agent/docs/json.md) and [RPC mode](packages/coding-agent/docs/rpc.md) — headless automation and integrations+- [Skills](packages/coding-agent/docs/skills.md) — install and create reusable capabilities+- [Provider setup](packages/coding-agent/docs/providers.md) — subscription and API-key providers+- [Architecture overview](packages/coding-agent/docs/architecture.md) — daemon, worker, kernel, and persistence boundaries+- [Development](packages/coding-agent/docs/development.md) — build and run from source++## Acknowledgements++Our agent and TUI is built on top of [`pi`](https://github.com/earendil-works/pi). We thank the authors of `pi` for their valuable work.++## License++Prime Agent is fully open source and released under the [MIT License](LICENSE).\ No newline at end of filediff --git a/packages/coding-agent/README.md b/packages/coding-agent/README.mdindex de82a67d62..a6d811b534 100644--- a/packages/coding-agent/README.md+++ b/packages/coding-agent/README.md@@ -43,13 +43,13 @@ Prime Agent began as a hard fork of [pi-mono](https://github.com/badlogic/pi-mon## Quick Start```bash-curl -fsSL https://pub-728493de92a943e2a9b2d17b4719f318.r2.dev/install.sh | sh+curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh```To install the beta built from the latest commit on `main`:```bash-curl -fsSL https://pub-728493de92a943e2a9b2d17b4719f318.r2.dev/install-beta.sh | sh+curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh -s -- beta```Authenticate with an API key:diff --git a/packages/coding-agent/docs/index.md b/packages/coding-agent/docs/index.mdindex 26ca856422..b7c48290c2 100644--- a/packages/coding-agent/docs/index.md+++ b/packages/coding-agent/docs/index.md@@ -7,7 +7,7 @@ Prime Agent is an RLM-native coding and research harness built around a persisteInstall the latest stable release on Linux or macOS:```bash-curl -fsSL https://pub-728493de92a943e2a9b2d17b4719f318.r2.dev/install.sh | sh+curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh```Then run it in a project directory:diff --git a/packages/coding-agent/docs/quickstart.md b/packages/coding-agent/docs/quickstart.mdindex 2965a019cf..bad6f04ade 100644--- a/packages/coding-agent/docs/quickstart.md+++ b/packages/coding-agent/docs/quickstart.md@@ -7,16 +7,16 @@ This page gets you from install to a useful first Prime Agent session.Install the latest stable release on Linux or macOS:```bash-curl -fsSL https://pub-728493de92a943e2a9b2d17b4719f318.r2.dev/install.sh | sh+curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh```To try the latest beta built from `main`:```bash-curl -fsSL https://pub-728493de92a943e2a9b2d17b4719f318.r2.dev/install-beta.sh | sh+curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh -s -- beta```-Both installers fetch versioned Prime Agent release artifacts and install the `prime-agent` command. The inherited npm workspace identifiers in the source tree are not the public install path.+Both commands fetch versioned Prime Agent release artifacts and install the `prime-agent` command. The inherited npm workspace identifiers in the source tree are not the public install path.Then start Prime Agent in the project directory you want it to work on: