AB
AiBoss
project

Prime Agent - Prime Intellect's open-source long-cycle AI agent runtime framework

Prime Agent is an open-source, long-lifecycle AI agent runtime framework from Prime Intellect. It uses RLM (Recursive Language Model) to variableize context and functionalize sub-agents, leveraging Continual Harness to achieve...

What is Prime Agent?

Prime Agent is an open-source, long-cycle AI agent runtime framework from Prime Intellect. It uses RLM (Recursive Language Model) to variableize context and functionalize sub-agents, leveraging Continual Harness to continuously accumulate task experience and evolve. Prime Agent supports persistent IPython, resume execution after disconnection, and parallel scheduling of multiple agents. On ARC-AGI-3, it improves performance from 30% to 95.5%, and is open-source under the MIT license.

Prime Agent's main functions

  • Persistent IPython environmentWith IPython REPL as the only built-in tool, file operations, shell commands, and data processing are all done through code. Variables and states are persistently retained across rounds, avoiding the repeated serialization of large amounts of raw text.
  • Parallel scheduling of multiple agents:pass rlm() Functions dynamically generate sub-agents with independent contexts and kernels, supporting asynchronous parallel execution and result feedback, making them suitable for multi-dimensional analysis of large code repositories.
  • Task experience accumulation and self-iteration: with the help of /refine The command replays the task trajectory and saves the verified and valid processing logic as supplementary prompts, memory fragments, reusable skills or sub-Agent configurations. It supports reuse within a session or across sessions globally and provides snapshot rollback capabilities.
  • Autonomous task mode for resuming play after disconnectionThe background Daemon process manages all sessions. After the terminal is closed, tasks, IPython status, and child agent processes continue to run. You can view the progress by reconnecting. It supports persistent targets, heartbeat detection, and scheduled inspections.
  • Rich model ecosystem compatibilitySupports one-click installation on macOS and Linux, is compatible with subscription services such as ChatGPT, Claude, and GitHub Copilot, and can also access various third-party large models via API Key.

Prime Agent's technical principles

  • Recursive Language Model (RLM)Abstraction treats the context as a programmable variable (prompt-as-a-variable) and the generation of tool calls and recursive sub-agents as function calls. The model stores intermediate results in variables for direct access, while sub-agents access them through... rlm() Asynchronously generate and return stable handles, allowing the parent agent to continue local computation, thus mitigating the context bloat problem under long tasks from an architectural perspective.
  • Continual HarnessAs a revisable persistent state layer, it stores supplementary hints, memories, skill descriptions, and sub-Agent specifications. Agents communicate through... /refine These states are updated in small, versioned steps based on trajectory evidence. All improvements are applied to the variable Harness states as incremental patches, without modifying the immutable underlying system prompts. Version rollback is also supported to prevent erroneous experiences from becoming entrenched.
  • Four information hierarchies (L0–L3)Model weights (L0) are updated through fine-tuning; the active token context (L1) is rewritten through compaction; the persistent REPL and sub-agents (L2) are created, retained, and cleaned up through agentic GC; and the history, memories, and skills stored on disk (L3) are updated through refinement versioning. This layer gives the system characteristics of a von Neumann-like architecture, allowing the model to read, write, transform, and persist addressed states beyond its own weights.
  • Direct inter-agent communicationThe Daemon maintains an asynchronous message queue, allowing Agents to send messages directly to parent, child, and sibling nodes without all messages passing through the user. This decentralized communication mechanism enables dynamic coordination among multiple Agent groups rather than adhering to a fixed workflow graph, while also allowing humans to inspect, attach, and intervene in any session node through Agents View.
  • Daemon background process managementAll sessions are owned by a Daemon process independent of the client. Session state, including event history, kernel snapshots, session trees, message queues, and versioned Harness state, is persisted to disk. Client disconnection does not affect task execution, and reattaching, branching forking, and fault recovery are supported, fundamentally breaking the binding between the Agent lifecycle and the chat window.

Follow us on WeChat and reply with "open source",join inAI open source project discussion group

How to use Prime Agent

  • Install: Execute in macOS or Linux terminal curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh One-click installation.
  • start upRun after entering the target project directory. prime-agentFirst time using execution /login Choose a subscription service such as ChatGPT or Claude, or enter your API Key to complete the authentication.
  • InteractionWhen you directly input natural language commands or Python code into the persistent IPython REPL, the Agent will execute commands, read and write files, and retain variable states in the current directory.
  • Parallel subtasks: call rlm() The function dynamically generates sub-Agents with independent contexts, asynchronously dispatches subtasks such as code review and information retrieval in parallel, and waits for the results to be returned.
  • Experience accumulationExecute after task completion /refine The agent automatically reviews the trajectory and saves the verified valid logic as a reusable skill, memory, or sub-agent configuration.
  • Resuming play after disconnectionPress anytime Ctrl+D Alternatively, detach the terminal session, allowing the background daemon to keep the task running, and then... prime-agent attach <agent> Reconnect and check the progress.
  • Autonomous operation:enter /autonomous Set the number of rounds, token, or time budget. The agent will autonomously loop within the budget until it passes the quality gate or reaches the limit.
  • Target tracking:use /goal Set persistent goals, and the goals and their progress will remain active across multiple rounds of dialogue until the Agent marks them as complete.
  • Scheduled scheduling:pass /heartbeat or prime-agent schedule Configure Cron expressions or timed triggers to allow the Agent to automatically enter a session and perform inspection tasks periodically.

Prime Agent's core advantages

  • Long-term continuous operationThe background daemon-managed session continues to run the task and IPython state even after the terminal is closed, and can be reconnected and resumed at any time.
  • Contextual variable managementBy treating the context as a programmable variable through RLM, massive amounts of raw text are repeatedly stuffed into the chat window, fundamentally alleviating token inflation under long tasks.
  • Dynamic Parallel Agent:rlm() The function can asynchronously generate multiple sub-agents with independent kernels, achieving decoupling and parallel acceleration of large tasks.
  • Framework layer self-evolution:/refine The effective logic in the task trajectory is precipitated into reusable skills and memories, and version snapshot rollback is supported, allowing for continuous improvement without modifying the model weights.
  • Excellent scalability during testingOn ARC-AGI-3, performance was improved from 30% to 95.5%, demonstrating that additional computing resources can be efficiently translated into validated task progress.
  • Harness decoupled from the modelStandardized execution, recovery, and resource statistics ensure that task failures stem from the model's capacity limitations rather than a framework crash or premature termination.
  • Decentralized Agent CommunicationSub-Agents exchange messages directly through Daemon queues, without all messages needing to pass through the user, and support dynamic swarm coordination.

Prime Agent's project address

  • GitHub repository:https://github.com/PrimeIntellect-ai/prime-agent
  • arXiv technical paper:https://arxiv.org/pdf/2608.23552

Comparison of Prime Agent's similar products

Comparison Dimensions Prime Agent Claude Code
life cycle Daemon runs the task in the background, allowing it to continue running even after the terminal is closed, and supports reconnection after disconnection. Binds to a terminal/chat window; the binding is terminated when the window is closed.
Context Management RLM uses variable-based storage, storing intermediate results in callable variables to avoid context bloat. Packing all information into the chat context can easily lead to overflow during long-running tasks.
Sub-Agent Scheduling rlm() Dynamically generate independent sub-agents, supporting asynchronous parallelism and direct communication. Without a native child agent mechanism, tasks are executed sequentially.
Experience accumulation /refine Save trajectory experience as a reusable skill/memory, effective across sessions. No cross-session memory; each startup starts from scratch.
Autonomous operation support /autonomous Autonomous loop within budget, including heartbeat and timed scheduling. Requires continuous user interaction; no backend self-service mode.
Architecture positioning Standardized long-cycle evaluation of Harness, open source and scalable Closed-source product, deeply integrated with the Anthropic ecosystem
Information hierarchy L0–L3 four-level state hierarchy (weight/context/REPL/disk) Only L0 (model) + L1 (context), no persistent L2/L3
Applicable Scenarios Long-term scientific research, large-scale reconstruction, and parallel analysis Fast coding, debugging, and Q&A within a single session

Application scenarios of Prime Agent

  • Large-scale codebase refactoring and cross-module migrationUsing persistent REPL and parallel sub-agents, we can perform multi-dimensional analysis, batch refactoring, and cross-language migration on a million-line codebase. The task can last for several days and can be recovered after a disconnection.
  • Multi-step scientific research experiment automationIn machine learning or systems research, it automates hyperparameter search, model training, results recording, and paper figure generation. /refine The precipitation experiment procedure is a reusable skill.
  • Continuous operation and maintenance and intelligent inspection of complex systems: combination /heartbeat and /goal Set persistent monitoring targets. The agent automatically logs into the server periodically, reads logs, detects anomalies, and generates reports, running in the background 24/7.
  • Long-term autonomous exploration in game and simulation environmentsIn complex sandbox games like Factorio, multiple agents are responsible for resource gathering, infrastructure planning, and technology research and development, respectively. They coordinate and advance in parallel through direct communication, running continuously for dozens of hours.
  • Multi-dimensional code review and parallel testing verificationFor large PRs, multiple sub-agents are generated to perform static analysis, unit testing, integration testing, and security auditing respectively. The results are aggregated after asynchronous parallel completion, which significantly improves review efficiency.