메뉴
HN
Hacker News • 51일 전

프라임 에이전트: 자가 개선되는 RLM 에이전트

IMP
8/10
핵심 요약

프라임 에이전트(Prime Agent)는 재귀적 언어 모델(RLM)과 지속형 하네스(Harness) 추상화를 기반으로 작동하는 완전 오픈소스 자가 개선형 코딩 에이전트입니다. 이 에이전트는 문맥을 변수로 다루고 영구적인 IPython 커널을 통해 동적으로 하위 에이전트 및 도구를 관리할 수 있어, 기존의 정적인 에이전트 구조의 한계를 벗어납니다. 복구 불가능했던 긴 세션 처리 및 에이전트 간 통신 문제를 해결하여 자율적 코딩 및 연구 보조에 활용할 수 있다는 점에서 매우 중요합니다.

번역된 본문

오늘 저희는 두 가지 추상화 개념인 재귀적 언어 모델(RLM)과 지속형 하네스를 중심으로 설계된 자가 개선형 코딩 하네스인 프라임 에이전트(Prime Agent)를 출시합니다.

현대의 하네스 설계는 이전 세대 모델의 기능을 바탕으로 구축되었으며, 최첨단 모델이 현재 할 수 있는 일을 반영하지 못합니다. 고정된 도구 호출 스키마와 문맥 압축은 모델이 자신의 발판을 활용하기보다는 이를 우회해서 작업하도록 강제합니다. 정적이고 수동으로 엔지니어링된 하위 에이전트, 프롬프트, 스킬, 메모리는 설계 시점에 한 번 설정되며, 에이전트가 실행되면서 학습하는 내용에 적응하지 못합니다. 저희는 하네스가 현재 모델의 기능을 바탕으로 다음 추론 패턴의 프론티어를 향해 외삽(extrapolate)해야 한다고 믿습니다. 프라임 에이전트는 두 가지 주요 추상화를 통해 이 원칙을 중심으로 구축되었습니다:

재귀적 언어 모델(RLM)은 문맥을 변수로 취급하고 하위 에이전트 위임을 REPL 내부의 함수 호출로 처리합니다. 영구적인 REPL은 모델에 자신의 기록, 하위 에이전트 및 도구에 대한 프로그래밍 방식의 액세스 권한을 부여하여, 모델이 자체 문맥에 대한 작업으로 언어 모델 프로그램을 작성할 수 있게 합니다. 이 설계를 통해 에이전트는 변수에 저장된 과거 정보에 대한 접근을 잃지 않고 임의로 긴 세션을 처리할 수 있습니다.

지속형 하네스(Continual Harness)는 프롬프트, 스킬, 메모리 및 하위 에이전트로 추상화된 하네스 자체의 상태를 에이전트가 자신의 궤적에서 생성, 읽기, 업데이트 및 삭제(CRUD)할 수 있는 것으로 취급합니다. 이 메커니즘은 에이전트 간 통신과 결합될 때 하위 에이전트 전체는 물론 프라임 에이전트 세션 간의 오케스트레이션을 가능하게 합니다. 예를 들어, 프라임 에이전트는 영구적인 하위 에이전트를 생성하고 궤적의 후반부에 메시지를 보내며, 다른 프라임 에이전트 세션과 직접 통신할 수 있습니다.

이러한 추상화는 모델 기능의 부트스트래핑에 강력합니다. 프라임 에이전트는 범용 코딩 어시스턴트, 장기적인 자율 평가를 위한 기본 런타임, 그리고 연구 및 자동화된 연구를 위한 협업자로서 효과적으로 작동하도록 구축되었습니다.

프라임 에이전트는 완전히 오픈소스이며 다음 명령어를 통해 설치할 수 있습니다: curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh

프라임 에이전트 에이전트 하네스의 성능은 하네스 설계와 해당 하네스를 중심으로 학습된 모델의 기능 모두에 연결되어 있습니다. 저희는 프라임 에이전트가 최신의 오픈소스 및 클로즈드 최첨단 모델과 함께 즉시 사용할 수 있도록 설계했으며, 또한 최신 세대 모델이 이를 중심으로 학습됨에 따라 추가적인 성능 향상을 제공할 것으로 예상되는 기능 세트도 제공합니다.

핵심적으로 프라임 에이전트는 프로그래밍 방식의 도구 및 하위 에이전트 호출을 중심으로 설계되었습니다. 프라임 에이전트의 모델은 영구적인 IPython 커널을 유일한 도구로 사용합니다. 다른 표준 하네스 기능들은 커널 내의 함수로 호출되며, 여기에는 각각 다른 프라임 에이전트 인스턴스로 구현되는 하위 에이전트도 포함됩니다.

프라임 에이전트의 아키텍처 백그라운드 데몬 및 에이전트 보기. 기본 보기는 다른 코딩 에이전트 하네스와 유사한 텍스트 사용자 인터페이스(TUI)입니다. 기본적으로 에이전트가 수행한 IPython 작업은 간결함을 위해 요약되어 표시되지만, 하네스가 수행한 작업을 보기 위해 확장할 수 있습니다. REPL에서 실행된 하위 에이전트는 사용자 채팅 상자 아래에서도 액세스할 수 있습니다.

프라임 에이전트는 로컬 소켓을 통해 모든 활성 에이전트 세션을 소유하는 백그라운드 데몬을 실행합니다. 기본 에이전트 루프에 영향을 주지 않고 세션에 연결하거나 분리할 수 있습니다. 각 루트 세션 트리는 복구 가능한 워커 프로세스에서 실행됩니다. 워커가 충돌하면 데몬이 세션 JSONL 및 커널 상태 스냅샷에서 이를 복구합니다.

에이전트 보기를 사용하면 데몬에서 다른 활성 세션을 보고 선택할 수 있습니다. 빈 프롬프트에서 왼쪽 화살표 키(←)를 눌러 열 수 있으며, 현재 실행 중인 세션, 데몬이 여전히 활성 상태인 유휴 세션, 현재 메모리에 로드되지 않은 비활성 세션을 나열합니다. 이러한 채팅 중 하나를 즉시 입력하여 상호 작용할 수 있으며, 스페이스바를 누르면 사용자가 다른 에이전트와 채팅할 수 있습니다.

원문 보기
원문 보기 (영어)
Prime Agent: A self-improving RLM agent Today, we are launching Prime Agent , our self-improving coding harness designed around two abstractions, the Recursive Language Model (RLM) [ citation ] and Continual Harness [ citation ]. Modern harness designs were built around the capabilities of earlier generations of models, and they do not reflect what frontier models can do today: fixed tool-calling schemas and context compaction force the model to work around its own scaffolding instead of leveraging it. Static, hand-engineered sub-agents, prompts, skills, and memory are set once at design time and never adapt to what the agent learns while running. We believe that harnesses should instead extrapolate on current model capabilities toward the next frontier of reasoning patterns. Prime Agent is built around this principle through two main abstractions: The Recursive Language Model (RLM) treats context as a variable and subagent delegation as function calls inside a REPL. The persistent REPL gives the model programmatic access to its history, sub-agents, and tools, allowing it to write language model programs as actions over its own context. This design allows the agent to process arbitrarily long sessions without losing access to its own past information stored in variables. Continual Harness treats the harness's own state, abstracted as its prompts, skills, memory, and sub-agents, as something the agent can create, read, update, and delete (CRUD) from its own trajectory. When combined with agent-to-agent communication, this mechanism enables orchestration across sub-agents and even across Prime Agent sessions. For example, Prime Agent can spawn persistent sub-agents, message them later in the trajectory, and communicate directly with a different Prime Agent session. These abstractions are powerful for bootstrapping model capabilities. Prime Agent is built to be effective as a general coding assistant, as a default runtime for long-horizon autonomous evaluation, and as a collaborator for research and autoresearch. Prime Agent is fully open-source , and can be installed via: curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh Prime Agent The performance of agent harnesses are tied to both the design of the harness and the capability of the model trained around the harness. We designed Prime Agent to be immediately usable with modern open and closed frontier models, while also providing a feature set that we expect to provide further performance gains as newer generations of models are trained around it. At its core, Prime Agent is designed around programmatic tool and sub-agent calling. Models in Prime Agent use a persistent IPython kernel as their only tool. Other standard harness features are called as functions in the kernel, including sub-agents, which are each implemented as another prime-agent instance. Prime Agent's Architecture Background Daemon and Agents View. The default view is a text-user interface (TUI) similar to other coding agent harnesses. By default, IPython actions made by the agent are condensed for brevity, but can be expanded to view actions made by the harness. Sub-agents launched in the REPL can also be accessed below the user chatbox. Prime Agent runs a background daemon that owns all live agent sessions over a local socket. You can attach and detach from the session without affecting the underlying agent loop. Each root session tree runs in a recoverable worker process; if a worker crashes, the daemon recovers it from the session JSONL and kernel state snapshot. The Agents View allows you to see and select other live sessions from the daemon. It can be opened by pressing the Left Arrow key (←) on an empty prompt, and lists sessions that are currently running, idle sessions with the daemon still active, and inactive sessions that are currently not loaded in memory. Any of these chats can immediately be entered and interacted with, and pressing space allows users to chat with a session in any state, including steering and queuing of prompts and commands such as /compact . The Agents View is constructed as the central connecting point between agents and subagents, recursively. Any agent is discoverable in an Agents View. Users navigate from an Agents View into an agent's chat, then into the Agents View of its subagents, into a subagent chat, and so on. Because subagents share the same Running-Idle-Inactive state machine as the root agents, they can be removed from memory after 30 minutes of inactivity, and the moment a user or agent addresses any of them, they are reloaded from disk. In highly nested chats, this can save a lot of memory. Session and Context Management. The entire session history of the agent is stored as append-only JSONL files on disk. Each line is a JSON entry, which can include messages, model switches, compaction summaries, or extension entries. Branching, forking, and cloning all happen within the same file by moving the leaf pointer. The full history is always recoverable through /tree . Compaction happens when the context hits a threshold or directly by the agent in the REPL with compact.run() . Compaction is primarily used to clean the main context of the agent, but the full history, including past compactions, can be accessed programmatically in the IPython kernel when needed. The introduction of the REPL requires additional work to manage the IPython state. We asynchronously compact and clean the kernel simultaneously, using a spawned agent to act as a garbage collector. This is necessary to avoid REPL memory built up for each agent. RLM and Programmatic Tool-Calling (PTC) Prime Agent relies on the IPython kernel as its REPL that persists over the session, which it can invoke every turn. On initialization, the kernel pre-imports each skill / tool as a module, including the rlm for recursive programmatic sub-agent calling. The rlm is an asynchronous function, meaning the model can freely invoke and parallelize sub-agent calls in code. Spawning a subagent (e.g. await rlm("sub-task") ) launches a full session with its own model, IPython kernel, session tree, and conversation history. It returns immediately, because all subsequent communication between agents happens through the agent_message.send(...) tool. There are several useful primitives that Prime Agent can choose to launch in this way, such as fanning out sub-agents in parallel, or launching background work. # Parallel fan-out — rlm() returns at task admission with a child handle, # never the child's answer; results arrive as agent_message replies. auth = await rlm ( "Summarize the authentication flow in auth/. Reply to me when done." , name = "auth-expert" ) api = await rlm ( "Summarize the updated HTTP API layer in src/. Reply to me when done." , name = "http-expert" ) # ... continue independent work; each child replies via # agent_message.send(..., receiver_role="parent") when finished ... # Steer or extend a child mid-flight by role + name await agent_message . send ( "Also cover middleware error handling." , receiver_role = "child" , receiver_name = api . name , ) As models continue to improve, new invocation patterns over tool calls and sub-agents will emerge. We expect future generations of models to rely less on hand-holding prompts and more on this kind of direct, programmatic control. Orchestration and Multi-Agent Communication The background daemon manages all live Prime Agent sessions. Prime Agent also enables Agent-to-Agent (A2A) messaging through the daemon, letting any Prime Agent session message any other Prime Agent session using the same mechanism used for messaging persistent sub-agents. This allows for easy orchestration to manage the progress of sub-agent swarms and communication regarding shared resources directly between the affected agents. To prevent undesirable communication across independent sessions, multi-agent communication in Prime Agent is limited to its nuclear family , meaning p