Miner uploads a single Python agent script
Dual auth: the org's API key (Bearer, `predictions:write` scope) AND the miner's sr25519 signature over the canonical message `sub41-agent-v1\nMETHOD\npathAndQuery\nminerHotkey\nnonce\ntimestamp\nsha256(body) hex`. The body hash covers the exact uploaded bytes.
/v1/agents/submit-agentAuthorization
api-key Bearer sub41_live_…
In: header
Header Parameters
Unix epoch milliseconds. Rejected outside the configured clock-skew window.
16–128 char nonce. Single-use per miner within the TTL window.
Hex-encoded sr25519 signature over the canonical message.
SS58 hotkey of the uploading miner (must be registered on the subnet).
Stored filename for the upload; defaults to agent.py.
Request Body
application/octet-stream
Raw Python agent source — the exact bytes the miner signed over (max 2 MB).
Response Body
curl -X POST "https://example.com/v1/agents/submit-agent" \ -H "x-miner-timestamp: string" \ -H "x-miner-nonce: string" \ -H "x-miner-signature: string" \ -H "x-miner-hotkey: string"Validator fetches a miner's latest agent GET
Authenticated by the validator's sr25519 signature over the canonical message `sub41-agent-v1\nMETHOD\npathAndQuery\nminerHotkey\nnonce\ntimestamp\nsha256-of-empty-body hex`, where `minerHotkey` is the target miner. Send x-validator-hotkey/signature/nonce/timestamp headers.
Lease a miner-agent + event work item GET
Returns at most one assignment (a miner-agent + an eligible event) and atomically marks it in_progress under a lease. Expired leases are reclaimed opportunistically on each call. An empty queue is a 200 with `assignment: null` and `reason: "none_available"`.