Prime Agent: A Self-Improving RLM Harness
Organizations: Princeton University · Prime Intellect · MIT
Abstract
Language models are sequential processors, but long-horizon agency requires external information and computation beyond model weights and active context. Prime Agent is an open-source harness for long-horizon evaluation and coding-agent workflows. A persistent IPython REPL follows the Recursive Language Model abstraction for programmatic context processing and test-time compute, while Continual Harness preserves histories, memories, skills, prompts, and subagent specifications across trajectories. Recursive subagents coordinate through direct agent-to-agent communication, and the Agents View lets humans inspect and manage daemon-backed sessions. Prime Agent standardizes execution, recovery, verification, and resource accounting while leaving strategy construction to the model. This low-friction, expressive membrane prevents harness failures from becoming model failures and pushes measurement toward the model's true maximal underlying capability. Prime Agent raises ARC-AGI-3 RHAE Best@1 from 30% to 95.5% and matches or exceeds native and popular harnesses across long-context coding, GPU-kernel generation, emulator construction, and autonomous nanoGPT speedruns. On Factorio, we find refinement allows for continuous technology progression and dedicated subagents enable parallelized work. Code is available at https://github.com/PrimeIntellect-ai/prime-agent.
Figures & tables
| GLM-5.2 (reasoning: high) | Opus 5 (reasoning: high) | GPT-5.6 Sol (reasoning: high) | |||||
|---|---|---|---|---|---|---|---|
| Task | Setting | Prime | Pi-mono | Prime | Claude Code | Prime | Codex |
| OOLONG (Yahoo, 128k) [ 5 ] | long context | .700 | .420 | .900 | .920 | .940 | .900 |
| OOLONG-Pairs [ 44 ] | long output | .874 | .556 | .929 | .922 | .911 | .895 |
| OBLIQ-Bench (math) [ 33 ] | ranking (nDCG@10) | .669 | .635 | .802 | .795 | .612 | .646 |
| LongBench Pro (English) [ 6 ] | comprehension | .777 | .768 | .804 | .790 | .794 | .790 |
| LongBench v2 [ 3 ] | expert long tasks | .680 | .696 | .744 | .746 | .714 | .704 |
LLM Agent Harnesses
LLM agent harnesses are the software and runtime systems that organize an agent’s tools, context, state, execution, and safeguards.
See all 389 papersPRO-LONG: Programmatic Memory Enables Long-Horizon Reasoning
Harness as a Language: A Minimalist Agent Framework With Maximal Expressivity
invoke and provides a set of built-in hooks that allow the programmer to apply constraints and perform monitoring. Generalizing existing code-mode agent loops, invoke is the simplest loop that satisfies two defining properties: (1) the LLM can write arbitrary executable code that can include recursive invoke; (2) everything visible to the LLM - all inputs to invoke as well as its interaction history with the code environment - are variables in the code environment. We motivate our design from first principles, viewing invoke as a language primitive representing a function whose implementation is provided at runtime by an LLM every time it is called. To validate the design of our core invoke primitive, we evaluate invoke - with only prompting, no manually designed tools, harness, or external systems (e.g., memory or the file system) - on workflows traditionally implemented through specialized harnesses. On long-horizon workflows requiring recall far beyond the context window, JAZ invoke outperforms Letta (MemGPT) by 8% at half its cost on the recall-heavy portion of StuLife. On continual self-improvement, JAZ invoke outperforms ACE by 4% at a lower cost on AppWorld.