ResearchVault 🦞
ResearchVault is a local-first research operations toolkit: a CLI for ingestion/search/verification/synthesis plus an optional local portal UI.
It is designed for explicit operator control: manual start, local state, and predictable defaults.
Quick Reference
| Task |
Command / Action |
Notes |
| Create project |
python scripts/vault.py init --id "ops-demo" --name "Ops Demo" --objective "Track AI agent changes" |
Creates the project in the local SQLite vault. |
| Ingest URL |
python scripts/vault.py scuttle "https://example.com" --id "ops-demo" |
SSRF guard is default-deny. Use --allow-private-networks only when intentional. |
| Search |
python scripts/vault.py search --query "agent benchmark updates" --format rich |
Uses configured providers from env; quality depends on provider keys/base URL. |
| Strategy |
python scripts/vault.py strategy --id "ops-demo" |
Produces next-best-action guidance from current project state. |
| Verify |
python scripts/vault.py verify plan --id "ops-demo" && python scripts/vault.py verify run --id "ops-demo" --limit 5 |
Plans and executes verification missions from low-confidence findings. |
| Synthesize / Graph |
python scripts/vault.py synthesize --id "ops-demo" |
Builds links between findings/artifacts; inspect graph in the Portal Graph view. |
| Export |
python scripts/vault.py export --id "ops-demo" --format markdown --output ~/.researchvault/ops-demo.md |
Export path must be under ~/.researchvault (or test temp paths). |
| Start portal |
./start_portal.sh |
Backend defaults to 127.0.0.1:8000; frontend to 127.0.0.1:5173. |
| Stop portal |
./start_portal.sh --stop |
Stops backend and frontend processes started by script. |
| Portal status |
./start_portal.sh --status |
Shows process/health status and UI reachability. |
Trust Model / Security Notes
- Local-first by default: data is stored in a local SQLite DB (default
~/.researchvault/research_vault.db).
- Portal is local by default: backend/frontend bind loopback addresses unless you explicitly override host vars.
- Portal execution model: the backend runs
scripts.vault subprocesses; it is a controlled shell over the CLI.
- Portal auth token is required:
start_portal.sh loads or generates .portal_auth, exports RESEARCHVAULT_PORTAL_TOKEN, and keeps .portal_auth at chmod 600.
- SSRF posture is default-deny for local/private/link-local targets; private-network access is explicit opt-in via CLI
--allow-private-networks (Portal toggle maps to this behavior).
- DB selection is root-scoped by
RESEARCHVAULT_PORTAL_ALLOWED_DB_ROOTS (default ~/.researchvault,/tmp).
- Portal does not discover or allow selecting DBs under
~/.openclaw/workspace.
- Provider secrets are env-only (
BRAVE_API_KEY, SERPER_API_KEY, SEARXNG_BASE_URL); Portal does not persist/write secrets and does not inject provider secrets into vault subprocesses.
disable-model-invocation: true enforces no autonomous background side effects without explicit user action.
Installation (Manual, Local)
Manual install in a local virtual environment (no embedded installer actions):
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
CLI Quick Start
PROJECT_ID="ops-demo"
python scripts/vault.py init \
--id "$PROJECT_ID" \
--name "Ops Demo" \
--objective "Track AI agent changes"
python scripts/vault.py scuttle "https://example.com" --id "$PROJECT_ID"
python scripts/vault.py list
python scripts/vault.py strategy --id "$PROJECT_ID"
Portal (Manual Opt-In)
Start manually:
./start_portal.sh
Defaults:
- Backend:
127.0.0.1:8000
- Frontend:
127.0.0.1:5173
- Login pages:
http://127.0.0.1:5173/
http://localhost:5173/
Token flow:
start_portal.sh loads existing .portal_auth or generates one.
- It exports
RESEARCHVAULT_PORTAL_TOKEN before backend launch.
- UI login accepts manual token entry or token URL hash:
#token=<token>.
Operational controls:
./start_portal.sh --status
./start_portal.sh --stop
Operational notes:
- Portal expects local use and local DB roots.
- DB access is constrained by
RESEARCHVAULT_PORTAL_ALLOWED_DB_ROOTS.
- OpenClaw workspace DB paths are intentionally excluded.
- Portal private-network ingest toggle maps to CLI
--allow-private-networks.
Configuration
Database
RESEARCHVAULT_DB: Override DB file path used by CLI/Portal subprocesses.
RESEARCHVAULT_PORTAL_ALLOWED_DB_ROOTS: Comma-separated absolute roots allowed for Portal DB selection/discovery. Default: ~/.researchvault,/tmp.
RESEARCHVAULT_PORTAL_STATE_DIR: Portal state location (state.json). Default: ~/.researchvault/portal.
Portal Networking
RESEARCHVAULT_PORTAL_HOST: Backend bind host. Default: 127.0.0.1.
RESEARCHVAULT_PORTAL_PORT: Backend bind port. Default: 8000.
RESEARCHVAULT_PORTAL_FRONTEND_HOST: Frontend bind host. Default: 127.0.0.1.
RESEARCHVAULT_PORTAL_FRONTEND_PORT: Frontend bind port. Default: 5173.
RESEARCHVAULT_PORTAL_CORS_ORIGINS: Comma-separated backend CORS origins; start_portal.sh sets local frontend origins by default.
RESEARCHVAULT_PORTAL_COOKIE_SECURE: Set true to mark auth cookie Secure (HTTPS deployments).
RESEARCHVAULT_PORTAL_RELOAD: Backend auto-reload toggle (true by default in local dev).
Providers
BRAVE_API_KEY: Brave Search API key.
SERPER_API_KEY: Serper API key.
SEARXNG_BASE_URL: SearXNG base URL.
RESEARCHVAULT_SEARCH_PROVIDERS: Explicit provider order override.
TLS / CA
REQUESTS_CA_BUNDLE: Custom CA bundle path for HTTPS verification.
SSL_CERT_FILE: Custom CA certificate file path.
Advanced / Rare
RESEARCHVAULT_PORTAL_PID_DIR: Portal PID/log directory used by start_portal.sh.
RESEARCHVAULT_PORTAL_SHOW_TOKEN: Set 1 to print tokenized portal URLs in terminal output.
RESEARCHVAULT_WATCHDOG_INGEST_TOP: Watchdog ingest top-k override.
RESEARCHVAULT_VERIFY_INGEST_TOP: Verify ingest top-k override.
RESEARCHVAULT_MCP_TRANSPORT: MCP transport override (default CLI transport is stdio).
Troubleshooting
Symptom: Portal login returns 401 Unauthorized.
Cause: Wrong token or backend missing RESEARCHVAULT_PORTAL_TOKEN.
Fix: Restart with ./start_portal.sh, then use token from .portal_auth or #token=<token> URL hash.
Symptom: Tokenized URL does not log in.
Cause: Token mismatch, stale cookie/session, or wrong frontend host/port.
Fix: Confirm .portal_auth, clear browser cookies for the portal origin, and verify RESEARCHVAULT_PORTAL_FRONTEND_PORT/URL.
Symptom: DB rejected or cannot be selected in Portal.
Cause: DB path is outside RESEARCHVAULT_PORTAL_ALLOWED_DB_ROOTS or under denied OpenClaw workspace path.
Fix: Move/use a DB under allowed roots (default ~/.researchvault,/tmp) and retry.
Symptom: Blocked host when ingesting localhost, 127.0.0.1, 169.254.*, or private RFC1918 targets.
Cause: SSRF protection default-deny blocked private/local/link-local addresses.
Fix: Only if intentional, rerun with --allow-private-networks.
Symptom: Portal fails to start because port is already in use.
Cause: Existing process is bound to backend/frontend ports.
Fix: Run ./start_portal.sh --stop, then restart; or change host/port env vars.
Symptom: vault list or portal appears empty (No projects found).
Cause: You are using a different DB path than expected.
Fix: Check RESEARCHVAULT_DB, confirm Portal current DB in diagnostics, and align to the intended file.
Symptom: Provider-backed search is not working.
Cause: Provider env vars are unset or invalid.
Fix: Set BRAVE_API_KEY and/or SERPER_API_KEY and/or SEARXNG_BASE_URL, then rerun search/verify/watchdog.
Symptom: HTTPS certificate verification failures.
Cause: Missing private CA/intermediate trust configuration.
Fix: Set REQUESTS_CA_BUNDLE or SSL_CERT_FILE to the correct CA file and retry.
Optional Services (Manual Start)
Manual only; nothing auto-starts:
- MCP Server:
python scripts/services/mcp_server.py
- Watchdog:
python scripts/services/watchdog.py --once
Provenance
- Maintainer: lraivisto
- License: MIT
- Issues: GitHub Issues
- Security: See SECURITY.md
1---2name: researchvault3description: Local-first research orchestration engine. Manages state, synthesis, and optional background services (MCP/Watchdog).4---56# ResearchVault 🦞78ResearchVault is a local-first research operations toolkit: a CLI for ingestion/search/verification/synthesis plus an optional local portal UI.9It is designed for explicit operator control: manual start, local state, and predictable defaults.1011## Quick Reference1213| Task | Command / Action | Notes |14|---|---|---|15| Create project | `python scripts/vault.py init --id "ops-demo" --name "Ops Demo" --objective "Track AI agent changes"` | Creates the project in the local SQLite vault. |16| Ingest URL | `python scripts/vault.py scuttle "https://example.com" --id "ops-demo"` | SSRF guard is default-deny. Use `--allow-private-networks` only when intentional. |17| Search | `python scripts/vault.py search --query "agent benchmark updates" --format rich` | Uses configured providers from env; quality depends on provider keys/base URL. |18| Strategy | `python scripts/vault.py strategy --id "ops-demo"` | Produces next-best-action guidance from current project state. |19| Verify | `python scripts/vault.py verify plan --id "ops-demo" && python scripts/vault.py verify run --id "ops-demo" --limit 5` | Plans and executes verification missions from low-confidence findings. |20| Synthesize / Graph | `python scripts/vault.py synthesize --id "ops-demo"` | Builds links between findings/artifacts; inspect graph in the Portal Graph view. |21| Export | `python scripts/vault.py export --id "ops-demo" --format markdown --output ~/.researchvault/ops-demo.md` | Export path must be under `~/.researchvault` (or test temp paths). |22| Start portal | `./start_portal.sh` | Backend defaults to `127.0.0.1:8000`; frontend to `127.0.0.1:5173`. |23| Stop portal | `./start_portal.sh --stop` | Stops backend and frontend processes started by script. |24| Portal status | `./start_portal.sh --status` | Shows process/health status and UI reachability. |2526## Trust Model / Security Notes2728- Local-first by default: data is stored in a local SQLite DB (default `~/.researchvault/research_vault.db`).29- Portal is local by default: backend/frontend bind loopback addresses unless you explicitly override host vars.30- Portal execution model: the backend runs `scripts.vault` subprocesses; it is a controlled shell over the CLI.31- Portal auth token is required: `start_portal.sh` loads or generates `.portal_auth`, exports `RESEARCHVAULT_PORTAL_TOKEN`, and keeps `.portal_auth` at `chmod 600`.32- SSRF posture is default-deny for local/private/link-local targets; private-network access is explicit opt-in via CLI `--allow-private-networks` (Portal toggle maps to this behavior).33- DB selection is root-scoped by `RESEARCHVAULT_PORTAL_ALLOWED_DB_ROOTS` (default `~/.researchvault,/tmp`).34- Portal does not discover or allow selecting DBs under `~/.openclaw/workspace`.35- Provider secrets are env-only (`BRAVE_API_KEY`, `SERPER_API_KEY`, `SEARXNG_BASE_URL`); Portal does not persist/write secrets and does not inject provider secrets into vault subprocesses.36- `disable-model-invocation: true` enforces no autonomous background side effects without explicit user action.3738## Installation (Manual, Local)3940Manual install in a local virtual environment (no embedded installer actions):4142```bash43python3 -m venv .venv44source .venv/bin/activate45pip install -e .46```4748## CLI Quick Start4950```bash51PROJECT_ID="ops-demo"5253python scripts/vault.py init \54 --id "$PROJECT_ID" \55 --name "Ops Demo" \56 --objective "Track AI agent changes"5758python scripts/vault.py scuttle "https://example.com" --id "$PROJECT_ID"59python scripts/vault.py list60python scripts/vault.py strategy --id "$PROJECT_ID"61```6263## Portal (Manual Opt-In)6465Start manually:6667```bash68./start_portal.sh69```7071Defaults:7273- Backend: `127.0.0.1:8000`74- Frontend: `127.0.0.1:5173`75- Login pages:76 - `http://127.0.0.1:5173/`77 - `http://localhost:5173/`7879Token flow:8081- `start_portal.sh` loads existing `.portal_auth` or generates one.82- It exports `RESEARCHVAULT_PORTAL_TOKEN` before backend launch.83- UI login accepts manual token entry or token URL hash: `#token=<token>`.8485Operational controls:8687```bash88./start_portal.sh --status89./start_portal.sh --stop90```9192Operational notes:9394- Portal expects local use and local DB roots.95- DB access is constrained by `RESEARCHVAULT_PORTAL_ALLOWED_DB_ROOTS`.96- OpenClaw workspace DB paths are intentionally excluded.97- Portal private-network ingest toggle maps to CLI `--allow-private-networks`.9899## Configuration100101### Database102103- `RESEARCHVAULT_DB`: Override DB file path used by CLI/Portal subprocesses.104- `RESEARCHVAULT_PORTAL_ALLOWED_DB_ROOTS`: Comma-separated absolute roots allowed for Portal DB selection/discovery. Default: `~/.researchvault,/tmp`.105- `RESEARCHVAULT_PORTAL_STATE_DIR`: Portal state location (`state.json`). Default: `~/.researchvault/portal`.106107### Portal Networking108109- `RESEARCHVAULT_PORTAL_HOST`: Backend bind host. Default: `127.0.0.1`.110- `RESEARCHVAULT_PORTAL_PORT`: Backend bind port. Default: `8000`.111- `RESEARCHVAULT_PORTAL_FRONTEND_HOST`: Frontend bind host. Default: `127.0.0.1`.112- `RESEARCHVAULT_PORTAL_FRONTEND_PORT`: Frontend bind port. Default: `5173`.113- `RESEARCHVAULT_PORTAL_CORS_ORIGINS`: Comma-separated backend CORS origins; `start_portal.sh` sets local frontend origins by default.114- `RESEARCHVAULT_PORTAL_COOKIE_SECURE`: Set `true` to mark auth cookie `Secure` (HTTPS deployments).115- `RESEARCHVAULT_PORTAL_RELOAD`: Backend auto-reload toggle (`true` by default in local dev).116117### Providers118119- `BRAVE_API_KEY`: Brave Search API key.120- `SERPER_API_KEY`: Serper API key.121- `SEARXNG_BASE_URL`: SearXNG base URL.122- `RESEARCHVAULT_SEARCH_PROVIDERS`: Explicit provider order override.123124### TLS / CA125126- `REQUESTS_CA_BUNDLE`: Custom CA bundle path for HTTPS verification.127- `SSL_CERT_FILE`: Custom CA certificate file path.128129### Advanced / Rare130131- `RESEARCHVAULT_PORTAL_PID_DIR`: Portal PID/log directory used by `start_portal.sh`.132- `RESEARCHVAULT_PORTAL_SHOW_TOKEN`: Set `1` to print tokenized portal URLs in terminal output.133- `RESEARCHVAULT_WATCHDOG_INGEST_TOP`: Watchdog ingest top-k override.134- `RESEARCHVAULT_VERIFY_INGEST_TOP`: Verify ingest top-k override.135- `RESEARCHVAULT_MCP_TRANSPORT`: MCP transport override (default CLI transport is `stdio`).136137## Troubleshooting138139- **Symptom:** Portal login returns `401 Unauthorized`.140 **Cause:** Wrong token or backend missing `RESEARCHVAULT_PORTAL_TOKEN`.141 **Fix:** Restart with `./start_portal.sh`, then use token from `.portal_auth` or `#token=<token>` URL hash.142143- **Symptom:** Tokenized URL does not log in.144 **Cause:** Token mismatch, stale cookie/session, or wrong frontend host/port.145 **Fix:** Confirm `.portal_auth`, clear browser cookies for the portal origin, and verify `RESEARCHVAULT_PORTAL_FRONTEND_PORT`/URL.146147- **Symptom:** DB rejected or cannot be selected in Portal.148 **Cause:** DB path is outside `RESEARCHVAULT_PORTAL_ALLOWED_DB_ROOTS` or under denied OpenClaw workspace path.149 **Fix:** Move/use a DB under allowed roots (default `~/.researchvault,/tmp`) and retry.150151- **Symptom:** `Blocked host` when ingesting `localhost`, `127.0.0.1`, `169.254.*`, or private RFC1918 targets.152 **Cause:** SSRF protection default-deny blocked private/local/link-local addresses.153 **Fix:** Only if intentional, rerun with `--allow-private-networks`.154155- **Symptom:** Portal fails to start because port is already in use.156 **Cause:** Existing process is bound to backend/frontend ports.157 **Fix:** Run `./start_portal.sh --stop`, then restart; or change host/port env vars.158159- **Symptom:** `vault list` or portal appears empty (`No projects found`).160 **Cause:** You are using a different DB path than expected.161 **Fix:** Check `RESEARCHVAULT_DB`, confirm Portal current DB in diagnostics, and align to the intended file.162163- **Symptom:** Provider-backed search is not working.164 **Cause:** Provider env vars are unset or invalid.165 **Fix:** Set `BRAVE_API_KEY` and/or `SERPER_API_KEY` and/or `SEARXNG_BASE_URL`, then rerun search/verify/watchdog.166167- **Symptom:** HTTPS certificate verification failures.168 **Cause:** Missing private CA/intermediate trust configuration.169 **Fix:** Set `REQUESTS_CA_BUNDLE` or `SSL_CERT_FILE` to the correct CA file and retry.170171## Optional Services (Manual Start)172173Manual only; nothing auto-starts:174175- MCP Server: `python scripts/services/mcp_server.py`176- Watchdog: `python scripts/services/watchdog.py --once`177178## Provenance179180- **Maintainer**: lraivisto181- **License**: MIT182- **Issues**: [GitHub Issues](https://github.com/lraivisto/ResearchVault/issues)183- **Security**: See [SECURITY.md](SECURITY.md)