Configuration
RLMX uses a layered configuration system. Configuration lives in the.rlmx/ directory at your project root.
.rlmx/ directory
Run rlmx init to scaffold the config directory. Choose a template with --template default (general-purpose) or --template code (code analysis).
rlmx.yaml
The primary config file inside .rlmx/. Run rlmx init to scaffold one with inline comments.
Config sections explained
model
Controls which LLM provider and model RLMX uses. Supports any provider available in pi/ai.system
The system prompt sent to the LLM. Defaults to the exact RLM paper prompt, which includes research-backed guidance on decomposition, tool use, and iterative reasoning. Override only if you have a specific need. The system prompt supports a{custom_tools_section} placeholder that RLMX replaces with your custom tool definitions.
tools
Custom Python functions injected into the REPL namespace. Each key is the function name, and the value is the Python source code. Custom tools have access to:context— the loaded context variablellm_query()— make LLM sub-calls- All standard Python builtins
criteria
Quality and format criteria appended to the system prompt. Use this to control output style without touching the core system prompt.context
Controls how files are loaded when--context points to a directory.
budget
Safety limits to prevent runaway costs.cache
Controls provider-level context caching (CAG mode). See Cache Mode for the end-to-end flow and Batch Mode for bulk usage patterns.gemini
Gemini 3 native features. All are opt-in and silently ignored on non-Google providers.output.schema
JSON Schema for structured output. On Google providers, this is enforced via the API. On other providers, RLMX falls back toFINAL() text parsing.
Global settings
Global settings are stored at~/.rlmx/settings.json and managed with rlmx config commands.
Priority order
Settings are resolved highest-priority first:.rlmx/ companion files
The .rlmx/ directory includes companion Markdown files alongside rlmx.yaml. These files let you keep long-form content (prompts, tools, criteria) out of the YAML file.
If both the Markdown file and the corresponding
rlmx.yaml section are present, the Markdown file takes precedence.
TOOLS.md format
Custom tools defined as## heading + Python code block:
Environment variables
API keys can also be set as environment variables instead of usingrlmx config set:
Keys set via
rlmx config set are injected into process.env before any command runs, so they behave identically to environment variables.