Web control plane for Refua campaign orchestration and scientific execution.
Project description
refua-studio
refua-studio is the Refua web control plane for planning and running discovery campaigns.
It provides:
- Mission control UI for planning (
plan), execution (run), and autonomous loops (run-autonomousbehavior) - JSON plan editor with validation and direct execution
- Portfolio ranking UI for disease program prioritization
- Built-in objective/plan/portfolio templates loaded from workspace examples
- Promising drug portfolio section with candidate cards, scores, metrics, and full detail view
- Persistent background job history (SQLite)
- Job lifecycle operations (filter, cancel queued jobs, clear finished jobs)
- Runtime/tool introspection with graceful fallback when heavy ML deps are unavailable
This project is designed to reuse existing workspace components:
ClawCuresfor planning, policy checks, orchestration, and portfolio rankingrefua-mcpfor tool execution when runtime dependencies are installed
Install
cd path/to/refua-studio
pip install -e .
Run
refua-studio --host 127.0.0.1 --port 8787 --open-browser
Or from source without install:
cd path/to/refua-studio
PYTHONPATH=src python -m refua_studio --host 127.0.0.1 --port 8787
Configuration
Studio uses the same OpenClaw-related environment variables as ClawCures:
REFUA_CAMPAIGN_OPENCLAW_BASE_URL(default:http://127.0.0.1:18789)REFUA_CAMPAIGN_OPENCLAW_MODEL(default:openclaw:main)REFUA_CAMPAIGN_TIMEOUT_SECONDS(default:180)OPENCLAW_GATEWAY_TOKENorREFUA_CAMPAIGN_OPENCLAW_TOKEN
CLI flags:
--host--port--data-dir(default:.refua-studio)--workspace-root(defaults to parent workspace)--max-workers(background job concurrency)
API Endpoints
GET /api/healthGET /api/configGET /api/toolsGET /api/examplesGET /api/drug-portfolio?min_score=50&limit=60GET /api/jobs?limit=80&status=running,failedGET /api/jobs/{job_id}POST /api/jobs/{job_id}/cancelPOST /api/jobs/clearPOST /api/planPOST /api/runPOST /api/plan/validatePOST /api/plan/executePOST /api/portfolio/rank
POST /api/run payload
{
"objective": "Design an initial campaign against KRAS G12D",
"system_prompt": null,
"dry_run": false,
"async_mode": true,
"autonomous": false,
"max_rounds": 3,
"max_calls": 10,
"allow_skip_validate_first": false,
"plan": null
}
Background Jobs
Jobs are persisted in SQLite at:
<data-dir>/studio.db
Each job records request payload, status transitions (queued -> running -> completed/failed), result JSON, and error text.
cancelled is also tracked when queued jobs are cancelled before execution.
Runtime Behavior
- If
refua-mcpruntime dependencies are available, Studio executes plans throughRefuaMcpAdapter. - If unavailable, Studio falls back to a static tool list for planning/validation and emits warnings.
- Dry-run workflows and policy validation remain usable even without heavy runtime dependencies.
Tests
cd path/to/refua-studio
python -m unittest discover -s tests -v
Project Layout
refua-studio/
src/refua_studio/
app.py
bridge.py
cli.py
config.py
runner.py
storage.py
static/
index.html
app.js
styles.css
tests/
Notes
- The Studio UI is a static single-page app served by the Python server.
- No third-party web framework is required.
- This keeps installation lightweight while still integrating with the existing Refua ecosystem.
Project details
Release history Release notifications | RSS feed
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 refua_studio-0.6.0.tar.gz.
File metadata
- Download URL: refua_studio-0.6.0.tar.gz
- Upload date:
- Size: 32.2 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 |
c1ae7168db774cfd2d8219b1db7a722dcb5cc51de0f8ea931cfb3c69daae5129
|
|
| MD5 |
98390fc8a732fff6e35d370741f7cc08
|
|
| BLAKE2b-256 |
3a7f5f4289c6906c320cbdf0f181a33779d34d14d4a6ab4646047446b3d99b58
|
File details
Details for the file refua_studio-0.6.0-py3-none-any.whl.
File metadata
- Download URL: refua_studio-0.6.0-py3-none-any.whl
- Upload date:
- Size: 30.3 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 |
90ed1fc1cea2a50e2a55b1d06aa4cba6023e3fd9a876d27a9eaf422deea14ca1
|
|
| MD5 |
e605e91a1e593e3e266a460d00a95547
|
|
| BLAKE2b-256 |
bc3d3dbb0c2bf29bf6a62d83c7b7bf70a7ae8551ac23a41d610fec16b7d14bab
|