Skip to content

Repository files navigation

🤖 Prime Agent

License: MIT Build Status Platform

Prime Intellect

Prime Agent is a next-generation open-source AI agent designed for automating development, research, and long-horizon autonomous tasks. The project is built on top of the Recursive Language Models (RLM) architecture and the Continual Harness self-learning framework.


🌟 Why Choose Prime Agent?

Unlike traditional coding assistants and simple CLI wrappers, Prime Agent completely reimagines how LLMs interact with code and local environments:

  1. Unified IPython REPL Kernel Instead of Hundreds of JSON Tools:

    • The model no longer needs to execute dozens of separate CLI tools (Grep, Edit, Bash, FileRead).
    • The agent writes and runs live Python code inside a persistent IPython console. Context, data, and variables persist across execution steps without bloating the LLM's context window.
  2. Continual Harness (Cross-Session Memory and Adaptability):

    • Conventional AI agents "forget" your project's specific conventions once the terminal session closes.
    • Prime Agent stores its instructions, skills, and sub-agent definitions on disk as persistent state. Running /refine triggers a self-analysis process: the agent reviews completed work, extracts learnings, and updates its rules to align with your coding style.
  3. Recursive Sub-Agents and Direct A2A Communication:

    • The agent can spawn sub-agents by executing the built-in rlm("subtask") function directly inside Python code.
    • Sub-agents can communicate directly (Agent-to-Agent / A2A), run parallel tasks in the background, and report back to the primary kernel.
  4. Background Daemon and Connection Resiliency:

    • The architecture is driven by a background daemon. If you close your terminal, disconnect an SSH session, or restart the UI, the agent continues executing the task. You can reconnect to the active session at any time.
  5. Record-Breaking Autonomy (Long-Horizon Execution):

    • Native support for autonomous mode (/autonomous), periodic background checks (/heartbeat), scheduled tasks, and persistent objectives (/goal).
    • On abstract reasoning and complex coding benchmarks (e.g., ARC-AGI-3 and EmulatorBench), Prime Agent achieves above-human expert-level results through recursive subtask decomposition.
  6. Complete Model & Provider Freedom (BYOK & Subscriptions):

    • Zero vendor lock-in. Connect your own API keys or subscriptions for Anthropic (Claude), OpenAI (GPT-4o/o3), DeepSeek, Google Gemini, or local models via Ollama/vLLM.
  7. Session Tree and Isolation:

    • Execution history is continuously saved in a transparent JSONL format. The /tree command allows you to visualize the conversation graph, roll back to any previous state, or fork new execution branches without losing progress.
  8. 100% Open Source & Hackable:

    • Fully open-source under the MIT license. Easily extensible using custom TypeScript modules, Python packages, and Model Context Protocol (MCP) tools.

📥 Installation

🖥️ Installing the Desktop Client (Desktop App)

For a seamless GUI experience, prebuilt desktop releases are available for Windows and macOS.

🪟 Windows (.exe)

  1. Go to the Releases section of this repository.
  2. Download the latest installer: Prime-Agent-x64.7z.
  3. Run the .exe file and follow the setup wizard prompts.
  4. Launch Prime Agent from your Desktop shortcut or Start menu.
  5. (Recommended) Ensure Python 3.10+ is installed on your system and added to your system PATH for proper IPython kernel operation.

🍎 macOS (.dmg)

  1. Go to the Releases section.
  2. Download Prime-Agent.dmg (available for both Apple Silicon arm64 and Intel x64).
  3. Open the .dmg file and drag the Prime Agent icon into your Applications folder.
  4. On first launch on macOS (if prompted with a security warning):
    • Go to System Settings ➔ Privacy & Security.
    • Scroll down and click "Open Anyway".

🛠 Slash Commands

Command Description
/login Configure API keys, subscriptions, and select LLM providers
/goal <text> Define a global session goal that the agent continuously tracks
/refine Analyze current session history and persist learned rules/skills to disk
/tree Navigate the conversation tree, inspect branches, and roll back to past states
/autonomous Enable autonomous execution mode with defined time and token budgets
/heartbeat Configure periodic status checks for long-running background tasks
/compact Force context compression while retaining the IPython kernel state

🏗 System Architecture

┌──────────────────────────────────────────────────────────────────┐
│                      Prime Agent Daemon                          │
│                                                                  │
│  ┌─────────────────────────┐        ┌─────────────────────────┐  │
│  │ Desktop GUI / CLI TUI   │ ◄────► │   IPython REPL Kernel   │  │
│  └─────────────────────────┘        └─────────────────────────┘  │
│               │                                  │               │
│               ▼                                  ▼               │
│  ┌─────────────────────────┐        ┌─────────────────────────┐  │
│  │    Continual Harness    │        │ Sub-Agents (rlm calls)  │  │
│  │ (Skills / Memory State) │        │ & Direct A2A Messaging  │  │
│  └─────────────────────────┘        └─────────────────────────┘  │
└──────────────────────────────────────────────────────────────────┘


🛡 Security Warning

⚠️ Important: Prime Agent executes model-generated Python code and system commands with the privileges of your local OS user.

  • Avoid running the agent with administrative / root privileges.
  • When working with untrusted or unvetted codebases, run Prime Agent inside isolated environments (Docker, WSL, or DevContainers).

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Download prime agent - a self-improving RLM agent for coding workflows and long-running autonomous tasks.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages