AIAny
AI Client2025
Icon for item

Recursive Language Models (RLMs)

Provides a plug-and-play inference engine that lets language models programmatically inspect, decompose, and recursively call themselves to handle very long contexts; supports local and cloud REPL sandboxes, multiple LLM backends, and trajectory logging/visualization.

Introduction

Recursive Language Models (RLMs) change where contextual reasoning happens: instead of forcing a single flat prompt into a model, RLMs let the model treat the context as a manipulable environment and spawn recursive sub-calls to examine or transform parts of that context. This makes it possible to work with effectively unbounded inputs (documents, codebases, chat histories) while keeping each LM call short and focused — at the cost of added orchestration and sandboxing complexity.

What Sets It Apart
  • REPL-based inference model: the library exposes a REPL-like environment where the LM can read and mutate a context variable and launch sub-LM calls; this moves control flow into the inference layer rather than the client.
  • Multi-environment sandboxing: supports non-isolated local execution and several isolated sandboxes (Docker, Modal, Prime, Daytona, e2b) so you can trade off convenience and security depending on the task.
  • Backend-agnostic integration: works with API providers (OpenAI, Anthropic, router platforms) and local runtimes (vLLM), so experiments can run across hosted and on-prem setups.
  • Run metadata & visualizer: optional trajectory logging captures full run configs and sub-call trees, and a simple visualizer helps inspect generated code, sub-calls, and the overall recursion graph for debugging and analysis.
Who it's for — trade-offs and caveats

Great fit if you want to prototype new inference paradigms that break the single-prompt assumption (e.g., long-document QA, multi-step code synthesis, programmatic reasoning) and need tooling to record and inspect recursion traces. It’s also useful for researchers reproducing the RLM paper experiments or integrating RLM-style control flow into research stacks.

Look elsewhere if you need a drop-in production LLM client for untrusted user input without strong isolation: the default non-isolated REPL runs in-process and can expose host resources; for production with untrusted inputs you must use the isolated sandboxes. This repo focuses on inference and orchestration rather than model training or large-scale serving optimizations; expect engineering work to harden, scale, and monitor RLM runs in production.

Where it fits

Positioned between single-call LLM clients and heavier orchestration frameworks: RLMs provide a lightweight programmatic layer for recursive decomposition and are complementary to RAG, tool-augmented agents, and workflow platforms — especially when the task benefits from explicit recursive inspection and sub-calls rather than a single large context.

Information

  • Websitegithub.com
  • AuthorsAlex L. Zhang, Tim Kraska, Omar Khattab
  • Published date2025/12/20

More Items

GitHub
AI Agent2026

Provides a lightweight Python harness that turns LLMs into working agents with tool-use, skills, persistent memory, permission controls and multi-agent coordination. Ships with a CLI/React TUI, 43+ built-in tools, a plugin/skill system and the ohmo personal-agent for chat gateways. Best for developers prototyping agent workflows and multi-agent experiments.

GitHub
AI Model2026

Runs the Bonsai family of quantized LLMs locally (including vision-capable 27B): provides scripts and demo UIs to run 1-bit and ternary Bonsai models on macOS (Metal), Linux/Windows (CUDA/Vulkan/ROCm), or CPU, with long context, tool-calling and an optional Open WebUI agent demo.

GitHub
AI Client2025

Turns Chromium into a local-first AI browser with an embedded assistant that can summarise pages, extract structured data, automate web tasks, and run scheduled agents. Built as an open-source Chromium fork with 53+ built-in browser tools, 40+ app integrations, and support for BYO AI keys or fully local models (Ollama / LM Studio).