alexzhang13

    alexzhang13/rlm

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

    backend
    Python
    MIT
    5.7K stars
    918 forks
    54 GitHub watchers
    Updated Nov 5, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    No releases in the last 90 days; the most recent was 133 days ago, with 22 contributors on GitHub.

    Peaked at #48 in the weekly ranking the week of Apr 19, its best in the past year.

    Use Cases & Benefits

    • Provides a plug-and-play inference engine for Recursive Language Models enabling recursive, programmatic decomposition of language model inputs.
    • Supports multiple sandboxed REPL environments for secure, isolated code execution alongside standard API and local LLMs.
    • Use for experimenting with recursive language model inference to handle near-infinite context lengths in research or development.
    • Use for securely running generated code in isolated cloud sandboxes like Modal or Prime Intellect to mitigate security risks.
    • Use for logging and visualizing recursive call trajectories to debug and analyze complex multi-step language model workflows.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    MIT

    Permissive: commercial use, modification and redistribution are allowed with attribution.

    Community files

    • README: present
    • Contributing guide: present

    Watch-outs

    No watch-outs from GStars' checks.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    Recursive Language Models (RLMs) are a task-agnostic inference paradigm for language models (LMs) to handle near-infinite length contexts by enabling the LM to programmatically examine, decompose, and recursively call itself over its input. RLMs replace the canonical llm.completion(prompt, model) call with a rlm.completion(prompt, model) call. RLMs offload the context as a variable in a REPL environment that the LM can interact with and launch sub-LM calls inside of.

    This repository provides an extensible inference engine for using RLMs around standard API-based and local LLMs. The initial experiments and idea were proposed in a blogpost in 2025, with expanded results in an arXiv preprint.

    We support two types of REPL environments -- isolated, and non-isolated. Non-isolated environments (default) run code execution on the same machine as the RLM (e.g. through exec), which is pretty reasonable for some local low-risk tasks, like simple benchmarking, but can be problematic if the prompts or tool calls can interact with malicious users. Fully isolated environments use cloud-based sandboxes (e.g. Prime Sandboxes, Modal Sandboxes) to run code generated by the RLM, ensuring complete isolation from the host process. Environments can be added, but we natively support the following: local (default), docker, modal, prime, daytona, e2b.

    Excerpt from the alexzhang13/rlm README on GitHub (MIT license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Forks

    918+43

    Open issues

    92+8

    Compared with peers in Backend

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 1, by 7-day star growth

    alexzhang13/rlm compared with Backend repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    anthropics/skills187.8K+2.9K15—
    DuarteSantos8/openGym19.7K+2.4K602 days ago
    shiyu-coder/Kronos47.0K+2.3K16—
    NationalSecurityAgency/ghidra98.2K+2.3K6414 days ago
    microsoft/VibeVoice56.0K+1.1K29—
    alexzhang13/rlm5.7K—36133 days ago
    Category median56.0K+2.3K29—

    Discover Repositories

    Search across tracked repositories by name or description