# alexzhang13/rlm

General plug-and-play inference library for Recursive Language Models (RLMs), supporting various sandboxes.

Repository: https://github.com/alexzhang13/rlm
Canonical: https://ross.abutalabs.com/products/rlm
Homepage: https://arxiv.org/abs/2512.24601
Language: Python
License: MIT
License Family: permissive
Last push: 2026-08-26T03:48:00+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 90, longevity 18
- inputs: {"age_days": 256, "days_push": 7, "days_rel": 69, "gap_med": 26, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5539, forks 890 (observed 2026-08-28T04:09:22.081636+00:00)

## What it is
A plug-and-play Python inference library for Recursive Language Models (RLMs), a paradigm where an LLM programmatically examines and decomposes arbitrarily long prompts in a sandboxed REPL and recursively calls itself over snippets. It supports multiple sandboxes, API-based and local LLMs, and includes a training environment for post-training RLMs.

## Use cases
- process prompts longer than the model context window
- recursively decompose huge documents with sub-LLM calls
- run long-context inference with a CodeAct-style REPL harness
- swap llm.completion for rlm.completion in existing pipelines
- train custom models around the RLM paradigm
- evaluate long-context scaffolds against compaction and coding agents

## When to choose
- your prompts exceed the model's context window by orders of magnitude
- you want a drop-in inference wrapper that handles near-infinite context
- you need sandboxed code execution with recursive sub-LLM calls
- you want to post-train a model around the RLM harness

## When to avoid
- your prompts comfortably fit within the model context window
- you need low-latency single-shot completions without extra overhead
- you cannot allow code execution in your inference pipeline
- you need a battle-tested production system rather than a research tool

## Facets
- artifact type: library
- maturity: active
- function: llm-inference, agent-framework, sdk
- domain: large-language-models, artificial-intelligence
- platform: python
- tags: recursive-language-models, long-context, inference-scaling, sandboxed-execution, codeact, repl, sub-llm-calls, training-environment, natural-language-processing

## Member repositories
- alexzhang13/rlm (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:22.081636+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:55:42.748838+00:00, confidence not recorded.
  - readme: https://github.com/alexzhang13/rlm (fetched 2026-08-28T04:09:22.081636+00:00, sha 9863c028cfb3)
  - homepage: https://arxiv.org/abs/2512.24601 (fetched 2026-08-29T08:51:04.770977+00:00, sha 95963be6f5b0)
  - site_page: https://info.arxiv.org/about/donate.html (fetched 2026-08-29T08:51:04.780274+00:00, sha cca9c3a11c56)
  - site_page: https://info.arxiv.org/about/ourmembers.html (fetched 2026-08-29T08:51:04.820479+00:00, sha 47cbc55ff1de)
  - site_page: https://info.arxiv.org/about (fetched 2026-08-29T08:51:04.842082+00:00, sha a1f16f915a9a)
  - site_page: https://info.arxiv.org/labs/index.html (fetched 2026-08-29T08:51:04.793781+00:00, sha b14a8d05a0ec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
