RLM (Recursive Language Models)

RLM (Recursive Language Models)

โ˜… 4 ๐Ÿ”– 2500 saves ๐Ÿ’ฐ Free GitHub

RLM is a general, plug-and-play inference library for Recursive Language Models, an approach in which a language model recursively calls itself, and other models, inside a sandboxed environment to work through very long inputs and complex tasks. Based on the 2025 research paper of the same name, the library supports multiple sandbox backends and has earned more than 5,700 stars on GitHub.

Overview

Instead of stuffing everything into a single context window, a Recursive Language Model treats its input as data to explore programmatically: the model writes code to inspect, chunk and search the material, then delegates sub-problems to further model calls and combines the results. The RLM library wraps that pattern into a reusable inference engine, so you can point it at a very long document or codebase, choose a sandbox for safe code execution, and let the recursion run with the LLM clients you already use. The approach is particularly relevant for deep-research and document-analysis workloads, where the answer depends on details scattered across hundreds of pages and a single pass of attention tends to miss them. Because the recursion is driven by ordinary code, its behaviour is inspectable: you can see what the model chose to read, search or delegate at every step.

Key Features

  • Plug-and-play inference engine for Recursive Language Models
  • Recursive self-calls for inputs far beyond a single context window
  • Multiple sandbox backends for safe, isolated code execution
  • Compatible with popular LLM providers and local models
  • Lightweight design that embeds into existing Python projects
  • Actively developed alongside the underlying research

๐Ÿ’ณ Pricing

Free. RLM is open source under the MIT license; your only costs are the model calls your workloads make.

Who Is It For

Engineers and researchers tackling very long documents, large codebases and deep-research-style tasks where a single prompt, however large the context window, is not enough.

๐Ÿš€ Visit RLM (Recursive Language Models) Official Site

๐Ÿšฉ Report an issue