Skip to main content

Quickstart

Five minutes. One query. Any LLM provider you already use.
Research Preview — RLMX is experimental. The RLM algorithm is from a recent paper. Things will change. Tell us on Discord.
1

Install RLMX

npm install -g rlmx
Verify the install:
rlmx --version
RLMX requires Node.js >= 18 and Python 3.10+ (for the REPL subprocess). Make sure both are available on your PATH.
2

Set your API key

RLMX uses Google Gemini by default. Set your API key:
rlmx config set GEMINI_API_KEY your-api-key-here
rlmx config set GEMINI_API_KEY your-key
Settings are stored at ~/.rlmx/settings.json with 0600 permissions.
3

Initialize a project

Navigate to your project directory and scaffold a config:
rlmx init
This creates an rlmx.yaml with sensible defaults and inline comments explaining every option. You can skip this step — RLMX auto-scaffolds on first query if no config exists.
4

Run your first query

Point RLMX at some context and ask a question:
rlmx "How does authentication work?" --context ./src/
RLMX loads your source files into a Python REPL, then iterates — writing Python code to navigate the context, executing it, and refining until it calls FINAL() with the answer.
$ rlmx "How does authentication work?" --context ./src/

Authentication uses JWT tokens issued by the /auth/login endpoint.
The middleware in src/middleware/auth.ts validates tokens on every
request and attaches the decoded user to req.user. Refresh tokens
are stored in HttpOnly cookies with a 7-day expiry.
5

Try different input modes

RLMX handles directories, files, and piped input:
# Directory of docs (recursively loads .md files by default)
rlmx "Summarize the API" --context ./docs/

# Single file
rlmx "What are the key findings?" --context paper.md

# Piped data
cat data.csv | rlmx "Analyze this dataset"

# Custom file extensions
rlmx "Review this code" --context ./src/ --ext .ts,.js,.py

Output modes

ModeFlagDescription
text--output text (default)Plain text answer to stdout
json--output jsonStructured JSON with answer, references, usage stats
stream--output streamJSONL events per iteration, then a final event

What just happened?

Under the hood, RLMX:
  1. Loaded your files into a persistent Python subprocess as the context variable
  2. Sent the LLM a system prompt with metadata about the context (not the content itself)
  3. The LLM wrote Python code to search, filter, and read specific parts of the context
  4. RLMX executed each code block and fed the results back
  5. After a few iterations, the LLM called FINAL() with its answer
This is the RLM algorithm — the LLM navigates your code programmatically instead of having it stuffed into the prompt. It’s cheaper and scales to larger codebases.

Next steps

CLI Reference

Every command and flag documented.

Configuration

Customize model, tools, caching, and budget limits.

Batch Mode

Run hundreds of questions against cached context.

Stuck? Ask on Discord

Real humans. Real answers.