Quickstart
Run the entire subnet on your laptop in about two minutes — no API key, no chain, no confidential VM.
Preview. Thirty Spokes is registered on Bittensor as Subnet 99; the user-facing gateway (
api.thirtyspokes.ai) is not built yet. What you can run today — offline, no chain and no key needed — is the real mechanism: the competition, the attestation shape, the grading, the reign. Everything below actually executes.
1. Install
git clone <this repo> && cd thirtyspokes
uv venv --python 3.12 && uv pip install -e ".[dev]"
uv run pytest -q # the invariant suite
The core is numpy-only. Extras are opt-in: eval (OpenRouter + real datasets), chain (bittensor + HuggingFace), tee (dcap-qvl, full DCAP verification).
2. Watch the whole mechanism run
uv run orchestra-koth-sim
This runs a full multi-epoch competition offline with a cast of adversaries, and prints who earned what and who was disqualified:
cumulative emissions:
honest-strong 2.000 61.5%
burn 1.750 -- [burn]
honest-weak 1.250 38.5%
disqualifications: {'hardcoder': 'hardcoded_answers', 'substituter': 'artifact_binding_mismatch',
'lying-rt': 'unapproved_runtime', 'fake-quote': 'bad_platform_quote',
'replayer': 'epoch_nonce_mismatch', 'memorizer': 'memorization',
'copier': 'copy_of:<hotkey>'}
Every defence fires: the hardcoder is caught by the public-source scan, the substituter's hashes don't bind, the lying runtime and fake quote fail attestation, the replayer's nonce is stale, the memorizer collapses on the held-out probe, and the copier loses to the earliest commit. The better honest router wins the reign.
This sim runs the opt-in probe audit (
audit_mode="probe") so it can demonstrate the re-execution collapse test →memorization. The live daemons default to the grounding check (proof-inspection, no re-execution), where the same memorizer would DQ asungrounded. (Thecopy_ofhotkey is random per run.)
3. Score your own agent, exactly as a validator would
Write an agent — one function:
# my_router.py
import json
def build_agent(weights):
cfg = json.loads(weights.decode())
def agent(prompt, call_model):
return call_model(cfg["model"], [{"role": "user", "content": prompt}], {"max_tokens": 256})
return agent
Then score it with the dev kit, which calls the same verify_proof the validator calls — not a reimplementation:
echo '{"model": "strong"}' > my_weights.bin
uv run orchestra-koth-dev --source my_router.py --weights my_weights.bin
{
"valid": true, "reason": "ok",
"per_bench": { "math": {"acc": 0.875, "lcb": 0.75, "cost": 0.0021}, "...": {} },
"total_cost": 0.0084, "Q_lcb": 0.7412, "n_pool_calls": 32,
"eligible": true, "eligibility": "ok"
}
Iterate here until Q_lcb is high and eligible is true under the budget. This costs nothing — it runs against an offline mock pool by default.
4. See the decoupled architecture
Miner and validator are separate processes that never talk to each other. This demo proves it: the miner produces and uploads an attested proof; the validator independently downloads, verifies, grades, and sets weights.
uv run orchestra-koth-local
5. Real models, real cost
With an OpenRouter key, run the same flow against real MMLU + GSM8K questions and a real bill:
export OPENROUTER_API_KEY=...
uv run python scripts/koth_live_smoke.py
6. On real hardware
If you're on an Intel TDX confidential VM (how to get one), you can exercise the genuine attestation stack:
uv run python scripts/koth_tdx_smoke.py # real TDX quote over a proof; forgery + wrong-MRTD rejected
uv run python scripts/koth_rtmr_smoke.py # RTMR3 runtime bind; the validator gate accepts/rejects
What's next
- Build a Router — the patterns that actually move
Q_lcb - Mine the Subnet — publish your bundle and compete on-chain
- The KOTH Protocol — the full mechanism and every parameter
- Findings — what we measured about routing, including the parts that hurt
The planned API
Once the gateway exists, using Thirty Spokes will be one line:
from openai import OpenAI
client = OpenAI(base_url="https://api.thirtyspokes.ai/v1", api_key=KEY)
r = client.chat.completions.create(model="auto", messages=[...])
See Using the Gateway for what is decided and what is still open.