PrimeIntellect-ai/prime-agentPublic

A self-improving RLM agent for coding workflows and long-running autonomous tasks.

AI summary: An open-source, self-improving RLM agent designed to autonomously execute general coding and long-running research tasks.

Stars
7.3K
Forks
604
Watchers
25
Open issues
98
Open PRs
166
Contributors
~218
Commits
4.5K
Branches
76

TypeScriptMITCreated May 8, 2026Last push todayLatest release v0.7.1

Star history

since Aug 8, 2026

Star history is still being collected for this repository.

Signals and awards

derived from tracked data
  • Breakout launch

    7,296 stars in 92 days

  • Actively maintained

    Pushed within 48 hours

  • Community-driven

    ~218 contributors

  • Permissive license

    MIT

  • Continuous integration

    Automated checks passing

What prime-agent does

Prime Agent is an advanced autonomous system built for long-running workflows across coding and research domains. Built on the PRIME-RL architecture, it leverages reinforcement learning techniques to iteratively improve its own execution strategies over time. It continuously processes complex inputs, coordinates with verifiers to validate its own actions, and adapts to non-deterministic environments without human intervention. The system integrates tightly with internal packages like pi-mono and coding-agent to seamlessly execute, analyze, and refine code logic within self-contained agentic loops.

AI researchers, software engineers, and automation specialists seeking robust, self-improving autonomous agents for complex, long-running tasks. It requires familiarity with agentic frameworks and reinforcement learning concepts.

  • Autonomous Execution: Operates independently over extended periods to accomplish general coding and deep research tasks.
  • Self-Improving Mechanisms: Employs reinforcement learning models (PRIME-RL) to adjust strategies based on verifiable outcomes.
  • Integrated Verifier Ecosystem: Validates output correctness directly against external ground truth environments and testing frameworks.
  • Modular Workspace Management: Integrates with pi-mono and specialized packages to safely isolate and manage agent workstreams.
  • Continuous Adaptation Pipeline: Dynamically incorporates feedback loops to recover from execution failures and optimize its action space.

Where teams use it

Long-Running Research

Researchers can deploy the agent to systematically explore and analyze vast datasets without manual oversight.

Autonomous Refactoring

Engineering teams can task the agent with large-scale codebase migrations, relying on verifiers to ensure stability.

Self-Healing Workflows

Operations can utilize the agent to continuously monitor, debug, and patch persistent runtime errors in staging environments.

Iterative Code Generation

Developers can outline complex architectural changes and let the agent iteratively generate and test the implementations.

Getting started: npm install

README

main branch

Prime Intellect

Prime Agent: A Self-Improving RLM Agent

DocumentationVerifiersPRIME-RLpi-mono

CI Build Binaries

Prime Agent is an open-source coding and research agent for general and long-running work. It is designed around two core abstractions:

  • The Recursive Language Model (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 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 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 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, schedules, autonomous mode, and retained subagents preserve progress across turns and terminal sessions.

Getting Started

Install the latest stable release on macOS or Linux:

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

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.

Start Prime Agent from the repository or directory you want it to work in:

cd /path/to/project
prime-agent

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.

Useful commands:

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 state
prime-agent doctor [--fix]           # Inspect or repair background services
prime-agent update [--force]         # Update Prime Agent
prime-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, and steer active work.
  • 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 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

Acknowledgements

Our agent and TUI is built on top of pi. We thank the authors of pi for their valuable work.

License

Prime Agent is fully open source and released under the MIT License.

View on GitHub

Recent activity

commits and pull requests

Releases and announcements

41 total
  1. v0.7.1v0.7.1Aug 7, 2026413 downloads

    - Fixed the bundled `websearch` skill description and missing-key guidance omitting the `/login` → **MCP Connections** step required to configure Serper. - Fixed `retry_worker` cancelling its own recovery when a stopped session worker left a saved stop marker behind, leaving the session stuck at "Session worker is not connected".

  2. Beta (v0.7.1-beta.465.1.a18809e)betaJul 17, 2026pre-release1 downloads

    Automated beta build from `main` (`a18809e00ea30638584d87b3afea7285a9d7296c`).

  3. v0.7.0v0.7.0Aug 5, 20262.6K downloads

    ### Breaking Changes - Changed agent messages to always use steering delivery and removed delivery-mode options from the Python, CLI, RPC, and connection APIs. Code passing `mode` to `agent_message.send`, or a delivery mode over the CLI/RPC, must drop it. ### Changed - Changed self-updates to report the previous and new Prime Agent versions. ### Fixed - Fixed the subagent summary showing retained children as idle while they run follow-up work.

  4. v0.6.1v0.6.1Aug 5, 20269 downloads

    - Added reverse tab navigation to the `/login` configuration menu and moved the model scope shortcut to `Alt+S`. - Fixed daemon startup crashes hiding their exit status and daemon log until the startup timeout. - Documented the global `idleEvictionMinutes` daemon setting, including its default, valid values, and eviction/passivation behavior ([#621](https://github.com/PrimeIntellect-ai/prime-agent/issues/621)). - Fixed top-level `--help` omitting `acp` from the supported `--mode` values ([#620](https://github.com/PrimeIntellect-ai/prime-agent/issues/620)). - Fixed `stop` and `rename` becoming prompts when `--daemon-socket` precedes the command ([#622](https://github.com/PrimeIntellect-ai/prime-agent/issues/622)). - Fixed subagent terminal notices arriving as anonymous follow-up prompts instead of attributed agent messages, so a parent can now tell which child reported completion, failure, or cancellation, and a busy parent is steered at the next turn boundary rather than waiting to go idle ([#617](https://github.com/PrimeIntellect-ai/prime-agent/issues/617)). - Fixed ACP mode reporting a failed turn as a clean `end_turn`. A provider error, expired auth, or unusable model left `ses

  5. v0.6.0v0.6.0Aug 5, 20267 downloads

    ### Breaking Changes - Changed `rlm(...)` to return at task admission instead of waiting for the child to finish. It now yields a spawn handle (`rlm_child_id`, `name`, `session_dir`, `model`); `RLMResult` and its final answer, usage, and model-fallback warning are gone. A child reports back with `agent_message.send(..., receiver_role="parent")`, which arrives as an ordinary prompt and starts a parent turn. Code that read `result.answer`, or treated `asyncio.gather(...)` over `rlm(...)` as fan-in, must be updated. - Changed `agent_message.send` to role-addressed delivery: pass `receiver_role` (`"parent"`, `"sibling"`, `"child"`) plus `receiver_name` for siblings and children. The old positional `send(target, message)` form no longer works, and the separate `roster()` call is now `agent_message.list_agents()`. - Narrowed agent reach to the nuclear family: an agent may message or observe only its parent, siblings, and direct children. Top-level sessions are siblings of one another, so agent-to-agent between them still works; grandchildren and cousins must be reached by relaying through the intermediate child. Users are unaffected and still see every session. - Requesting an unavaila

Code frequency

additions and deletions
+57.4K-57.4KWeek of 2025-08-10: +9,027 linesWeek of 2025-08-10: -6,140 linesWeek of 2025-08-17: +8,034 linesWeek of 2025-08-17: -22 linesWeek of 2025-08-24: +25,144 linesWeek of 2025-08-24: -17,603 linesWeek of 2025-08-31: +12,151 linesWeek of 2025-08-31: -16,685 linesWeek of 2025-09-07: +2,431 linesWeek of 2025-09-07: -966 linesWeek of 2025-09-14: +2,933 linesWeek of 2025-09-14: -1,859 linesWeek of 2025-09-21: +0 linesWeek of 2025-09-21: -0 linesWeek of 2025-09-28: +21,753 linesWeek of 2025-09-28: -6,797 linesWeek of 2025-10-05: +21,970 linesWeek of 2025-10-05: -21,524 linesWeek of 2025-10-12: +12,449 linesWeek of 2025-10-12: -6,039 linesWeek of 2025-10-19: +876 linesWeek of 2025-10-19: -933 linesWeek of 2025-10-26: +2,399 linesWeek of 2025-10-26: -673 linesWeek of 2025-11-02: +0 linesWeek of 2025-11-02: -0 linesWeek of 2025-11-09: +22,454 linesWeek of 2025-11-09: -25,739 linesWeek of 2025-11-16: +14,722 linesWeek of 2025-11-16: -9,874 linesWeek of 2025-11-23: +13,706 linesWeek of 2025-11-23: -4,921 linesWeek of 2025-11-30: +13,956 linesWeek of 2025-11-30: -7,053 linesWeek of 2025-12-07: +56,289 linesWeek of 2025-12-07: -41,862 linesWeek of 2025-12-14: +32,979 linesWeek of 2025-12-14: -20,985 linesWeek of 2025-12-21: +33,521 linesWeek of 2025-12-21: -20,679 linesWeek of 2025-12-28: +46,952 linesWeek of 2025-12-28: -34,751 linesWeek of 2026-01-04: +35,013 linesWeek of 2026-01-04: -22,065 linesWeek of 2026-01-11: +40,467 linesWeek of 2026-01-11: -22,273 linesWeek of 2026-01-18: +21,598 linesWeek of 2026-01-18: -12,292 linesWeek of 2026-01-25: +19,158 linesWeek of 2026-01-25: -10,583 linesWeek of 2026-02-01: +16,325 linesWeek of 2026-02-01: -5,825 linesWeek of 2026-02-08: +3,101 linesWeek of 2026-02-08: -1,570 linesWeek of 2026-02-15: +2,452 linesWeek of 2026-02-15: -1,278 linesWeek of 2026-02-22: +4,453 linesWeek of 2026-02-22: -3,095 linesWeek of 2026-03-01: +8,957 linesWeek of 2026-03-01: -2,508 linesWeek of 2026-03-08: +7,746 linesWeek of 2026-03-08: -2,720 linesWeek of 2026-03-15: +9,645 linesWeek of 2026-03-15: -3,805 linesWeek of 2026-03-22: +9,343 linesWeek of 2026-03-22: -4,113 linesWeek of 2026-03-29: +11,958 linesWeek of 2026-03-29: -5,168 linesWeek of 2026-04-05: +2,043 linesWeek of 2026-04-05: -1,069 linesWeek of 2026-04-12: +11,314 linesWeek of 2026-04-12: -5,606 linesWeek of 2026-04-19: +16,282 linesWeek of 2026-04-19: -4,908 linesWeek of 2026-04-26: +15,704 linesWeek of 2026-04-26: -26,421 linesWeek of 2026-05-03: +12,463 linesWeek of 2026-05-03: -6,352 linesWeek of 2026-05-10: +6,594 linesWeek of 2026-05-10: -1,993 linesWeek of 2026-05-17: +6,075 linesWeek of 2026-05-17: -8,583 linesWeek of 2026-05-24: +4,600 linesWeek of 2026-05-24: -19,485 linesWeek of 2026-05-31: +19,026 linesWeek of 2026-05-31: -2,739 linesWeek of 2026-06-07: +16,501 linesWeek of 2026-06-07: -4,226 linesWeek of 2026-06-14: +17,078 linesWeek of 2026-06-14: -1,501 linesWeek of 2026-06-21: +9,546 linesWeek of 2026-06-21: -1,987 linesWeek of 2026-06-28: +19,575 linesWeek of 2026-06-28: -4,047 linesWeek of 2026-07-05: +29,118 linesWeek of 2026-07-05: -3,877 linesWeek of 2026-07-12: +57,427 linesWeek of 2026-07-12: -8,840 linesWeek of 2026-07-19: +13,106 linesWeek of 2026-07-19: -6,572 linesWeek of 2026-07-26: +19,283 linesWeek of 2026-07-26: -9,736 linesWeek of 2026-08-02: +31,219 linesWeek of 2026-08-02: -10,705 linesAug 10, 2025Aug 2, 2026
+850.9K lines added, -471K removed over the last year.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 32 commitsSun 1:00 — 18 commitsSun 2:00 — 25 commitsSun 3:00 — 10 commitsSun 4:00 — 6 commitsSun 5:00 — 1 commitsSun 6:00 — 1 commitsSun 7:00 — 0 commitsSun 8:00 — 2 commitsSun 9:00 — 12 commitsSun 10:00 — 5 commitsSun 11:00 — 22 commitsSun 12:00 — 16 commitsSun 13:00 — 24 commitsSun 14:00 — 21 commitsSun 15:00 — 10 commitsSun 16:00 — 16 commitsSun 17:00 — 27 commitsSun 18:00 — 26 commitsSun 19:00 — 29 commitsSun 20:00 — 43 commitsSun 21:00 — 46 commitsSun 22:00 — 34 commitsSun 23:00 — 43 commitsMon 0:00 — 67 commitsMon 1:00 — 27 commitsMon 2:00 — 34 commitsMon 3:00 — 14 commitsMon 4:00 — 1 commitsMon 5:00 — 0 commitsMon 6:00 — 4 commitsMon 7:00 — 1 commitsMon 8:00 — 5 commitsMon 9:00 — 11 commitsMon 10:00 — 7 commitsMon 11:00 — 18 commitsMon 12:00 — 33 commitsMon 13:00 — 30 commitsMon 14:00 — 40 commitsMon 15:00 — 46 commitsMon 16:00 — 55 commitsMon 17:00 — 31 commitsMon 18:00 — 32 commitsMon 19:00 — 30 commitsMon 20:00 — 38 commitsMon 21:00 — 42 commitsMon 22:00 — 49 commitsMon 23:00 — 45 commitsTue 0:00 — 70 commitsTue 1:00 — 43 commitsTue 2:00 — 18 commitsTue 3:00 — 12 commitsTue 4:00 — 7 commitsTue 5:00 — 2 commitsTue 6:00 — 2 commitsTue 7:00 — 4 commitsTue 8:00 — 1 commitsTue 9:00 — 12 commitsTue 10:00 — 4 commitsTue 11:00 — 12 commitsTue 12:00 — 39 commitsTue 13:00 — 36 commitsTue 14:00 — 34 commitsTue 15:00 — 28 commitsTue 16:00 — 21 commitsTue 17:00 — 34 commitsTue 18:00 — 20 commitsTue 19:00 — 24 commitsTue 20:00 — 35 commitsTue 21:00 — 44 commitsTue 22:00 — 28 commitsTue 23:00 — 63 commitsWed 0:00 — 47 commitsWed 1:00 — 36 commitsWed 2:00 — 32 commitsWed 3:00 — 9 commitsWed 4:00 — 15 commitsWed 5:00 — 3 commitsWed 6:00 — 1 commitsWed 7:00 — 5 commitsWed 8:00 — 2 commitsWed 9:00 — 9 commitsWed 10:00 — 15 commitsWed 11:00 — 16 commitsWed 12:00 — 44 commitsWed 13:00 — 48 commitsWed 14:00 — 55 commitsWed 15:00 — 32 commitsWed 16:00 — 45 commitsWed 17:00 — 26 commitsWed 18:00 — 43 commitsWed 19:00 — 6 commitsWed 20:00 — 34 commitsWed 21:00 — 31 commitsWed 22:00 — 52 commitsWed 23:00 — 65 commitsThu 0:00 — 32 commitsThu 1:00 — 35 commitsThu 2:00 — 32 commitsThu 3:00 — 28 commitsThu 4:00 — 16 commitsThu 5:00 — 14 commitsThu 6:00 — 3 commitsThu 7:00 — 6 commitsThu 8:00 — 1 commitsThu 9:00 — 8 commitsThu 10:00 — 14 commitsThu 11:00 — 26 commitsThu 12:00 — 55 commitsThu 13:00 — 33 commitsThu 14:00 — 24 commitsThu 15:00 — 33 commitsThu 16:00 — 26 commitsThu 17:00 — 36 commitsThu 18:00 — 24 commitsThu 19:00 — 23 commitsThu 20:00 — 70 commitsThu 21:00 — 66 commitsThu 22:00 — 68 commitsThu 23:00 — 67 commitsFri 0:00 — 81 commitsFri 1:00 — 40 commitsFri 2:00 — 29 commitsFri 3:00 — 25 commitsFri 4:00 — 19 commitsFri 5:00 — 11 commitsFri 6:00 — 7 commitsFri 7:00 — 5 commitsFri 8:00 — 0 commitsFri 9:00 — 8 commitsFri 10:00 — 24 commitsFri 11:00 — 36 commitsFri 12:00 — 31 commitsFri 13:00 — 26 commitsFri 14:00 — 14 commitsFri 15:00 — 17 commitsFri 16:00 — 28 commitsFri 17:00 — 30 commitsFri 18:00 — 22 commitsFri 19:00 — 29 commitsFri 20:00 — 43 commitsFri 21:00 — 40 commitsFri 22:00 — 54 commitsFri 23:00 — 57 commitsSat 0:00 — 42 commitsSat 1:00 — 44 commitsSat 2:00 — 21 commitsSat 3:00 — 26 commitsSat 4:00 — 16 commitsSat 5:00 — 9 commitsSat 6:00 — 4 commitsSat 7:00 — 1 commitsSat 8:00 — 1 commitsSat 9:00 — 11 commitsSat 10:00 — 7 commitsSat 11:00 — 5 commitsSat 12:00 — 9 commitsSat 13:00 — 20 commitsSat 14:00 — 18 commitsSat 15:00 — 12 commitsSat 16:00 — 42 commitsSat 17:00 — 13 commitsSat 18:00 — 16 commitsSat 19:00 — 24 commitsSat 20:00 — 23 commitsSat 21:00 — 44 commitsSat 22:00 — 45 commitsSat 23:00 — 38 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.
DateListRankStars gained
Aug 8, 2026daily#1+2,293
  • freeCodeCamp/freeCodeCamp

    freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

    453.7K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    385.5K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    384.4K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    384.4K stars · TypeScript

  • openclaw/openclaw

    Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

    384.4K stars · TypeScript

  • anomalyco/opencode

    The open source coding agent.

    194.9K stars · TypeScript