Nightly research agent that re-analyzes public datasets and reports one testable finding per run.
orchestrator/ – nightly run loop, budget enforcement
agent/ – swappable model backend (Claude Sonnet 4.5 / Ollama qwen3:32b)
sandbox/ – Dockerfile + launcher, rebuilt fresh every run
datasets/ – catalog, download helpers, bundled toy data
templates/ – question templates (YAML)
config/ – budget.yaml, allowlist.txt, system_prompt.md, critic_checklist.md
discord_bot/ – digest posting, publish/kill/rerun buttons
out/ – artifact bundles and published results
tests/ – dry-run harness, budget tests
Requirements: Python 3.12+, pip
# Clone and install
pip install -e ".[dev]"Optional (for production mode):
- Docker (for sandboxed execution)
- Anthropic API key:
export ANTHROPIC_API_KEY=sk-ant-... - Discord bot token:
export DISCORD_BOT_TOKEN=...andexport DISCORD_CHANNEL_ID=... - Ollama running locally with
qwen3:32bpulled
make demoThis runs one full cycle in dry-run mode:
- Loads and checks
config/budget.yaml - Selects the toy expression dataset
- Generates an analysis script (dry-run: uses a bundled script)
- Executes in local sandbox (subprocess)
- Runs self-critic checklist
- Produces artifact bundle in
out/bundle_<timestamp>/ - Posts digest to stdout (local Discord test mode)
- Simulates publish gate
make testexport ANTHROPIC_API_KEY=sk-ant-...
python run.py --question diff_expr --verbosepython run.py --dry-run --docker --question diff_exprControls spending limits and the kill switch. The orchestrator will not run without this file.
| Key | Description |
|---|---|
daily_budget_usd |
Hard cap per nightly run |
monthly_budget_usd |
Hard cap per calendar month |
max_input_tokens |
Token limit for agent input |
max_output_tokens |
Token limit for agent output |
fallback_enabled |
Try Ollama if Claude exceeds budget |
kill_switch |
Set to true to halt all runs |
Python packages allowed inside the sandbox. One per line.
The system prompt sent to the agent. Defines rules for analysis quality, reproducibility, and artifact format.
Self-critic checklist run after every analysis. Covers statistical rigour, reproducibility, data integrity, claim quality, and artifact completeness.
Each run produces a bundle in out/bundle_<timestamp>/:
| File | Description |
|---|---|
post.md |
Short write-up of the finding |
plot.png |
Publication-quality figure |
raw_results.csv |
Numerical results behind the claim |
run_log.txt |
Full stdout/stderr archive |
reproduce.sh |
Script to regenerate results |
Prints the digest to stdout and simulates the publish gate. No credentials needed.
Set DISCORD_BOT_TOKEN and DISCORD_CHANNEL_ID environment variables. The bot posts an embed with three buttons:
- Publish – moves the bundle to
out/published/(explicit human approval required) - Kill – marks the run as killed, bundle is not published
- Rerun – requests the next nightly cycle to re-process the dataset
There is no auto-publish. A human must click Publish.
- GEO and GTEx dataset downloads are stubbed (only the toy dataset works locally)
- The Discord bot in local mode simulates a publish click automatically for testing; in production it waits for a real button press
- Sandbox mode requires Docker to be installed and running
- The critic pass checks basic artifact presence and finding validity, not deep statistical review