Prime Agent: A Self-Improving RLM Harness

TL;DR

Prime Agent employs recursive language models and persistent tools to achieve 95.5% on ARC-AGI-3, enabling long-horizon autonomous evaluation and multi-agent coordination.

cs.AI 🔴 Advanced 2026-08-25 90 views
Seth Karten Alex L. Zhang Kevin Thomas Sebastian Müller Elie Bakouch Daniel Auras Mika Senghaas Fares Obeid Konstantin Dunas Johannes Hagemann Sami Jaghouar
multi-agent systems long-horizon evaluation recursive language models information management autonomous learning

Key Findings

Methodology

Prime Agent integrates recursive language models (RLM) with a hierarchical state organization, combining model weights, active context, persistent disk storage, and ongoing sessions. It employs a persistent IPython REPL for programmatic context processing and test-time computation, enabling dynamic invocation of code, tools, and recursive subagents. The system supports multi-layered information management, including trajectory versioning, continual refinement, and agent-to-agent communication. Core mechanisms include: • RLM-based program execution and scheduling; • multi-level state hierarchy (model weights, context, persistent storage); • recursive sessions with direct communication; • trajectory refinement and self-improvement. These components standardize execution, recovery, verification, and resource accounting, maximizing the model’s true potential.

Key Results

  • In ARC-AGI-3, Prime Agent increased RHAE scores from 30% to 95.5%, surpassing baseline harnesses. It demonstrated superior performance in long-context reasoning, code generation, GPU kernel creation, and emulator reconstruction, with solutions reaching or exceeding industry benchmarks.
  • In Factorio, Prime Agent achieved 71% progress on research tasks over a continuous 85.5-hour run, supporting multi-day autonomous experiments with dynamic subagent orchestration and technology development.
  • On EmulatorBench, Prime Agent successfully reconstructed multiple emulators (e.g., SEGA Genesis, Game Boy Color) with solution rates over 60%, validating its capability in software modeling and long-term task management.

Significance

This work advances autonomous AI by integrating information and computation across multiple levels, enabling models to perform complex, long-horizon tasks with minimal human intervention. It addresses key limitations of current LLMs, such as context length and task continuity, paving the way for more robust, scalable, and self-improving systems. Its multi-agent coordination and persistent memory mechanisms open new avenues for AI research and practical deployment in complex environments.

Technical Contribution

The paper introduces a unified framework combining recursive language models with persistent, multi-layered state management, enabling dynamic invocation, trajectory versioning, and multi-agent communication. It standardizes long-horizon evaluation and resource accounting, facilitating scalable, reliable autonomous systems. The architecture supports recursive orchestration, self-refinement, and agent collaboration, representing a significant step beyond existing isolated or task-specific approaches.

Novelty

This is the first work to deeply fuse recursive language models with persistent, multi-layered state and multi-agent communication for long-term autonomous tasks. Unlike prior systems limited to single-pass inference or static workflows, Prime Agent emphasizes dynamic, programmatic control of information and computation, enabling continuous learning, self-improvement, and multi-agent collaboration within a unified platform.

Limitations

  • High computational and storage costs, especially with multiple subagents and long trajectories, limit scalability and real-time deployment. Security concerns arise from persistent storage and communication channels, requiring robust safeguards. The system’s reliance on pre-trained models constrains adaptability to unseen environments, and its performance in extreme or unpredictable scenarios remains to be validated. Further optimization is needed for broader, resource-efficient deployment.

Future Work

Future directions include optimizing resource efficiency, enhancing security protocols, expanding multi-modal capabilities, and integrating adaptive learning mechanisms. Researchers aim to extend the framework to robotics and real-world autonomous systems, improve scalability, and develop standardized benchmarks for long-horizon AI evaluation. Continued exploration of multi-agent coordination and self-refinement strategies will be crucial for advancing autonomous AI.

AI Executive Summary

Prime Agent introduces a groundbreaking architecture that combines recursive language models with persistent, hierarchical state management to enable long-horizon autonomous evaluation. By integrating a persistent IPython REPL, continual refinement, and multi-agent communication, the system allows models to dynamically invoke code, tools, and subagents, effectively expanding their strategic capabilities. This approach addresses longstanding challenges in scaling language models for complex, multi-step tasks, such as maintaining context, managing information, and coordinating multiple agents over extended periods.

In rigorous evaluations, Prime Agent achieved a remarkable increase in ARC-AGI-3 scores from 30% to 95.5%, outperforming traditional harnesses and matching or exceeding industry benchmarks in long-context reasoning, code generation, and emulator reconstruction. Its performance in the Factorio environment demonstrated the ability to sustain multi-day autonomous experiments, with over 71% progress on research tasks and continuous technology development. The system's capacity to reconstruct complex software environments like SEGA Genesis and Game Boy Color emulators with over 60% solution rate further exemplifies its robustness.

This work marks a significant step forward in autonomous AI, emphasizing the importance of integrating information management, computation, and multi-agent collaboration. By standardizing evaluation and resource accounting, Prime Agent paves the way for scalable, reliable, and self-improving systems capable of tackling real-world, long-horizon challenges. Despite current limitations in computational costs and security, ongoing research aims to optimize efficiency and expand applicability, promising a new era of intelligent, autonomous systems.

Deep Analysis

Background

The evolution of large language models (LLMs) like GPT-4, Claude, and PaLM has revolutionized NLP and code synthesis. However, their capacity for long-horizon reasoning remains limited by context window sizes, fragmented information management, and lack of persistent memory. Prior efforts, including OpenAI Codex and DeepMind’s Gato, have introduced multi-task learning and multi-agent frameworks, yet none fully address the integration of recursive invocation, persistent state, and dynamic multi-agent orchestration for autonomous long-term tasks. Recent research emphasizes recursive language models (RLM) and continual learning, but practical implementations often lack standardized evaluation platforms or scalable architectures. Prime Agent responds to these gaps by proposing a unified, extensible system that combines RLM-based programmatic control with persistent storage and multi-agent communication, enabling models to perform complex, multi-stage tasks over extended periods with minimal human intervention.

Core Problem

Current language models struggle with long-horizon tasks due to limited context windows, fragmented information management, and inability to sustain multi-step reasoning over days or weeks. These limitations hinder autonomous systems from performing complex, multi-phase activities such as scientific research, software development, or strategic planning. Existing solutions often rely on manual intervention, static workflows, or isolated modules, which restrict scalability and adaptability. The core challenge is to develop a system that can dynamically manage information, coordinate multiple sub-agents, and self-improve through trajectory refinement, all while maintaining resource efficiency and robustness in real-world environments.

Innovation

Prime Agent’s key innovations include: 1) a hierarchical state organization integrating model weights, active context, persistent disk storage, and trajectory histories, enabling continuous information flow; 2) recursive language models (RLM) that facilitate programmatic invocation, subagent management, and dynamic scheduling; 3) a persistent IPython REPL supporting test-time compute and programmatic control; 4) multi-agent communication channels allowing direct, asynchronous interaction among subagents and with human operators; 5) trajectory versioning and continual refinement mechanisms that support self-improvement and knowledge accumulation. These innovations collectively enable a flexible, scalable, and autonomous AI system capable of long-term reasoning and adaptation, surpassing prior approaches limited to static workflows or single-pass inference.

Methodology

  • �� Implement RLM primitives for programmatic invocation, enabling recursive subagent calls and dynamic task decomposition.
  • �� Organize system state into multiple levels: L0 (model weights), L1 (active context), L2 (runtime session with Python and tools), L3 (disk-backed history, memories, skills).
  • �� Use a persistent IPython REPL for test-time compute, allowing model inference, code execution, and tool calls with retained intermediate values.
  • �� Facilitate recursive sessions with direct asynchronous communication via daemon-mediated queues, supporting multi-agent collaboration.
  • �� Incorporate trajectory refinement, version control, and self-improvement by converting execution evidence into persistent, reusable state.
  • �� Standardize execution, recovery, verification, and resource accounting to ensure robustness and maximal utilization of model capabilities.
  • �� Provide visualization tools (Agents View) for human oversight and intervention.

Experiments

The system was evaluated on ARC-AGI-3, Factorio, EmulatorBench, and MazeBench, using standard benchmarks for reasoning, long-context code generation, emulator reconstruction, and spatial reasoning. Baselines included traditional harnesses and open-source tools. Metrics measured included task success rate, resource consumption, trajectory quality, and solution rate. Experiments involved multi-day autonomous runs, ablation studies removing key components, and cross-scenario comparisons. Hyperparameters such as model size, subagent count, and session depth were tuned for optimal performance. Results demonstrated significant improvements over baselines, with high scores in complex, multi-step tasks and robust recovery from disruptions.

Results

Prime Agent achieved a 95.5% RHAE score on ARC-AGI-3, far exceeding previous bests at 30%. It maintained continuous progress in Factorio over 85.5 hours, completing 24 technologies and reaching 71% on advanced circuits. Emulator reconstruction success rates exceeded 60%, with accurate replication of SEGA Genesis and Game Boy Color systems. In long-context reasoning tasks, Prime Agent outperformed native and alternative harnesses, demonstrating superior information management and multi-agent coordination. These results validate the system’s capacity for sustained, autonomous, long-horizon reasoning and self-improvement.

Applications

Prime Agent can be applied in autonomous scientific research, complex software development, long-term strategic planning, and robotic control. Its ability to manage persistent knowledge, coordinate multiple agents, and self-refine makes it suitable for industries requiring continuous adaptation and optimization. It can facilitate automated system debugging, multi-stage project management, and real-world environment exploration, provided sufficient computational resources and security measures are in place.

Limitations & Outlook

High computational and storage demands limit scalability, especially with many subagents and long trajectories. Security concerns arise from persistent data storage and communication channels, necessitating robust safeguards. The reliance on pre-trained models constrains adaptability to unforeseen environments or novel tasks. Additionally, the system’s efficiency in extremely complex or unpredictable scenarios needs further validation. Future work should focus on resource optimization, security enhancements, and broader applicability to real-world autonomous systems.

Plain Language Accessible to non-experts

想象你有一个超级聪明的助手,它不仅能记住你每天的学习内容,还能帮你安排学习计划、解决难题,甚至和其他助手合作完成大项目。这个助手会不断学习新知识,改进自己的方法,不会忘记之前的经验。它还能和你的朋友们交流,协调大家的任务,让整个学习过程变得高效又有趣。就像你有一支聪明的团队,大家分工合作,彼此配合,不断变得更厉害。这就是Prime Agent的工作原理,它让人工智能变得像一个聪明、会学习、会合作的伙伴,能帮你完成各种复杂的任务。

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.

cs.AI cs.CL cs.SE