# RLM Code — Explain Like I'm 5 Wiki > RLM Code is a Python tool that runs AI agents in a looping read-execute-judge cycle, benchmarks them across environments, and lets you compare results — all from a terminal UI. It implements the Recursive Language Models paper idea: instead of stuffing a giant document into the AI's memory all at once, the AI reads a little piece, writes code to analyze it, and repeats until it has an answer. This is a Grok-Wiki source-grounded repository wiki. Use the complete Markdown link when an agent needs the full repo context. ## Context Links - [Complete Markdown wiki](https://grok-wiki.com/public/wiki/superagenticai-rlm-code-8e144acefc91/llms-full.txt) - [Complete Markdown alias](https://grok-wiki.com/public/wiki/superagenticai-rlm-code-8e144acefc91.md) - [Human interactive wiki](https://grok-wiki.com/public/wiki/superagenticai-rlm-code-8e144acefc91) - [GitHub repository](https://github.com/SuperagenticAI/rlm-code) ## Repository - Repository: SuperagenticAI/rlm-code - Generated: 2026-05-22T02:09:16.448Z - Updated: 2026-05-22T02:14:08.224Z - Runtime: Claude Code - Format: Explain Like I'm 5 - Pages: 6 ## Pages - [Explain It Simply — What Is RLM Code?](https://grok-wiki.com/public/wiki/superagenticai-rlm-code-8e144acefc91/pages/01-explain-it-simply-what-is-rlm-code.md): RLM Code in plain language: what problem it solves, the one core idea to keep, and what you will find when you open the repo for the first time. - [The Loop — How an Agent Actually Works Here](https://grok-wiki.com/public/wiki/superagenticai-rlm-code-8e144acefc91/pages/02-the-loop-how-an-agent-actually-works-here.md): Step by step: how RLMRunner turns one user prompt into many rounds of context → action proposal → sandbox execution → observation → reward → memory update, and when it stops. - [Environments & Sandboxes — Where Code Actually Runs](https://grok-wiki.com/public/wiki/superagenticai-rlm-code-8e144acefc91/pages/03-environments-sandboxes-where-code-actually-runs.md): The three built-in environments (DSPy coding, Generic, TraceAnalysis, PureRLM), what each one does, and the sandbox runtimes (Docker, Monty, mock) that execute untrusted code safely. - [Framework Adapters — Plug In Your Favourite AI Stack](https://grok-wiki.com/public/wiki/superagenticai-rlm-code-8e144acefc91/pages/04-framework-adapters-plug-in-your-favourite-ai-stack.md): How rlm_code/rlm/frameworks/ lets DSPy, Google ADK, Pydantic-AI, and DeepAgents all plug into the same RLM loop through a shared base class and a framework registry, without changing the core runner. - [Benchmarks, Leaderboard & Observability — Did It Work?](https://grok-wiki.com/public/wiki/superagenticai-rlm-code-8e144acefc91/pages/05-benchmarks-leaderboard-observability-did-it-work.md): How RLMBenchmarkCase definitions drive automated runs, how scores flow into the leaderboard, how trajectory replay lets you re-watch any session, and how observability sinks (OTel-shaped JSONL, trace analysis) record what happened. - [The One Map to Keep — Core Idea, Key Files, What to Read Next](https://grok-wiki.com/public/wiki/superagenticai-rlm-code-8e144acefc91/pages/06-the-one-map-to-keep-core-idea-key-files-what-to-read-next.md): A plain-English recap of the whole system: the single analogy that holds, the five files that matter most, the two constraints every newcomer hits, and where to go from here. ## Source Files - `docs/core/environments.md` - `docs/core/execution-patterns.md` - `pyproject.toml` - `README.md` - `rlm_code/__main__.py` - `rlm_code/commands/run_command.py` - `rlm_code/commands/slash_commands.py` - `rlm_code/execution/engine.py` - `rlm_code/execution/sandbox.py` - `rlm_code/main.py` - `rlm_code/models/providers/registry.py` - `rlm_code/rlm/action_planner.py` - `rlm_code/rlm/benchmark_manager.py` - `rlm_code/rlm/benchmarks.py` - `rlm_code/rlm/context_store.py` - `rlm_code/rlm/docker_interpreter.py` - `rlm_code/rlm/environments.py` - `rlm_code/rlm/events.py` - `rlm_code/rlm/frameworks/base.py` - `rlm_code/rlm/frameworks/deepagents_adapter.py` - `rlm_code/rlm/frameworks/dspy_rlm_adapter.py` - `rlm_code/rlm/frameworks/google_adk_adapter.py` - `rlm_code/rlm/frameworks/pydantic_ai_adapter.py` - `rlm_code/rlm/frameworks/registry.py` - `rlm_code/rlm/leaderboard.py` - `rlm_code/rlm/memory_compaction.py` - `rlm_code/rlm/monty_interpreter.py` - `rlm_code/rlm/observability_sinks.py` - `rlm_code/rlm/observability.py` - `rlm_code/rlm/pure_rlm_environment.py` - `rlm_code/rlm/runner.py` - `rlm_code/rlm/session_replay.py` - `rlm_code/rlm/termination.py` - `rlm_code/rlm/trajectory.py` - `rlm_code/sandbox/runtimes.py` - `rlm_code/traces/store.py`