article research
Recursive language models: abstraction and implementation
Recursive Language Models treat prompts as external variables the model can inspect, decompose, and recursively process through a REPL, enabling context offload and programmatic subcalls. The research paper establishes the paradigm; Prime Agent implements it with a persistent IPython kernel and native subagent sessions, but depth and cost remain bounded.
First-party announcement, documentation, release, or installer.
Paper abstraction
The Recursive Language Models paper treats the prompt or long context as an external variable that a model can inspect and manipulate through a REPL. Instead of consuming the entire input as one fixed forward pass, the model can programmatically select pieces and make recursive subcalls.
The abstraction targets context offload and decomposition. It is a research paradigm, not by itself evidence that any particular product implementation is faster, cheaper, or more accurate on every task.
Reference implementation
The paper's reference implementation demonstrates how a model can use a REPL to examine externalized context and recursively process selected portions. It establishes a concrete mechanism behind the RLM idea rather than only a conceptual label.
That implementation should be read as research support for the abstraction. Prime Agent's runtime and product constraints must still be evaluated from their own code and documentation.
Prime Agent mapping
Prime Agent maps the RLM pattern to a persistent IPython kernel and native child sessions. Python provides the programmatic workspace, while rlm(...) admits subagents with separate context, history, and kernels.
The product mapping also adds session trees, family-scoped messaging, daemon supervision, and configured recursion depth. Those operational details are Prime Agent behavior, not universal properties of the research term.
Depth and cost
Every recursive child is a full model session, so recursion consumes tokens, memory, process capacity, and coordination effort. Prime Agent defaults to a maximum depth of one and requires configuration for deeper nesting.
A depth bound makes cost finite but does not make it small. Use recursion where decomposition justifies an additional session rather than assuming more levels produce a better answer.
What this does not mean
Externalized context and recursive calls do not create unlimited practical memory. The system remains bounded by context budgets, recursion depth, runtime, provider cost, and the quality of the model's decomposition.
The foundational paper also does not serve as a Prime Agent benchmark. It supports the paradigm; product claims require the separate Prime Agent sources cited on this route.