prime-agent README

The project's README from github.com/PrimeIntellect-ai/prime-agent. As one markdown file: README.md.

Prime Intellect

Prime Agent: A Self-Improving RLM Harness

Documentation • Verifiers • PRIME-RL

CI Build Binaries arXiv

PrimeIntellect-ai%2Fprime-agent | Trendshift

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

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.

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 Python 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]       # Browse sessions or resume one directly
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.

Documentation

Contributing

Start with a GitHub Discussion for general questions, bug reports, and feature requests. Maintainers promote accepted work into Issues, and pull requests are reviewed from maintainers and vouched contributors.

Read the contribution guidelines for the full process. Report security vulnerabilities privately by following the security policy.

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.

Citation

If you use this codebase in your research, please cite Prime Agent:

@article{karten2026prime,
  title={Prime Agent: A Self-Improving RLM Harness},
  author={Karten, Seth and Zhang, Alex L. and Thomas, Kevin and Müller, Sebastian and Bakouch, Elie and Auras, Daniel and Senghaas, Mika and Obeid, Fares and Dunas, Konstantin and Hagemann, Johannes and Jaghouar, Sami},
  journal={arXiv preprint arXiv:2608.23552},
  year={2026}
}

Available at https://arxiv.org/abs/2608.23552.

prime-agent (PrimeIntellect-ai/prime-agent)

Searching Database…

这是什么?Prime Agent 是一个开源的编程和研究智能体,适合通用任务和长时间运行的工作。它建立在两个抽象之上:递归语言模型(RLM)编程模型,以及一个持续运行框架(Continual Harness),把提示词、记忆和技能保存为可长期留存、可不断打磨的状态。
RLM 这部分到底改变了它的工作方式吗?上下文变成了变量,工具变成了函数调用,全都运行在一个持久的 Python REPL 里——文件操作、shell 命令和子智能体都通过代码来执行。调用 rlm(...) 会启动真正的子智能体去做并行或后台工作,并以程序化方式返回结果。
我怎么安装和启动它?在 macOS 或 Linux 上运行安装程序:它会下载最新的稳定版本,校验 SHA-256 校验和,安装 prime-agent 命令,还可以帮你准备好 Python 运行环境。然后在你希望它工作的代码仓库或目录里启动 prime-agent 即可。
我需要自己的 API 密钥或订阅吗?首次启动时用 /login 登录,可以选择订阅或 API 密钥提供商——用你手头已有的那种就行。
把它指向我的主代码仓库安全吗?它会以你的完整用户权限执行模型生成的 Python 代码和项目命令——worker 和 kernel 进程提供了一定的生命周期隔离和恢复能力,但这并不是一个安全沙箱。README 建议使用一个随时可丢弃的克隆仓库,或者干净的工作树(worktree),方便你检查和恢复。
它只适合编程,还是也能做其他工作?它是一个编程和研究智能体,但 README 特别强调长时间运行的工作——尤其是科研中的评估任务——通过压缩上下文、持久目标、心跳和定时任务,让工作在多轮之间持续推进。
它是开源的吗?是的——完全开源,采用 MIT 许可证。
这个智能体能改进它自己的哪些方面?/refine 命令会审视当前的运行轨迹,并对框架的辅助状态做出一些小的、有依据的更新——包括提示词、记忆、技能描述和可复用的子智能体配置。它绝不会改写不可更改的基础系统提示词,而且已记录的快照支持回滚。
如果我的终端在任务中途断开了会怎样?会话由守护进程支撑:Python REPL 的状态、定时任务和子智能体在断开后会继续运行,之后可以重新接上。/goal 会让一个目标跨多轮保持有效,直到完成或暂停;心跳和定时任务则会定期或在设定时间重新进入会话。
我可以让它自己一直运行吗?可以——/autonomous 会在配置好的轮数、token 和时间预算内继续运行,还可以执行用户自定义的质量检查关卡。但要注意:关卡通过只说明该关卡检查的内容没问题,达到上限也不代表任务一定成功了。
我能把自己的重复性工作流程打包进去吗?技能就是可导入的 Python 包,内置的技能创建器可以把重复性的工作流程做成项目级或个人技能。要做无界面的自动化和集成,还有 JSON 模式和 RPC 模式可用。
Size
110.2 MB
Stars
22.1K
Age
5mo
Commits · 90 Days