Reading the repo
Opening the box…
Reading the repo
Opening the box…
How to install on Windows
Calibrain Harness: a forward-testing harness for trading crypto perpetuals with fast classification models (Kairos today) on Bybit testnet. Under development.
Saved setup from just now
Will it work on Windows?
Calibrain Harness is built for any fast classifier that returns calibrated probabilities over a fixed set of options. Kairos and Jev are supported today; switch between them live with MODEL in the terminal's function-key bar.
| Model | Provider | Model id | Key | Status |
|---|---|---|---|---|
| Kairos | DMind via Minara Cloud | DMIND/Kairos | KAIROS_API_KEY | Supported (also powers news_return forecasts) |
| Jev | TypeSafe | jev-1.14.0 (pinned; override with CTB_JEV_MODEL) | TYPESAFE_API_KEY | Supported |
| Other System One style models | | | | Add a ModelSpec in ctb/models.py |
Both are called the same way (POST /v1/systemone with a state and typed questions), so the question
set, validation, calibration, policy and evaluation are shared. What is kept per model: every
decision is stamped with the model that made it, calibration weights are fitted per model (and per
trading timeframe), EVAL and reports filter by model, and switching models starts a new run (only
while the bot is flat), so results never mix two models.
Heads-upIt also needs 33 settings in .env (4 secret).
Then run powershell -ExecutionPolicy Bypass -File .\setup.ps1. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Compare yours with the README's “Supported models” list above before installing anything.
Needs Git: winget install Git.Git
git clone https://github.com/zadescoxp/calibrain-harness.git cd calibrain-harness
Python 3.x (no version pinned), Node.js
winget install Python.Python.3.12 winget install OpenJS.NodeJS.LTS
Fill in secrets: KAIROS_API_KEY, TYPESAFE_API_KEY, BYBIT_API_KEY, BYBIT_API_SECRET
Copy-Item .env.example .env
python -m venv .venv .venv\Scripts\Activate.ps1 pip install -r requirements.txt
pytest
Requirements: Python 3.12, Node.js 20+ with npm, a Kairos or Jev API key, and Bybit testnet API keys.
git clone https://github.com/zadescoxp/calibrain-harness.git
cd calibrain-harness
# 1. Python service (data, model calls, execution, API)
python3.12 -m venv .venv && .venv/bin/pip install -r requirements.txt
cp .env.example .env # add keys here, or later in the terminal (KEYS)
# 2. Terminal UI (Next.js): build once into web-next/out
cd web-next && npm ci && npm run build && cd ..
# 3. Start everything
.venv/bin/python -m ctb.server
Open http://127.0.0.1:8800. The Python service serves the built UI, the API and the live /ws
socket from that one address; there is no separate Node process to run.
CTB_MODEL_PROVIDER=kairos|jev or MODEL in the terminal. Bybit testnet keys come from
testnet.bybit.com → API management with
Contract → Orders + Positions and no withdrawal permission.touch KILL in the project folder: closes bot positions,
cancels orders and halts.| Task | Command | Notes |
|---|---|---|
| Rebuild after pulling or editing UI code | cd web-next && npm run build | Reload the page; no server restart needed. |
| Live-reload development | cd web-next && npm run dev | Open http://localhost:3000 with the Python server still running; the dev UI talks to its API and /ws on 127.0.0.1:8800. |
| Type-check | cd web-next && npx tsc --noEmit | |
If the UI has not been built yet, http://127.0.0.1:8800 shows a short page with the build command; the API and the live socket work either way.
.venv/bin/python -m pytest -q tests # unit tests (no network)
.venv/bin/python scripts/kairos_smoke.py SOLUSDT # one real request to the active model + validation
.venv/bin/python scripts/kairos_smoke.py SOLUSDT --model jev # same, against a specific model
.venv/bin/python scripts/testnet_smoke.py SOLUSDT long # min-size testnet open -> verify stop -> close
No reports for Windows yet.
GitManual AI Agent reads the 3 key files and writes a step-by-step guide for Windows. Once written, it's saved for everyone.