Campaign orchestration layer built on OpenClaw planning and refua-mcp execution.
Project description
ClawCures
Disease-campaign orchestration that separates planning from execution:
- OpenClaw plans through
/v1/responses. refua-mcpexecutes typed scientific tools.
What You Get
- Single-run planner/executor flow.
- Autonomous planner/critic loop with policy checks.
- Offline plan validation and dry-run modes.
- Portfolio ranking for disease-program prioritization.
Requirements
- Python
>=3.11,<3.14(Python3.14+is not supported byrefua-mcp). - A running OpenClaw Gateway if you want live planning.
- Optional:
refua-mcpruntime dependencies for tool execution.
Quick Start
- Install
cd /path/to/ClawCures
python3.13 -m venv .venv
source .venv/bin/activate
pip install -e .
- Configure OpenClaw access
- Set your gateway URL with
REFUA_CAMPAIGN_OPENCLAW_BASE_URL. - Ensure OpenClaw
responsesendpoint is enabled. - Provide auth with one of:
REFUA_CAMPAIGN_OPENCLAW_TOKENOPENCLAW_GATEWAY_TOKENOPENCLAW_GATEWAY_PASSWORD(for password mode)
- Run an offline smoke test (no OpenClaw call)
ClawCures run \
--objective "Offline validation" \
--plan-file examples/plan_template.json \
--dry-run
- Simplest live invocation (all-disease cure mission)
ClawCures run
By default, ClawCures run sets the objective to:
"Find cures for all diseases by prioritizing the highest-burden conditions and researching the best drug design strategies for each."
- Run a live planning dry-run
ClawCures run \
--dry-run
Environment Variables
| Variable | Default | Purpose |
|---|---|---|
REFUA_CAMPAIGN_OPENCLAW_BASE_URL |
http://127.0.0.1:18789 |
OpenClaw Gateway base URL |
REFUA_CAMPAIGN_OPENCLAW_MODEL |
openclaw:main |
OpenClaw model/agent ID |
REFUA_CAMPAIGN_TIMEOUT_SECONDS |
180 |
API timeout |
REFUA_CAMPAIGN_OPENCLAW_TOKEN |
unset | Bearer token override |
OPENCLAW_GATEWAY_TOKEN |
unset | Gateway token fallback |
OPENCLAW_GATEWAY_PASSWORD |
unset | Password-mode fallback token |
CLI Commands
| Command | What it does |
|---|---|
ClawCures print-default-prompt |
Print bundled mission prompt |
ClawCures list-tools |
Show available refua-mcp tools |
ClawCures run ... |
One planner + execution cycle |
ClawCures run-autonomous ... |
Planner/critic multi-round loop |
ClawCures validate-plan ... |
Policy-check a local JSON plan |
ClawCures rank-portfolio ... |
Rank disease programs from JSON input |
Common Usage
Run one plan + execute cycle:
ClawCures run \
--output artifacts/kras_campaign_run.json
Offline autonomous policy check:
ClawCures run-autonomous \
--objective "Offline policy check" \
--plan-file examples/plan_template.json \
--dry-run
Rank programs:
ClawCures rank-portfolio \
--input examples/portfolio_input.json
Release Packaging
Build and validate release artifacts in a version-specific directory:
./scripts/build_release_artifacts.sh
Upload only from that release directory (not from dist/*):
python -m twine upload dist/release-<version>/*
OpenClaw Compatibility
Verified against official OpenClaw docs and latest stable release v2026.2.15 (released 2026-02-16):
- API interface:
POST /v1/responses - Request fields used by this project:
model,input,instructions - Auth model:
Authorization: Bearer ...token/password - Endpoint behavior note: OpenClaw currently ignores
metadatafor prompt construction, so this project does not rely on metadata for critic payloads
Primary references:
- https://docs.openclaw.ai/openapi/openapi/responses_api/
- https://docs.openclaw.ai/openclaw/faq/
- https://github.com/openclaw/openclaw/releases/tag/v2026.2.15
Troubleshooting
connection refusedto/v1/responses- OpenClaw Gateway is not running or
REFUA_CAMPAIGN_OPENCLAW_BASE_URLis wrong.
- OpenClaw Gateway is not running or
401or auth errors- Token/password env var is missing or mismatched with gateway auth mode.
requires a different Python: ... not in '<3.14,>=3.11'- Use Python
3.11,3.12, or3.13.
- Use Python
Notes
- Tool plans are strict JSON for reproducibility.
- All tool calls go through a strict allowlist.
- Mission framing is aspirational; never claim cures without evidence.
- Architecture details:
docs/ARCHITECTURE.md - Research notes:
docs/RESEARCH.md
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clawcures-0.6.0.tar.gz.
File metadata
- Download URL: clawcures-0.6.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.14.3 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1364a7cbfddda3bcac98159fe72ec8e00a3e2a33f145837ada6a2375b2e99ed2
|
|
| MD5 |
b43bea861165fd2143262fc7fe3fa58c
|
|
| BLAKE2b-256 |
0830d7c2848186555b01dd47c92df73080a5a342bae21dff074396802e26b0a2
|
File details
Details for the file clawcures-0.6.0-py3-none-any.whl.
File metadata
- Download URL: clawcures-0.6.0-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.14.3 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d71426af70797e1297b0f11820aa9402bd71fd5a029689dc7ff81feec54b5c71
|
|
| MD5 |
166108b4792aff62f41839274eeaa344
|
|
| BLAKE2b-256 |
48a2cb98a0246010dabcff516854e5e57095442471a6fd5ccbfe3960a414fb5c
|