### Quickstart Python Example Source: https://github.com/hmbown/aleph/blob/main/docs/langgraph-rlm-default.md A Python script demonstrating how to build and invoke the RLM default graph with Aleph MCP. It shows loading content and analyzing it. ```python import asyncio from aleph.integrations.langgraph_rlm import ( AlephRLMConfig, build_rlm_default_graph, invoke_rlm, ) async def main() -> None: cfg = AlephRLMConfig( transport="stdio", command="aleph", model="openai:gpt-4.1-mini", ) graph = await build_rlm_default_graph(cfg) await invoke_rlm( graph, "Load this content with context_id='doc':\n```text\n...big text...\n```", thread_id="demo", config=cfg, ) result = await invoke_rlm( graph, "Analyze recurring errors and cite evidence.", thread_id="demo", config=cfg, ) print(result) asyncio.run(main()) ``` -------------------------------- ### Install Kimi Skill (User-level) Source: https://github.com/hmbown/aleph/blob/main/MCP_SETUP.md Install the Aleph skill for Kimi CLI at the user level on macOS/Linux. This is the recommended installation method. ```bash mkdir -p ~/.config/agents/skills/aleph cp "$(python -c "import aleph; print(aleph.__path__[0])")/../docs/prompts/aleph.md" \ ~/.config/agents/skills/aleph/SKILL.md ``` -------------------------------- ### Install Kimi Skill (Project-level) Source: https://github.com/hmbown/aleph/blob/main/MCP_SETUP.md Install the Aleph skill for Kimi CLI at the project level. This installs the skill within the current project's directory. ```bash mkdir -p .agents/skills/aleph cp "$(python -c "import aleph; print(aleph.__path__[0])")/../docs/prompts/aleph.md" \ .agents/skills/aleph/SKILL.md ``` -------------------------------- ### Run Example Script Source: https://github.com/hmbown/aleph/blob/main/docs/langgraph-rlm-default.md Execute the included example script to find recurring authentication failures. ```bash python examples/langgraph_rlm_default.py --query "Find recurring auth failures" ``` -------------------------------- ### Install Cursor MCP for Workspace Modes Source: https://github.com/hmbown/aleph/blob/main/README.md Instructions for installing Cursor MCP, differentiating between global and project-specific installations for workspace modes. ```bash aleph-rlm install cursor alep h-rlm install cursor-project ``` -------------------------------- ### Install llama.cpp Source: https://github.com/hmbown/aleph/blob/main/README.md Install llama.cpp using package managers for macOS or Windows. ```bash # Install llama.cpp brew install llama.cpp # Mac winget install ggml.LlamaCpp # Windows ``` -------------------------------- ### Install Aleph in Development Mode Source: https://github.com/hmbown/aleph/blob/main/DEVELOPMENT.md Clone the repository and install Aleph with development and MCP extras. Optional extras for documentation and observability are also listed. ```bash git clone https://github.com/Hmbown/aleph.git cd aleph pip install -e ".[dev,mcp]" # Optional extras: # .[docs] -> MarkItDown-backed document conversion # .[observability] -> OpenTelemetry spans ``` -------------------------------- ### Run Aleph-RLM Automatic Installer Source: https://github.com/hmbown/aleph/blob/main/docs/prompts/install-aleph.md Executes the Aleph-RLM automatic installer to detect and configure the environment. This is the primary command for initial setup. ```bash aleph-rlm install ``` -------------------------------- ### Clone and Install Aleph with Development Dependencies Source: https://github.com/hmbown/aleph/blob/main/README.md Clone the Aleph repository and install it with development and MCP dependencies. Optional extras for documentation and observability can also be installed. ```bash git clone https://github.com/Hmbown/aleph.git cd aleph pip install -e "[dev,mcp]" # Optional extras: # .[docs] -> MarkItDown-backed document conversion # .[observability] -> OpenTelemetry spans ``` -------------------------------- ### Start llama.cpp Server Source: https://github.com/hmbown/aleph/blob/main/README.md Start the llama.cpp server with a specified GGUF model, context size, and GPU layers. The server will listen on port 8080. ```bash # Start the server with your model llama-server -m /path/to/model.gguf -c 16384 -ngl 99 --port 8080 ``` -------------------------------- ### Install Aleph with Profiles Source: https://github.com/hmbown/aleph/blob/main/docs/CONFIGURATION.md Installs Aleph and allows selection of a sub-query profile. Use `--profile` to specify a backend like claude, codex, or portable. ```bash aleph-rlm install alep h-rlm install --profile claude alep h-rlm install --profile codex alep h-rlm install --profile portable ``` -------------------------------- ### Quick Start MCP Server Configuration Source: https://github.com/hmbown/aleph/blob/main/MCP_SETUP.md Enables all action tools, any git repo access, and concise tool descriptions for maximum capability without configuring workspace roots. ```json { "mcpServers": { "aleph": { "command": "aleph", "args": ["--enable-actions", "--workspace-mode", "any", "--tool-docs", "concise"] } } } ``` -------------------------------- ### Install and Test Aleph Project Source: https://github.com/hmbown/aleph/blob/main/AGENTS.md Installs the Aleph project with development and MCP dependencies, runs pytest for testing, and checks code with ruff. ```bash pip install -e ".[dev,mcp]" pytest tests/ -v # ~426 tests, ~5s ruff check aleph/ tests/ # linter ``` -------------------------------- ### REPL Example for RLM with GPT-5 Source: https://github.com/hmbown/aleph/blob/main/docs/2512.24601v1.txt This example demonstrates how to execute Python code within a REPL environment for RLM with GPT-5. It shows how to chunk context and query an LLM for specific information. ```repl chunk = context[:10000] answer = llm_query(f"What is the magic number in the context? Here is the chunk: {chunk}") print(answer) ``` -------------------------------- ### Configure Aleph for Automatic llama.cpp Server Start Source: https://github.com/hmbown/aleph/blob/main/README.md Configure Aleph to automatically start the llama.cpp server by setting environment variables for the provider, model path, and context size. ```bash export ALEPH_PROVIDER=llamacpp export ALEPH_LLAMACPP_MODEL=/path/to/model.gguf export ALEPH_LLAMACPP_CTX=16384 export ALEPH_MODEL=local aleph ``` -------------------------------- ### Start Aleph MCP Server Source: https://github.com/hmbown/aleph/blob/main/docs/langgraph-rlm-default.md Start the Aleph MCP server using the default stdio transport. Alternatively, use an existing HTTP stream. ```bash aleph ``` -------------------------------- ### Install Dependencies Source: https://github.com/hmbown/aleph/blob/main/docs/langgraph-rlm-default.md Install the necessary Python packages for Aleph RLM integration with LangGraph. ```bash pip install "aleph-rlm[mcp]" pip install langchain langgraph langchain-mcp-adapters langchain-openai langsmith ``` -------------------------------- ### Start llama.cpp Server Manually Source: https://github.com/hmbown/aleph/blob/main/docs/CONFIGURATION.md Manually start the llama.cpp server with specified model and context size. This option requires you to manage the server process. ```bash llama-server -m ./models/qwen3.5-9b-q8_0.gguf -c 16384 -ngl 99 --port 8080 ``` -------------------------------- ### Install Cursor MCP Project Source: https://github.com/hmbown/aleph/blob/main/MCP_SETUP.md Installs the project-specific MCP configuration for Cursor, scoping tools to the opened folder. ```bash # Project (.cursor/mcp.json in cwd): fixed root = opened folder cd /path/to/your-repo alep h-rlm install cursor-project --profile portable ``` -------------------------------- ### Install Aleph RLM with a Profile Source: https://github.com/hmbown/aleph/blob/main/README.md Installs Aleph RLM and configures a specific sub-query profile. Use this to set up recursive reasoning backends. ```bash aleph-rlm install claude-code --profile claude alep h-rlm configure --profile codex # overwrite existing config ``` -------------------------------- ### Load Workspace Manifest Example Source: https://github.com/hmbown/aleph/blob/main/plugins/aleph/skills/aleph/SKILL.md Use `load_workspace_manifest` for large repositories or codebases. It's recommended to use this over reading files individually. ```text load_workspace_manifest(paths=["src", "tests"], context_id="repo") rg_search( pattern="FastAPI|APIRouter|router\.", paths=["src", "tests"], load_context_id="routes" ) load_file(path="pyproject.toml", context_id="pyproject") ``` -------------------------------- ### Install Aleph Skills from Package Source: https://github.com/hmbown/aleph/blob/main/docs/prompts/install-aleph.md Copies the Aleph skill definition file (aleph.md) from the installed package to the appropriate skill directory for Codex CLI or Kimi CLI. This is an alternative to downloading the file manually. ```bash # macOS/Linux mkdir -p ~/.codex/skills/aleph cp "$(python -c "import aleph; print(aleph.__path__[0])")/../docs/prompts/aleph.md" ~/.codex/skills/aleph/SKILL.md # Kimi CLI (user-level) mkdir -p ~/.config/agents/skills/aleph cp "$(python -c "import aleph; print(aleph.__path__[0])")/../docs/prompts/aleph.md" ~/.config/agents/skills/aleph/SKILL.md ``` -------------------------------- ### Install Cursor MCP Global Source: https://github.com/hmbown/aleph/blob/main/MCP_SETUP.md Installs the global MCP configuration for Cursor, suitable for broad workspace usage. ```bash # Global (~/.cursor/mcp.json): broad workspace (--workspace-mode any) alep h-rlm install cursor --profile portable ``` -------------------------------- ### Aleph RLM Install Commands Source: https://github.com/hmbown/aleph/blob/main/MCP_SETUP.md Commands for installing Aleph with different sub-query profiles. Recommended profiles include 'claude', 'codex', and 'portable'. ```bash aleph-rlm install ``` ```bash aleph-rlm install --profile claude ``` ```bash aleph-rlm install --profile codex ``` ```bash aleph-rlm install --profile portable ``` -------------------------------- ### Aleph Install Check Script Source: https://github.com/hmbown/aleph/blob/main/docs/superpowers/specs/2026-04-10-claude-code-plugin-design.md A bash script to check if the 'aleph' command is available in the system's PATH. If not found, it prints installation guidance. If found, it prints the installed Aleph package version. ```bash python3 -c "import aleph; print(aleph.__version__)" ``` -------------------------------- ### Run Aleph-RLM Installer with Profile Source: https://github.com/hmbown/aleph/blob/main/docs/prompts/install-aleph.md Installs Aleph-RLM using a specific profile. Use 'claude' for nested Claude sub-queries, 'codex' for a validated shared-session path, or 'portable' to defer backend pinning. ```bash aleph-rlm install --profile claude ``` ```bash aleph-rlm install --profile codex ``` ```bash aleph-rlm install --profile portable ``` -------------------------------- ### Aleph-RLM CLI Entry Point Source: https://github.com/hmbown/aleph/blob/main/README.md The command for the installer and CLI, used for managing MCP clients and running queries or interactive sessions. ```text aleph-rlm ``` -------------------------------- ### Load Single File Example Source: https://github.com/hmbown/aleph/blob/main/plugins/aleph/skills/aleph/SKILL.md Use `load_file` for single large files. Follow up with `search_context` to find relevant information and `peek_context` to inspect specific ranges. ```text load_file(path="/absolute/path/to/large.log", context_id="log") search_context(pattern="ERROR|WARN", context_id="log") peek_context(context_id="log", start=1, end=60, unit="lines") ``` -------------------------------- ### Run MCP Server Locally Source: https://github.com/hmbown/aleph/blob/main/DEVELOPMENT.md Start the MCP server with actions enabled but in read-only mode. Tool documentation is set to concise. ```bash aleph --enable-actions --action-policy read-only --tool-docs concise ``` -------------------------------- ### Install Aleph for Development Source: https://github.com/hmbown/aleph/blob/main/CLAUDE.md Installs the Aleph package in development mode, including dependencies for development and MCP. Requires Python 3.10+. ```bash pip install -e ".[dev,mcp]" ``` -------------------------------- ### Search documents for specific information Source: https://github.com/hmbown/aleph/blob/main/docs/2512.24601v1.txt This example shows how to use the `SEARCH` function to query documents for information on a given topic. The query should be a string representing the search term. ```text SEARCH(machine learning) ``` -------------------------------- ### Repo Improver Runner Setup Source: https://github.com/hmbown/aleph/blob/main/docs/langgraph-rlm-default.md Configure environment variables for LangSmith tracing and API keys to run the repo-focused improver script. ```bash export LANGSMITH_TRACING=true export LANGSMITH_API_KEY= export LANGSMITH_PROJECT=aleph-rlm export OPENAI_API_KEY= ``` -------------------------------- ### Explicit Stdio Configuration Source: https://github.com/hmbown/aleph/blob/main/docs/langgraph-rlm-default.md Example of explicitly configuring the AlephRLMConfig for stdio transport. ```python cfg = AlephRLMConfig( transport="stdio", command="aleph", model="openai:gpt-4.1-mini", ) ``` -------------------------------- ### Install Aleph Skill for Codex (Windows PowerShell) Source: https://github.com/hmbown/aleph/blob/main/docs/openai.md Installs the Aleph skill for Codex on Windows using PowerShell. This involves creating the directory and copying the skill file. Remember to restart the Codex CLI. ```powershell New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.codex\skills\aleph" $alephPath = python -c "import aleph; print(aleph.__path__[0])" Copy-Item "$alephPath\..\docs\prompts\aleph.md" "$env:USERPROFILE\.codex\skills\aleph\SKILL.md" ``` -------------------------------- ### Install Aleph Skill for Codex (macOS/Linux) Source: https://github.com/hmbown/aleph/blob/main/docs/openai.md Installs the Aleph skill for Codex on macOS and Linux by copying the skill file to the appropriate directory. Requires restarting the Codex CLI. ```bash mkdir -p ~/.codex/skills/aleph cp "$(python -c "import aleph; print(aleph.__path__[0])")/../docs/prompts/aleph.md" ~/.codex/skills/aleph/SKILL.md ``` -------------------------------- ### Configure All-Claude Setup (macOS/Linux) Source: https://github.com/hmbown/aleph/blob/main/docs/prompts/install-aleph.md Sets environment variables on macOS/Linux to configure Aleph for an all-Claude setup, overriding the default Codex-backed nested path. This specifies the backend, model, effort, and session sharing. ```bash export ALEPH_SUB_QUERY_BACKEND=claude export ALEPH_SUB_QUERY_CLAUDE_MODEL=opus export ALEPH_SUB_QUERY_CLAUDE_EFFORT=low export ALEPH_SUB_QUERY_SHARE_SESSION=true ``` -------------------------------- ### Compile and Run DSL Recipe Code with Aleph Source: https://github.com/hmbown/aleph/blob/main/docs/prompts/aleph.md Build and execute recipes using Aleph's Domain Specific Language (DSL). This example demonstrates chaining operations like search, map_sub_query, aggregate, and finalize. ```python run_recipe_code( context_id="doc", code=""" recipe = ( Recipe(context_id='doc', max_sub_queries=5) .search('ERROR|WARN', max_results=10) .map_sub_query('Root cause?', context_field='context') .aggregate('Synthesize causes') .finalize() ) """ ) ``` -------------------------------- ### Download GGUF Model Source: https://github.com/hmbown/aleph/blob/main/docs/CONFIGURATION.md Download a GGUF model file from Hugging Face using the huggingface-cli. Example shows downloading Qwen 3.5 9B Q8_0. ```bash # Example: Qwen 3.5 9B Q8_0 (~9 GB) huggingface-cli download Qwen/Qwen3.5-9B-GGUF qwen3.5-9b-q8_0.gguf --local-dir ./models ``` -------------------------------- ### Configure Sub-Query Backend via CLI Flags Source: https://github.com/hmbown/aleph/blob/main/docs/CONFIGURATION.md Use CLI flags to configure sub-query settings before the MCP server starts. Flags include backend, timeout, and session sharing. ```bash aleph --sub-query-backend claude alep h --sub-query-timeout 90 alep h --sub-query-share-session true alep h --sub-query-claude-model opus --sub-query-claude-effort low alep h --sub-query-codex-model gpt-5.4 --sub-query-codex-reasoning-effort low # Combined alep h --sub-query-backend codex --sub-query-timeout 120 --sub-query-share-session false ``` -------------------------------- ### Install Aleph RLM and MCP Source: https://github.com/hmbown/aleph/blob/main/README.md Install the Aleph RLM package with MCP support and set up a specific profile. Verify the installation with the doctor command. ```bash pip install "aleph-rlm[mcp]" alep h-rlm install --profile claude # or: codex, portable, api alep h-rlm doctor # verify everything is wired up ``` -------------------------------- ### Verify Aleph Installation Source: https://github.com/hmbown/aleph/blob/main/docs/prompts/install-aleph.md Run the 'aleph-rlm doctor' command to check if the Aleph installation is successful and all components are functioning correctly. This is a crucial step after installation. ```bash aleph-rlm doctor ``` -------------------------------- ### Runtime Configuration with REPL Helpers Source: https://github.com/hmbown/aleph/blob/main/docs/CONFIGURATION.md Use REPL helper functions to set the sub-query backend and retrieve current configuration. ```python set_backend("gemini") get_config() ``` -------------------------------- ### Install Aleph MCP for Codex CLI Source: https://github.com/hmbown/aleph/blob/main/docs/openai.md Installs the necessary Aleph package for Codex MCP server integration. This is the preferred method for automatic installation. ```bash pip install "aleph-rlm[mcp]" aleph-rlm install codex ``` -------------------------------- ### Configure LM Studio Local Backend Source: https://github.com/hmbown/aleph/blob/main/docs/CONFIGURATION.md Set API key (any non-empty value), URL, and model for a local LM Studio server. Ensure the LM Studio server is running. ```bash export ALEPH_SUB_QUERY_API_KEY=lm-studio # any non-empty value export ALEPH_SUB_QUERY_URL=http://localhost:1234/v1 export ALEPH_SUB_QUERY_MODEL=local-model ``` -------------------------------- ### Enable Actions and Concise Tool Docs Source: https://github.com/hmbown/aleph/blob/main/docs/CONFIGURATION.md Enables action tools for file/command access and uses concise tool documentation. ```bash aleph --enable-actions --tool-docs concise ``` -------------------------------- ### Check and Install Aleph-RLM Source: https://github.com/hmbown/aleph/blob/main/docs/prompts/install-aleph.md Checks if the 'aleph-rlm' package is installed and installs it with the 'mcp' extra if it's not found. Use this to ensure the core Aleph package is available. ```bash pip show aleph-rlm || pip install "aleph-rlm[mcp]" ``` -------------------------------- ### Claude Code Plugin Installation Source: https://github.com/hmbown/aleph/blob/main/plugins/aleph/README.md Install the Aleph plugin for Claude Code. Add it as a local marketplace and then install, or load it directly for a single session using the --plugin-dir flag. ```bash # From the repo root — add as a local marketplace, then install claude plugin marketplace add ./plugins/aleph claude plugin install aleph # Or load directly for a single session claude --plugin-dir ./plugins/aleph ``` -------------------------------- ### Configure Ollama Local Backend Source: https://github.com/hmbown/aleph/blob/main/docs/CONFIGURATION.md Set API key (any non-empty value), URL, and model for a local Ollama server. Ensure the Ollama server is running. ```bash export ALEPH_SUB_QUERY_API_KEY=ollama # any non-empty value export ALEPH_SUB_QUERY_URL=http://localhost:11434/v1 export ALEPH_SUB_QUERY_MODEL=llama3.2 ``` -------------------------------- ### Configure Groq Backend Source: https://github.com/hmbown/aleph/blob/main/docs/CONFIGURATION.md Set API key, URL, and model for Groq's fast inference. Use Groq's specific API endpoint. ```bash export ALEPH_SUB_QUERY_API_KEY=gsk-... export ALEPH_SUB_QUERY_URL=https://api.groq.com/openai/v1 export ALEPH_SUB_QUERY_MODEL=llama-3.3-70b-versatile ``` -------------------------------- ### Install Codex Skill (Windows) Source: https://github.com/hmbown/aleph/blob/main/MCP_SETUP.md Install the Aleph skill for Codex on Windows using PowerShell. This enables the $aleph command in Codex. ```powershell # Windows (PowerShell) New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.codex\skills\aleph" $alephPath = python -c "import aleph; print(aleph.__path__[0])" Copy-Item "$alephPath\..\docs\prompts\aleph.md" "$env:USERPROFILE\.codex\skills\aleph\SKILL.md" ``` -------------------------------- ### Install Claude Code MCP Auto-discovery Source: https://github.com/hmbown/aleph/blob/main/MCP_SETUP.md Installs the Claude Code MCP skill using auto-discovery, enabling the Aleph command. ```bash aleph-rlm install claude-code # or with a sub-query profile alep h-rlm install claude-code --profile claude ``` -------------------------------- ### Troubleshoot Aleph Installation Source: https://github.com/hmbown/aleph/blob/main/docs/openai.md Reinstalls the Aleph MCP package if the 'aleph' command is not found. This ensures the necessary components are correctly installed. ```bash pip install "aleph-rlm[mcp]" ``` -------------------------------- ### Aleph Load Phase: Workspace Manifest and Search Source: https://github.com/hmbown/aleph/blob/main/docs/superpowers/specs/2026-04-10-claude-code-plugin-design.md This snippet demonstrates the initial loading phase for repository-scale analysis using Aleph's tooling. It shows how to load a workspace manifest and perform a regex search within specified paths. ```text load_workspace_manifest(paths=["src", "tests"], context_id="repo") rg_search(pattern="FastAPI|APIRouter|router\.", paths=["src", "tests"], load_context_id="routes") load_file(path="pyproject.toml", context_id="pyproject") ``` -------------------------------- ### Sub-Query Backend Selection Logic Source: https://github.com/hmbown/aleph/blob/main/DEVELOPMENT.md Illustrates the precedence for selecting a backend for sub-queries, from explicit configuration to environment variables and CLI fallback. ```python # Backend selection precedence: # 1. SubQueryConfig.backend when it is set to a concrete backend # 2. ALEPH_SUB_QUERY_BACKEND env var (explicit override) # 3. codex CLI (if installed) -- only auto-selected CLI # 4. API fallback # claude, gemini, and kimi are available only when explicitly selected. ``` -------------------------------- ### Install Codex Skill (macOS/Linux) Source: https://github.com/hmbown/aleph/blob/main/MCP_SETUP.md Install the Aleph skill for Codex on macOS or Linux using a bash script. This enables the $aleph command in Codex. ```bash # macOS / Linux mkdir -p ~/.codex/skills/aleph cp "$(python -c "import aleph; print(aleph.__path__[0])")/../docs/prompts/aleph.md" \ ~/.codex/skills/aleph/SKILL.md ``` -------------------------------- ### REPL Environment - Peeking at Context Source: https://github.com/hmbown/aleph/blob/main/docs/2512.24601v1.txt This Python snippet demonstrates how to use the REPL environment to view the first 10000 characters of a 'context' variable. This is useful for initial context analysis. ```python chunk = context[:10000] print(f"First 10000 characters of context: {{chunk}}") ``` -------------------------------- ### Run Aleph with Action Tools (Read-Only) Source: https://github.com/hmbown/aleph/blob/main/README.md Safest default command for using action tools on a real repository, enabling actions in read-only mode. ```bash aleph --enable-actions --action-policy read-only ``` -------------------------------- ### Install Claude Code Skill (macOS/Linux) Source: https://github.com/hmbown/aleph/blob/main/MCP_SETUP.md Copies the Aleph prompt file to the Claude commands directory on macOS or Linux. ```bash # macOS / Linux mkdir -p ~/.claude/commands cp "$(python -c "import aleph; print(aleph.__path__[0])")/../docs/prompts/aleph.md" \ ~/.claude/commands/aleph.md ``` -------------------------------- ### Full Tool Documentation Source: https://github.com/hmbown/aleph/blob/main/docs/CONFIGURATION.md Enables the display of full tool documentation, which includes a larger MCP tool list payload. ```bash aleph --tool-docs full ``` -------------------------------- ### Repo Improver Dry-run Source: https://github.com/hmbown/aleph/blob/main/docs/langgraph-rlm-default.md Perform a dry-run of the repo improver script to validate setup without making model calls. ```bash python examples/langgraph_rlm_repo_improver.py --dry-run ``` -------------------------------- ### Configure Sub-Query API Backends Source: https://github.com/hmbown/aleph/blob/main/MCP_SETUP.md Set environment variables to configure the sub-query backend to use OpenAI, Groq, or a local LLM server like Ollama. Ensure the API key, URL, and model name are correctly specified for your chosen service. ```bash # OpenAI export ALEPH_SUB_QUERY_API_KEY=sk-... export ALEPH_SUB_QUERY_MODEL=your-model-name # Groq (fast inference) export ALEPH_SUB_QUERY_API_KEY=gsk_... export ALEPH_SUB_QUERY_URL=https://api.groq.com/openai/v1 export ALEPH_SUB_QUERY_MODEL=llama-3.3-70b-versatile # Local LLM (Ollama, LM Studio, etc.) # Make sure your local server is running and the model is available. export ALEPH_SUB_QUERY_API_KEY=ollama # any non-empty value export ALEPH_SUB_QUERY_URL=http://localhost:11434/v1 export ALEPH_SUB_QUERY_MODEL=llama3.2 ``` -------------------------------- ### Verify Aleph Availability in MCP Client Source: https://github.com/hmbown/aleph/blob/main/README.md After installation, restart your MCP client and use these commands to confirm Aleph is accessible and functional. ```text get_status() list_contexts() ``` -------------------------------- ### Runtime Configuration with MCP Tool Source: https://github.com/hmbown/aleph/blob/main/docs/CONFIGURATION.md Configure sub-query settings at runtime using the MCP tool. Supports setting backend, timeout, and session sharing. ```python mcp__aleph__configure(sub_query_backend="claude") mcp__aleph__configure(sub_query_timeout=90, sub_query_share_session=True) ``` -------------------------------- ### Configure Model with OPENAI Fallbacks Source: https://github.com/hmbown/aleph/blob/main/docs/CONFIGURATION.md If OPENAI_API_KEY and OPENAI_BASE_URL are already set, only the model needs to be specified for Aleph. ```bash export ALEPH_SUB_QUERY_MODEL=your-model-name ``` -------------------------------- ### Instant Pattern for Aleph Source: https://github.com/hmbown/aleph/blob/main/docs/prompts/aleph.md A basic pattern demonstrating loading content, searching, and finalizing an answer within Aleph. ```bash load_context(content="", context_id="doc") search_context(pattern="keyword", context_id="doc") finalize(answer="Found X at line Y", context_id="doc") ``` -------------------------------- ### Install Claude Code Skill (Windows PowerShell) Source: https://github.com/hmbown/aleph/blob/main/MCP_SETUP.md Copies the Aleph prompt file to the Claude commands directory on Windows using PowerShell. ```powershell # Windows (PowerShell) New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.claude\commands" $alephPath = python -c "import aleph; print(aleph.__path__[0])" Copy-Item "$alephPath\..\docs\prompts\aleph.md" "$env:USERPROFILE\.claude\commands\aleph.md" ``` -------------------------------- ### Configure Nested Backend Source: https://github.com/hmbown/aleph/blob/main/plugins/aleph/README.md Install a specific nested backend for Aleph, such as claude-code. Alternatively, configure the backend at runtime using the configure function. ```bash aleph-rlm install claude-code --profile claude ``` ```python configure(sub_query_backend="claude") configure(sub_query_share_session=true) ```