ClawResearch is a local research lab for an LLM researcher.
The model is responsible for research judgment: planning, source selection, evidence interpretation, synthesis, writing, revision, and deciding what to do next. ClawResearch provides the lab infrastructure around that researcher: terminal UX, provider tools, persistent workspace memory, provenance, citation integrity, checkpoints, diagnostics, and final exports.
The current product is console-first and project-local. Run it inside the directory you want to research. ClawResearch stores its workspace under .clawresearch/ in that project.
ClawResearch is built around a model-driven research session:
- The runtime observes the current workspace state.
- The model chooses one explicit tool action.
- The runtime validates the action mechanically.
- The runtime executes exactly that action.
- The result is persisted and returned as an observation.
- The model observes again and chooses the next action.
There is no hidden research pipeline. Source search, extraction, evidence creation, claim work, section writing, critic review, release checks, notebook updates, and manuscript finalization are model-selected tools.
The runtime may block hard invariant violations such as broken IDs, malformed schemas, missing citation links, invalid references, provider access failures, or export failures. It should not secretly decide semantic research questions such as whether a source is relevant, whether a claim is useful, or whether a research direction is promising.
- Researcher model: the main LLM that owns planning, tool choice, synthesis, and writing.
- Research lab runtime: the TypeScript/Node.js application that provides tools, storage, validation, logs, and exports.
- Workspace database: the canonical project memory in
.clawresearch/workspace.sqlite. - Living notebook: a compact model-owned project notebook stored in the workspace, containing the objective, research contract, current tasks, readiness notes, and artifact links.
- Critic: an optional reviewer call that can provide feedback when the researcher chooses
critic.review; critic feedback is visible to the model and does not silently rewrite the workspace. - Manuscript finalization: the explicit
manuscript.finalizetool writespaper.mdonly after mechanical export invariants pass.
Install dependencies:
npm installStart the terminal UI in the current project:
npm run devUse the plain line-oriented console for scripts, pipes, or debugging:
npm run dev -- --plainUse a different project root:
npm run dev -- --project-root /path/to/projectBuild and run compiled JavaScript:
npm run build
node dist/src/cli.jsShow CLI help:
npm run dev -- --helpThe default local path uses Ollama.
Current local-model assumption:
ollamais installed and running locally- a capable model is available, for example
qwen3:14bor a stronger local model
Override the Ollama model:
CLAWRESEARCH_OLLAMA_MODEL=your-model-name npm run devHosted model and provider support is being developed through the same backend abstraction. The architecture expects stronger models to perform better because the runtime intentionally does not replace the researcher with hidden deterministic research logic.
On startup, ClawResearch opens a research intake conversation. The intake chat helps clarify:
- topic
- research question
- research direction
- success criterion
When the brief is good enough, run:
/go
/go starts or resumes the autonomous research worker for the current objective. The worker continues from the project workspace and streams readable progress events in the terminal.
Useful slash commands:
/help/status/sources/paper/paper open/paper checks/go/pause/resume/quit/exit
New projects open a provider checklist at startup. The default selection is:
- scholarly discovery:
openalex,crossref,dblp,pubmed - publisher / full text:
arxiv,europe-pmc - OA / retrieval helpers:
core,unpaywall - general web: none
- local context: on
Inside the TUI:
UpandDownmove through providersSpaceorEntertoggles a providerSsaves the current selectionEscleaves the overlay
/sources reopens the checklist later.
Credentialed providers are selectable but off by default, including:
- scholarly discovery:
elsevier - publisher / full text:
ieee-xplore,springer-nature
When credentials are needed, ClawResearch asks for the key, token, or email directly and stores it only in the local runtime folder.
Project runtime state lives in:
.clawresearch/
Important project-level files:
.clawresearch/session.json: console session state.clawresearch/project-config.json: source and runtime configuration.clawresearch/credentials.json: local credentials.clawresearch/workspace.sqlite: canonical research workspace.clawresearch/console-transcript.log: raw console transcript
Detached run logs live under:
.clawresearch/runs/<run-id>/
Run directories are for observability and exports. Typical files include:
run.jsontrace.logevents.debug.jsonlstdout.logstderr.logagent-state.jsonagent-steps.jsonlpaper.mdpaper.jsonreferences.jsonmanuscript-checks.json
The canonical research state is the SQLite workspace, not the run artifacts.
ClawResearch does not maintain a separate research-journal.json, notes.json, or memory.json; project memory is derived from workspace.sqlite.
The workspace stores durable research objects such as:
- living research notebook
- protocols
- provider runs
- sources and canonical sources
- model-authored source reviews and full-text/access facts
- extractions and evidence cells
- claims, support links, citations, and manuscript sections
- hard runtime/user records for access blockers, external blockers, and user decisions
- release checks and worker state
The production action surface is intentionally explicit. The model can inspect and mutate the workspace through tools such as:
notebook.readnotebook.patchworkspace.listworkspace.searchworkspace.readworkspace.createworkspace.patchprotocol.create_or_revisesource.searchsource.mergesource.resolve_accesssource.select_evidenceextraction.createevidence.create_cellevidence.matrix_viewclaim.createclaim.patchclaim.link_supportclaim.check_supportsection.createsection.patchsection.link_claimcritic.reviewrelease.verifymanuscript.finalizeworkspace.statusguidance.searchguidance.readguidance.recommend
Tool failures are returned as observations with repair context. For example, if claim.link_support is missing a claim ID or evidence cell ID, the runtime returns nearby valid claims, evidence cells, sources, and cautious next hints instead of silently creating a bad citation.
The main publishable export is:
paper.md
It is generated by manuscript.finalize from workspace sections, claims, support links, citations, and references. Mechanical checks must pass before the file is written. Research sufficiency remains a model judgment supported by the notebook, hard runtime/user records, critic feedback, and explicit release checks.
Run type checks:
npm run checkRun the full test suite:
npm testThe test suite includes architecture-contract tests that guard against reintroducing hidden research workflows, legacy action aliases, runtime-generated recovery queries, fallback evidence selection, and automatic source-to-manuscript phase behavior.
ClawResearch should stay small and task-driven:
- keep the workspace canonical
- keep tools explicit and observable
- keep semantic judgment with the model
- keep runtime validation mechanical
- keep guidance visible and overridable
- delete obsolete pipeline-style code instead of preserving it for compatibility
The goal is a research IDE for the model: simple enough to operate, durable enough to support long research projects, and strict enough to preserve provenance and export integrity.