PrimeIntellect-ai/prime-agent

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

What it solves

Traditional chat agents lose context and working state when a session ends. Prime Agent solves this by combining a persistent Python REPL with a durable "harness" that stores supplemental prompts, memories, skills, and subagent specifications. This lets useful context and repeatable operating patterns outlive a single chat window, which is especially important for long-running research and coding tasks.

How it works

Prime Agent is built around two core abstractions. The Recursive Language Model (RLM) treats context as variables (prompt-as-a-variable) and tools like subagents as programmatic function calls inside a persistent REPL. The Continual Harness stores durable state that the agent can refine through small, evidence-backed updates via the /refine command. The agent runs as a daemon so sessions keep going in the background, can spawn subagents with rlm.spawn(...), and can even have agents communicate directly. Everything is programmatic: file operations, shell commands, and context management happen through code.

Who it’s for

Researchers and developers who need to run long-running, autonomous agent tasks — for example, evaluations in research — and want the agent to keep working across terminal disconnections, improve its own strategies, and integrate with tools like Slack, Google Drive, and Sheets.

Highlights

  • Persistent Python REPL as the default model tool; all operations are programmatic.
  • Built-in subagents: rlm.spawn(...) spawns parallel or background child agents that return results programmatically.
  • Self-improving harness: /refine reviews the trajectory and can apply evidence-backed updates to supplemental state without rewriting the base system prompt, with rollback snapshots.
  • Daemon-backed sessions: agents keep running when the terminal disconnects and can be reattached.
  • Agent-to-agent communication: running agents can exchange messages and orchestrate each other.
  • Long-running support: automatic compaction, persistent goals, heartbeats, schedules, and bounded autonomous mode.
  • Integrations via MCP: Slack, Google Drive, Google Sheets.
  • Fully open source under MIT License.

Related

  • Dispatch
  • Project
  • Project
  • Project
  • Project