Quickstart
From nothing to a report in about five minutes.1. Install
Requires Python 3.10 or newer. The core harness has no runtime dependencies; bittensor is an optional extra, needed only for signature verification and live-chain reads.
# run it without installing anythinguvx --from assay-bittensor assay list# or install ituv pip install assay-bittensor# signature checks and live replayuv pip install "assay-bittensor[chain]"
uvx needs --from because the distribution name and the command name differ — assay is taken on PyPI. Same reason python-dateutil installs dateutil.
2. Write an adapter
A mechanism receives a batch of responses and a function that scores one response. It returns a mapping of uid to weight.
pythonfrom assay import Batch, Mechanismclass MySubnet(Mechanism):name = "my-subnet"def score(self, batch: Batch, evaluate) -> dict[int, float]:weights = {}for response in batch.responses:# evaluate() returns a noisy quality in [0, 1].# It is deliberately noisy: one look should not be enough.weights[response.uid] = evaluate(response)return weightsMECHANISM = MySubnet()
3. Run it
# human-readable tableassay run assay_adapter.py# markdown to paste into a README or a PRassay run assay_adapter.py -f markdown -o report.md# one scenario onlyassay run assay_adapter.py -s sybil_farm# replay a real subnet's miner distributionassay run assay_adapter.py --netuid 64
Next
Read the scenario library to understand what each failure means, or go straight to the CI integration page to gate a pull request on the result.