CONTRIBUTING
Contributing to Prime Agent
Thanks for your interest in contributing to Prime Agent! Prime Agent is developed in public, and we welcome bug reports, feature requests, questions, and other feedback. To keep the project maintainable, public contributions begin in GitHub Discussions.
With the influx of agent-generated contributions, we do not review unsolicited pull requests or use public Issues as the initial intake queue. While we are open to contributions by agents, you are responsible for your code and must understand how it interacts with the entire project.
Start with a Discussion
Choose the category that best matches what you want to share:
- General discussion or question
- Bug report
- Feature request
Search existing Discussions before creating a new one. Include enough detail for someone else to understand and reproduce the problem, but do not share API keys, tokens, private prompts, or other sensitive information.
For security vulnerabilities, follow SECURITY.md instead of posting publicly.
Issues
GitHub Issues track work that maintainers have accepted and intend to investigate or implement. A maintainer may create an Issue from a Discussion when the scope is clear and the work fits the roadmap. An existing Issue does not automatically mean that an external pull request is wanted. Wait for a maintainer to invite implementation before starting substantial work.
Issues opened by unapproved contributors are automatically closed and redirected to Discussions. To contribute, share interest in Discussions or corresponding issues, and maintainers can invite implementation for requested work.
Pull Requests and Trusted Contributors
Prime Agent runs on user machines and can execute code with the user's permissions. We therefore limit pull requests to maintainers and trusted contributors who have been explicitly vouched for. Maintainers may vouch for someone after they have consistently demonstrated a useful understanding of the project through Discussions, issue investigation, testing, documentation, or other collaboration. There is no separate application process and no guarantee that participation will result in approval.
Pull requests from unvouched contributors are automatically closed. If you are interested in contributing code, begin with a Discussion and work with the maintainers on the problem first.
Preparing an Approved Pull Request
If a maintainer has invited a pull request:
1. Keep the change focused on the accepted Issue or Discussion.
2. Follow the repository's development rules and existing conventions.
3. Add or update tests for behavioral changes.
4. Run the relevant checks locally and describe the validation in the pull request.
5. Avoid unrelated refactors or dependency changes.
Development setup and commands are documented in the development guide.
Maintainers may close a pull request that changes scope, cannot be validated safely, or no longer fits the project roadmap.
---
README
<p align="center">
<a href="https://primeintellect.ai">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/40c36e38-c5bd-4c5a-9cb3-f7b902cd155d">
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/6414bc9b-126b-41ca-9307-9e982430cde8">
<img alt="Prime Intellect" src="https://github.com/user-attachments/assets/6414bc9b-126b-41ca-9307-9e982430cde8" width="312" style="max-width: 100%;">
</picture>
</a>
</p>
<h3 align="center">
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>
</p>
<p align="center">
<a href="https://github.com/PrimeIntellect-ai/prime-agent/actions/workflows/ci.yml">
<img src="https://github.com/PrimeIntellect-ai/prime-agent/actions/workflows/ci.yml/badge.svg" alt="CI" />
</a>
<a href="https://github.com/PrimeIntellect-ai/prime-agent/actions/workflows/build-binaries.yml">
<img src="https://github.com/PrimeIntellect-ai/prime-agent/actions/workflows/build-binaries.yml/badge.svg" alt="Build Binaries" />
</a>
</p>
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 | shThe 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-agentOn 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.
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 serviceBuilt 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
- Quickstart — install, authenticate, and run a first session
- Usage and CLI reference — commands, sessions, autonomous limits, and output modes
- Long-running and background agents — detach and reattach, goals, heartbeats, and schedules
- RLM programming model — persistent IPython, subagents, skills, and the trust model
- JSON mode and RPC mode — headless automation and integrations
- Skills — install and create reusable capabilities
- Provider setup — subscription and API-key providers
- Architecture overview — daemon, worker, kernel, and persistence boundaries
- Development — build and run from source
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.
---
SECURITY
Security Policy
Reporting a Vulnerability
Do not report security vulnerabilities through public Issues, Discussions, or pull requests.
Send the report to [email protected]. For encrypted communication and the current company-wide disclosure policy, see primeintellect.ai/security.
Include the following when possible:
- The affected version or commit
- The affected component and environment
- Reproduction steps or a minimal proof of concept
- The expected and observed impact
- Any known mitigations
Do not include real API keys, tokens, personal data, or credentials in the report. Use redacted or disposable test values.
What to Expect
Maintainers will assess the report, determine its scope, and coordinate remediation and disclosure when appropriate. Please allow time for investigation before publishing details that could put users at risk.
Security fixes are generally prepared against the default branch and released on a schedule chosen by the maintainers. We do not guarantee fixes for older versions.
For ordinary bugs, feature requests, and support questions, use GitHub Discussions.
---