Multi-cycle deep research using a locally-hosted Local Deep Research (LDR) service for OpenClaw / ClawHub. Use this skill when you need comprehensive research with citations, literature reviews, competitive intelligence, or exhaustive web search with iterative question generation.
Triggers: "deep research", "research this topic", "comprehensive analysis with sources", "literature review", "investigate [topic]", or when local LDR is preferred over cloud research.
This repository is the OpenClaw / ClawHub skill that lets your OpenClaw agent use a local Local Deep Research (LDR) installation. You need LDR running on your machine (or a host you control) for the skill to work.
LDR is the AI-powered research backend: it performs deep, iterative research using LLMs and search engines, with proper citations. It runs locally (Docker, pip, or from source), typically on port 5000, and can use Ollama, SearXNG, and other components as described in the LDR documentation. Install and run LDR first (e.g. via Docker or Docker Compose), then install this skill so OpenClaw can start research jobs, poll status, and fetch reports from your LDR instance.
- Required:
curlandjqmust be installed. The skill declares these in its manifest (requires.bins). - Environment / credentials: The skill expects
LDR_BASE_URL(defaulthttp://127.0.0.1:5000) and, if your LDR uses auth,LDR_SERVICE_USERandLDR_SERVICE_PASSWORD(orLDR_USERNAME/LDR_PASSWORD). These are declared in the skill manifest (requires.env/primaryEnv). Set them via your environment or a local.envfile only; do not commit secrets. - Trust: Only point
LDR_BASE_URLat an LDR instance you control (e.g. localhost). The script sources~/.config/local_deep_research/config/.envif present—verify that file’s contents and do not put unrelated secrets there. - Optional: Review
scripts/ldr-research.sh; for higher assurance, run the skill in an isolated environment with network restricted to your LDR host.
- A running LDR instance (e.g.
http://127.0.0.1:5000) - OpenClaw with network and shell permissions
curlandjqon the host- (If LDR has auth enabled) LDR account credentials — stored only locally, see below
- Install the skill (e.g. via ClawHub or copy into your OpenClaw skills directory).
- Set LDR URL (optional if using default):
export LDR_BASE_URL="http://127.0.0.1:5000"
- If your LDR instance requires login, set credentials via environment variables or a local
.envfile only (see Credentials):export LDR_SERVICE_USER="your-ldr-username" export LDR_SERVICE_PASSWORD="your-ldr-password"
- Run research via the skill (e.g. "Research the latest developments in quantum computing").
LDR uses session-cookie authentication with CSRF protection (not HTTP Basic Auth). The script performs a proper login flow: fetches the login page for a session cookie and CSRF token, then POSTs the login form. Your username and password are used only to create that session with your local LDR instance (and for LDR’s per-user encrypted results).
- They are not transmitted to any third party or to ClawHub/GitHub — only to your own LDR instance (e.g. on localhost).
- Do not put credentials in the skill config file or commit them to git.
- Option A — Environment variables
In your shell or process:export LDR_SERVICE_USER="openclaw_service" export LDR_SERVICE_PASSWORD="a-strong-password"
- Option B — LDR config directory
LDR can load~/.config/local_deep_research/config/.env. This script will source that file if it exists, so you can keep one local file for LDR and this skill. Ensure that path is not in git (e.g. in.gitignoreif you ever copy it into a project). - Option C — Project
.env
If you use a project-level.env, add it to.gitignoreand never commit it.
Use a dedicated LDR user (e.g. openclaw_service) for this skill so you can rotate that account without affecting your personal LDR login.
See env.example for variable names. Do not commit real credentials.
| Variable | Description | Default |
|---|---|---|
LDR_BASE_URL |
LDR service URL | http://127.0.0.1:5000 |
LDR_LOGIN_URL |
Login page URL (session + CSRF) | $LDR_BASE_URL/auth/login |
LDR_SERVICE_USER |
LDR account username (local auth only) | — |
LDR_SERVICE_PASSWORD |
LDR account password (local auth only) | — |
LDR_CONFIG_DIR |
Directory containing .env to source |
~/.config/local_deep_research/config |
LDR_DEFAULT_MODE |
Research mode: quick (Quick Summary) or detailed (Detailed Report) |
detailed |
LDR_DEFAULT_LANGUAGE |
Default output language for report/summary (e.g. en, es, fr, de, zh, ja) |
— |
LDR_DEFAULT_SEARCH_TOOL |
Search tool: searxng, auto, local_all |
auto |
Research modes: Use quick for a short summary (faster); use detailed for a full report with full citations. You can override the output language per run with --language (e.g. --language es for Spanish).
LDR_USERNAME / LDR_PASSWORD are supported as fallbacks.
The skill exposes these actions via scripts/ldr-research.sh:
| Action | Description |
|---|---|
start_research |
Submit a query; returns research_id. |
get_status |
Check job status by research_id. |
get_result |
Fetch the full report when completed. |
poll_until_complete |
Block until the job completes or times out. |
See SKILL.md for input/output schemas and orchestration patterns.
local-deep-research-skill/
├── README.md # This file
├── SKILL.md # OpenClaw skill instructions (entry point)
├── env.example # Example env vars (no secrets)
├── references/
│ ├── api.md # LDR API reference
│ └── examples.md # Usage examples
└── scripts/
└── ldr-research.sh # CLI for start_research, get_status, get_result, poll_until_complete
-
LDR not responding
CheckLDR_BASE_URLand that LDR is running:curl "$LDR_BASE_URL/health". -
Authentication failures
LDR uses session + CSRF, not Basic Auth. EnsureLDR_SERVICE_USERandLDR_SERVICE_PASSWORD(orLDR_USERNAME/LDR_PASSWORD) are set via env or a local.envthat is not committed. Run the script and look for "Login successful"; or openLDR_LOGIN_URLin a browser to confirm LDR’s login page works. -
Research stuck
Check LDR logs and service health; consider timeout/restart if there’s no progress for a long time.
- ClawHub: From the skill root, run
clawhub publish . --slug local-deep-research --name "Local Deep Research" --version 1.0.0 --tags latest
(Requiresclawhub loginfirst.) - GitHub: Ensure
.gitignoreis in place so.envand secrets are never committed. Clone or fork the repo as usual.
MIT — see LICENSE.
- Local Deep Research (LDR) — The backend service this skill talks to (install on your machine, port 5000).
- ClawHub — OpenClaw skill registry
- OpenClaw — Documentation
Edward Tsang — blockchain & AI engineer. Open to consulting → Email · LinkedIn