Browse by type
Skills and Operators that grow from replay-verified executions.
Quick start · How it works · Results · Gateway · Benchmark · Paper · Design

ScienceClaw-Eval spans 23 disciplines across the natural and social sciences, while ScienceClaw turns verified execution evidence into persistent Skill–Operator program updates.
23disciplines across the natural and social sciences |
+16.45 %mean out-of-distribution gain over the frozen agent |
98.23 %of instances pass every scientific hard constraint |
91.30OOD macro success rate after seven rounds (from 77.72) |
ScienceClaw is an agent system for scientific work that gets better the more it is used. It solves each task as a typed, executable workflow. When a repair is reproduced under a clean replay, it becomes a linked Skill (strategy) and Operator (a typed, executable capability), and it is kept only if it still solves its source task and improves independent validation tasks.
[!NOTE] This repository is the agent system, built on the OpenClaw gateway. Its companion benchmark, ScienceClaw-Eval, keeps its evaluation data on Hugging Face.
| Idea | In practice |
|---|---|
| An evolving program | What evolves is a versioned program of Skills (decomposition, workflow construction, recovery) and typed Operators with explicit input, output and domain contracts. |
| Typed, executable workflows | Ports carry a schema of type, shape, unit and provenance. Nodes are fingerprinted, so an edit reruns only what it affects. |
| Evidence you can replay | Every result is regenerated from a reset environment and checked against the task's hard scientific constraints. |
| Linked Skill–Operator updates | A reproduced repair becomes a strategy patch and a typed capability, committed together. No LLM judge is needed to form, rank or select candidates. |
| A gate, not a guess | An update persists only if source replay reproduces it and uses it, and independent validation tasks strictly improve within budget. |
| You stay in control | Updates are versioned snapshots that you promote, and that you can roll back. |
git clone https://github.com/beita6969/ScienceClaw.git
cd ScienceClaw
# One-click setup: Node, Python, the engine, its tools and weights, MCP servers, skills
chmod +x setup.sh && ./setup.sh
Manual installation
pnpm install && npx openclaw onboard
pip install -e packages/scienceclaw # Python >= 3.11; extras: [all], vision, audio, nlp, forecast, materials, retrieval
python -m scienceclaw.cli setup # install and verify every tool and pretrained weight (--profile light skips assets > 1.5 GB)
python -m scienceclaw.cli doctor # which tool modules can run on this machine, and why not
The engine refuses tasks until setup has completed (SCIENCECLAW_SKIP_SETUP_CHECK=1 is for development only), and the full profile downloads about 19 GB of weights. setup.sh runs it for you; SCIENCECLAW_SKIP_TOOLS=1 defers it to first use.
[!TIP] Bring your own model. The engine never assumes a model family and this repository names none. Point it at any OpenAI-compatible endpoint, a local program, or your own backend:
bash export SCIENCECLAW_API_BASE_URL=<your OpenAI-compatible endpoint> export SCIENCECLAW_API_KEY=<your key> export SCIENCECLAW_MODEL=<your model name> # or SCIENCECLAW_<POLICY|EXECUTOR|PATCH>_MODEL per role
llm.backendcan also becommand(a local program reads the prompt and writes the completion) orpackage.module:factory. Seeconfigs/default.yaml.
LLM agents increasingly solve scientific tasks by connecting reasoning to data, domain tools and executable code. But a repair that works once rarely survives: it lives in a transient context, or in a single tool or prompt, so verified executions seldom become persistent improvements. Existing work evolves individual tools or Skills, and existing benchmarks treat tasks as independent episodes, so it has been hard to tell whether verified scientific executions turn into persistent, transferable improvements.
How can verified scientific executions drive persistent and transferable program-level self-evolution without updating foundation-model parameters?

Task formulation of verifiable program-level self-evolution for AI-for-Science agents.
1. A task for program-level self-evolution. The model Θ₀ is fixed. What evolves is an editable program A_r = (Skills, Operators). A task D_t = (D_T, D_V, D_E) specifies its objective and inputs, its evaluation protocol and hard constraints (units, feasibility, convergence, reproducibility), and its data, tools and environment.
2. Typed, execution-guided workflows. A solution is a directed graph whose ports carry a schema (type, shape, unit, provenance); an edge is valid only if types and shapes match and any unit conversion is explicit and recorded. The agent edits the graph one atomic action at a time, and the executor checkpoints every node by fingerprint and reruns only the affected descendants, so a long scientific workflow is repaired rather than regenerated.
3. Evidence you can replay. Every candidate result is regenerated from a reset environment and checked against the task's evaluator and hard constraints. A replay that fails and a later replay that passes bracket the shortest reproduced repair, e⁻ → e⁺. Replay alone never authorizes persistence.
4. Linked Skill–Operator candidates, with no LLM judge. The reproduced repair is split by edit type. Control edits (topology, routing, configuration) become a Skill patch. Generated or repaired executable nodes are grouped into convex components and abstracted into typed Operators, each checked by boundary replay in isolation. Both are committed as one atomic bundle, so a strategy never arrives without the capability behind it, nor a capability without a strategy that selects it.
5. A replay-and-validation gate. A candidate persists only if source replay reproduces the repair and actually uses every new component (R_src = Pass ∧ Use), every hard integrity and scientific check holds on independent validation tasks, its cost stays within budget, and it strictly improves the validation score over the incumbent. A noise guard requires at least two improved and at most one regressed validation episode. Otherwise the incumbent program is kept.

Given task specification D_t and agent program A_r, ScienceClaw produces scientific solution Z_t and retains a candidate update only after source-task replay and independent program validation.
Seven evolution rounds over a common stream of 23 disciplines, with 64 IID and 64 OOD instances per discipline, one fixed foundation model, and the same tools, source stream, validation data and update budget throughout. OOD means an independently sourced dataset of the same discipline; OOD results never generate or select updates.
Mean of IID and OOD task-native scores of the ablation variants across 23 disciplines. Colours are normalised within each discipline (darker is better); the two groups follow higher-is-better and lower-is-better metrics.
(f) Gain over the frozen agent (%) of the linked-mechanism variants on Commerce (MASE) and Law (mAP). (g) Workflow mechanics: planner rounds, distinct Operators, Operator diversity, feedback repair, checkpoint recovery and clean replay. (h) Hard-constraint pass rate against cost per OOD gain (ScienceClaw = 1), coloured by planner wall-time share. (i) Promoted candidates and promotion rate.
Per-discipline scores: ScienceClaw against the frozen agent
Task-native scores, compared only within a discipline (metrics differ in units and direction); arrows give the direction of "better". Gains are the relative improvement in the better direction, computed from the rounded scores shown.
| FoR | Discipline (metric) | Frozen IID | ScienceClaw IID | Gain | Frozen OOD | ScienceClaw OOD | Gain |
|---|---|---|---|---|---|---|---|
| 30 | Agricultural sci. (PQ+) ↑ | 69.4761 | 76.9612 | +10.77 % | 64.6829 | 75.7629 | +17.13 % |
| 31 | Biological sci. (Spearman) ↑ | 0.5057 | 0.5816 | +15.01 % | 0.3745 | 0.4234 | +13.06 % |
| 32 | Biomedical sci. (DSC) ↑ | 0.7816 | 0.8556 | +9.47 % | 0.7088 | 0.8226 | +16.06 % |
| 33 | Built env. (NRMSE %) ↓ | 51.0997 | 45.0065 | +11.92 % | 53.5009 | 45.0970 | +15.71 % |
| 34 | Chemical sci. (ROC-AUC) ↑ | 0.6518 | 0.7545 | +15.76 % | 0.6205 | 0.7478 | +20.52 % |
| 35 | Commerce (MASE) ↓ | 1.6009 | 1.4653 | +8.47 % | 1.8740 | 1.5986 | +14.70 % |
| 36 | Creative arts (SDR (dB)) ↑ | 8.9208 | 10.1867 | +14.19 % | 8.0993 | 9.5619 | +18.06 % |
| 37 | Earth sci. (RMSE (K)) ↓ | 1.0562 | 0.9721 | +7.96 % | 1.1364 | 0.9580 | +15.70 % |
| 38 | Economics (sMAPE (%)) ↓ | 12.7394 | 11.3320 | +11.05 % | 18.1343 | 15.5025 | +14.51 % |
| 39 | Education (10-mask acc.) ↑ | 0.5965 | 0.6878 | +15.31 % | 0.6202 | 0.7087 | +14.27 % |
| 40 | Engineering (DCASE score) ↑ | 0.5709 | 0.6535 | +14.47 % | 0.4663 | 0.5269 | +13.00 % |
| 41 | Environmental sci. (CRPS) ↓ | 0.8104 | 0.7164 | +11.60 % | 0.6504 | 0.5751 | +11.58 % |
| 42 | Health sci. (Clin. utility) ↑ | 0.4971 | 0.5514 | +10.92 % | 0.6834 | 0.7796 | +14.08 % |
| 43 | History (cMER-micro) ↓ | 0.0185 | 0.0166 | +10.27 % | 0.0296 | 0.0251 | +15.20 % |
| 44 | Human society (nRMSE) ↓ | 0.0113 | 0.0100 | +11.50 % | 0.0213 | 0.0181 | +15.02 % |
| 45 | Indigenous (chrF++) ↑ | 15.4451 | 17.4351 | +12.88 |
browse all types & interfaces →
$ claude mcp add ScienceClaw \
-- python -m otcore.mcp_server <graph>