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.
Aleph
Aleph is an MCP (Model Context Protocol) server that enables AI assistants to analyze documents too large for their context window. By implementing a Recursive Language Model (RLM) approach, it allows models to search, explore, and compute over massive datasets without exhausting their token limits.
Key Capabilities
Unlimited Context: Load files as large as your system RAM allows—gigabytes of data accessible via simple queries. The LLM never sees the raw file; it queries a Python process that holds the data in memory.
Navigation Tools: High-performance regex search and line-based navigation.
Compute Sandbox: Execute Python code over loaded content for parsing and analysis.
Evidence Tracking: Automatic citation of source text for grounded answers.
Recursive Reasoning: Spawn sub-agents to process document chunks in parallel.
How "Unlimited Context" Works
Traditional LLMs are limited by their context window (~200K tokens). Aleph sidesteps this entirely:
Python loads the entire file into RAM as a string
The LLM queries it via
search(),peek(),lines(), etc.Only query results (kilobytes) enter the LLM's context—never the full file
Your RAM is the limit, not the model's context window (with a default 1GB safety cap on action tools)
You can load multiple files or entire repos as separate contexts and query them independently.
A 50MB log file? The LLM sees ~1KB of search results. A 2GB database dump? Same—just the slices you ask for.
By default, Aleph sets a 1GB max file size for action tools to avoid accidental overload, but you can raise it with --max-file-size based on your machine.
This cap applies to load_file / read_file; load_context still accepts any size you can supply in-memory.
Installation
After installation, you can automatically configure popular MCP clients:
MCP Server
Run Aleph as an MCP server with:
Use --enable-actions to allow file and command tools.
Integration
Claude Desktop / Cursor / Windsurf
Add Aleph to your mcpServers configuration:
Install the /aleph skill for the RLM workflow prompt:
Then use it like:
Claude Code
To use Aleph with Claude Code, register the MCP server and install the workflow prompt:
Codex CLI
Add to ~/.codex/config.toml:
How It Works
Load: Store a document in external memory via
load_contextorload_file(with--enable-actions).Explore: Search for patterns using
search_contextor view slices withpeek_context.Compute: Run Python scripts over the content in a secure sandbox via
exec_python.Finalize: Generate an answer with linked evidence and citations using
finalize.
Recursion: Handling Very Large Inputs
When content is too large even for slice-based exploration, Aleph supports recursive decomposition:
Chunk the content into manageable pieces
Spawn sub-agents to analyze each chunk
Synthesize findings into a final answer
sub_query can use an API backend (OpenAI-compatible) or spawn a local CLI (Claude, Codex, Aider) - whichever is available.
Sub-query backends
When ALEPH_SUB_QUERY_BACKEND is auto (default), Aleph chooses the first available backend:
API - if
MIMO_API_KEYorOPENAI_API_KEYis availableclaude CLI - if installed
codex CLI - if installed
aider CLI - if installed
Quick setup:
Note: Some MCP clients don't reliably pass
envvars from their config to the server process. Ifsub_queryreports "API key not found" despite your client's MCP settings, add the exports to your shell profile (~/.zshrcor~/.bashrc) and restart your terminal/client.
For a full list of options, see docs/CONFIGURATION.md.
Available Tools
Aleph exposes the full toolset below.
Core exploration
Tool | Description |
| Store text or JSON in external memory. |
| List loaded contexts and metadata. |
| View specific line or character ranges. |
| Perform regex searches with surrounding context. |
| Split content into navigable chunks. |
| Diff two contexts (text or JSON). |
| Run Python code over the loaded content. |
| Retrieve a variable from the exec_python sandbox. |
Reasoning workflow
Tool | Description |
| Structure reasoning for complex problems. |
| Show current session state. |
| Retrieve collected citations. |
| Self-evaluate progress with convergence tracking. |
| Summarize progress on long tasks. |
| Complete with answer and evidence. |
Recursion
Tool | Description |
| Spawn a sub-agent on a content slice. |
Session management
Tool | Description |
| Persist current session to file. |
| Load a saved session from file. |
Recipes and reporting
Tool | Description |
| Load an Alephfile recipe for execution. |
| List loaded recipes and status. |
| Finalize a recipe run and generate a result bundle. |
| Get token-efficiency metrics for a recipe/session. |
| Export a recipe result bundle to a file. |
| Sign evidence bundles for verification. |
Remote MCP orchestration
Tool | Description |
| Register a remote MCP server. |
| List registered remote MCP servers. |
| List tools available on a remote server. |
| Call a tool on a remote MCP server. |
| Close a remote MCP server connection. |
Action tools
Enabled with the
Tool | Description |
| Load a workspace file into a context. |
| File system access (workspace-scoped). |
| Shell execution. |
| Execute test commands (supports optional |
Configuration
For full configuration options (limits, budgets, and backend details), see docs/CONFIGURATION.md.
Changelog
Unreleased
Unlimited context architecture: Clarified that file size is limited by system RAM (with a default 1GB action-tool cap) rather than LLM context windows. Load gigabytes of data and query it with search/peek/lines.
Added
--workspace-modefor action tools (fixed,git,any) to support multi-repo workflows.Added optional
cwdforrun_teststo run tests outside the server’s default working directory.Updated MCP setup docs with multi-repo configuration examples.
Development
See DEVELOPMENT.md for architecture details.
References
Aleph implements the Recursive Language Model (RLM) architecture described in:
Recursive Language Models Zhang, A. L., Kraska, T., & Khattab, O. (2025) arXiv:2512.24601
RLMs treat the input context as an external environment variable rather than part of the prompt. This allows models to programmatically decompose inputs, recursively query themselves over chunks, and synthesize results—processing inputs far beyond their native context window.
License
MIT