Referenced as the source of the Recursive Language Model (RLM) paper that inspired Aleph's architecture for processing documents beyond context window limits.
Supports git-based workspace modes for action tools, enabling multi-repo workflows with repository-scoped file operations and command execution.
Hosts the Aleph project repository for development and contribution.
Supports OpenAI-compatible API backends for sub-query operations in recursive document processing, enabling parallel analysis of large document chunks with any compatible provider.
Distributes the Aleph package as 'aleph-rlm' for installation and dependency management.
Used for testing during development and supported as a test execution backend via the run_tests tool.
Provides a secure execution sandbox for running Python code over loaded document content, enabling custom parsing, analysis, and data extraction from contexts held in RAM.
Supports the Mimo API (via api.xiaomimimo.com) as a sub-query backend option, with mimo-v2-flash model recommended for recursive document analysis tasks.
Mentioned as a target shell profile for configuring environment variables needed for sub-query backends when MCP clients don't reliably pass environment configuration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Alephsearch this log file for 'error' and show me the surrounding lines"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Aleph
Aleph is an MCP server plus companion skill
workflow (/aleph in Claude Code, $aleph in Codex CLI) for recursive LLM work.
It stores working data in a Python process and exposes tools so the model can
retrieve slices, run code, and iterate without repeatedly injecting full files
into prompt context.
Core capabilities:
Load large files and codebases into process memory
Search and inspect targeted ranges (
search_context,peek_context)Run computation over context with
exec_pythonOrchestrate recursive sub-queries and recipe pipelines
Save and restore sessions for long investigations
Design is based on the Recursive Language Model (RLM) architecture.
Quick Start
Install:
Auto-configure your MCP client:
Verify Aleph is reachable in your assistant:
Run the skill flow on a real file:
Expected behavior: Aleph loads the file into process memory, then begins
analysis with tool calls (search_context, peek_context, exec_python)
without requesting pasted raw content.
Common Workloads
Scenario | What Aleph Does |
Large log analysis | Load large logs, trace patterns, correlate events |
Codebase navigation | Search symbols, inspect routes, trace behavior |
Data exploration | Analyze JSON/CSV exports with Python helpers |
Mixed document ingestion | Load PDFs, Word docs, HTML, and compressed logs |
Semantic retrieval | Use semantic search, then zoom with line/char peeks |
Long investigations | Save sessions and resume from memory packs |
Commands
Installing aleph-rlm gives you three commands:
Command | Purpose |
| MCP server (also supports |
| Installer/config helper (also supports |
| Legacy standalone CLI (deprecated) |
How to think about it:
Run
aleph-rlm installonce to configure clients.MCP clients should run
alephas the server command.Use
aleph run(oraleph-rlm run) for terminal-only mode.
MCP Mode
Automatic Setup
To customize workspace scope, backend, docs mode, or Docker settings:
Manual Setup (Any MCP Client)
Use this as a practical default:
Verify MCP Wiring
In your assistant session:
If your client namespaces tools, use mcp__aleph__get_status.
Config File Locations
Client | macOS/Linux | Windows |
Claude Code |
|
|
Claude Desktop |
|
|
Cursor |
|
|
VS Code |
|
|
Codex CLI |
|
|
More per-client setup details are in MCP_SETUP.md.
The /aleph and $aleph Skill
For skill-based usage, configure both:
MCP server configured in the client
Skill prompt installed (
docs/prompts/aleph.md)
Invocation
Client | Skill command | Typical usage |
Claude Code |
|
|
Codex CLI |
|
|
Skill Install Paths
Download docs/prompts/aleph.md and place it at:
Claude Code:
~/.claude/commands/aleph.mdCodex CLI:
~/.codex/skills/aleph/SKILL.md
Windows equivalents:
%USERPROFILE%\.claude\commands\aleph.md%USERPROFILE%\.codex\skills\aleph\SKILL.md
Quick Behavior Check
Use this exact prompt:
Healthy behavior:
Tool call to
load_file(path=...)Context appears in
list_contexts()Follow-up search/peek/exec on that context
Core Workflow Patterns
1) Load File -> Work Immediately
Note: with MCP action tools, absolute paths are safest for load_file.
2) Analyze Raw Text
3) Recipe Pipelines
Recommended sequence:
Example:
4) Sub-Query Batching (Important)
Prefer fewer large sub-query calls over many tiny calls.
Bad: 1000 calls of 1K chars
Good: 5-10 calls of about 100K to 200K chars
5) Save and Resume
CLI Mode (Standalone)
Use this when you want Aleph without MCP integration.
Common Flags
Flag | Description | ||
| Use local CLI tools instead of API provider | ||
`--model claude | codex | gemini` | CLI backend to use |
| Load context from file | ||
| Read context from stdin | ||
| Emit JSON output | ||
| Include full reasoning trace | ||
| Limit loop steps |
Common Environment Variables
Variable | Description |
|
|
| Sub-query timeout in seconds |
| Share MCP session with CLI sub-agents |
| Timeout for CLI calls |
Tool Overview
Core Tools (Always Available)
Category | Tools |
Context |
|
Search |
|
Compute |
|
Reasoning |
|
Runtime Config |
|
Recipes |
|
Action Tools (--enable-actions)
Category | Tools |
Filesystem |
|
Shell |
|
Persistence |
|
Remote MCP |
|
exec_python includes 100+ helpers (search, chunk, lines, extract_*,
sub_query, sub_query_batch, sub_query_map, sub_aleph, Recipe DSL helpers,
and more). Recursion helpers are available inside exec_python, not as top-level
MCP tools.
Swarm Mode (Optional)
Aleph can act as shared memory for multiple agents.
Simple pattern:
Shared KB context:
swarm-<name>-kbTask contexts:
task-<id>-spec,task-<id>-findingsAgent-private contexts:
<agent>-workspace
Example write/read:
Context Isolation and Safety
Aleph enforces strict boundaries to prevent raw context from leaking into the LLM's context window:
System prompt isolation. The default system prompt does not include a raw context preview. The placeholder is replaced with
[OMITTED FOR CONTEXT ISOLATION].get_variable("ctx")Inisolatedpolicy, retrievingctxvia the MCP boundary is blocked with guidance. Intrustedpolicy, it is allowed but still subject to response caps/truncation. Prefer processing data insideexec_pythonand retrieving compact derived results withget_variable.Execution output truncation.
exec_pythonstdout, stderr, and return values are all truncated tomax_output_chars(default 50,000). The MCP tool response is further capped atmax_tool_response_chars(default 10,000). Both limits are configurable.Tool response caps. Every MCP tool response (peek, search, semantic search, get_variable, etc.) is bounded by the same response-size cap.
Deployment Profiles
Set ALEPH_CONTEXT_POLICY to choose a profile:
Profile | Behavior |
| Low friction. Auto memory-pack, session save/load without confirmation. |
| Explicit consent. Requires |
Switch at runtime with configure(context_policy="isolated"). See
CONFIGURATION.md for details.
Safe Usage Pattern
Avoid returning full-context payloads unless necessary. In isolated policy,
get_variable("ctx") is blocked; in trusted policy large raw responses are
still truncated by output caps.
Configuration Quick Reference
Workspace and Safety
Flag/Variable | Purpose | ||
| Root for relative action paths | ||
`--workspace-mode <fixed | git | any>` | Path access policy |
| Require | ||
| Override workspace root | ||
|
| ||
|
| ||
| Max parallel |
Limits
Flag | Default | Purpose |
| 1 GB | Max file read size |
| 100 MB | Max file write size |
| 180 s | Sandbox/command timeout |
| 50,000 chars | Max command output |
| 10,000 chars | MCP tool response cap |
Recursion Budgets
Variable | Default | Purpose |
| 2 | Max |
| 100 | Total RLM steps |
| 300 s | Wall-time cap |
| 100 | Max |
| unset | Optional per-call output cap |
Full configuration details: docs/CONFIGURATION.md
Troubleshooting
Tool not found: ensure Aleph MCP server is running.
Context not found: verify
context_idand checklist_contexts().No search hits: broaden regex or use
semantic_search.rg_searchis slow: install ripgrep (rg).Running out of context: use
summarize_so_far().Session load errors: check file path and memory pack schema.
Documentation
Document | Purpose |
Client-by-client MCP configuration | |
Full flags and environment variables | |
LangGraph integration with RLM-default tool usage | |
Repo-improvement runner with optional LangSmith tracing | |
Skill workflow and tool reference | |
Release history | |
Contributor guide |
Development
References
Zhang, A. L., Kraska, T., Khattab, O. (2025) Recursive Language Models (arXiv:2512.24601)
License
MIT