Docs

Tickbox documentation

Quickstart

Needs Node 18.17 or newer. The package has no dependencies. Run it without installing:

npx tickbox run -- echo hello                 # local: metered + signed, free
npx tickbox run --cloud -- echo hello         # cloud sandbox, uses the free trial
npm install -g tickbox                        # or install it

Your account is the ed25519 key the CLI creates at ~/.tickbox/node.key (mode 0600). No sign-up, no API key. A new account gets 0.02 USDG of free cloud time on its first request to the node, once (about 50 seconds).

Local vs cloud

Local (default, no --cloud): the command runs on your machine, seconds are metered and the receipt is signed by your local key with settlement: "local". No money moves.

Cloud (--cloud, --cloud <url> or TICKBOX_CLOUD): the command runs in a sealed sandbox on a Tickbox node. The budget is held from your balance, the seconds are paid, the rest is refunded, and the node signs the receipt with settlement: "ledger".

export TICKBOX_CLOUD=https://api.tickbox.cloud   # make cloud the default

CLI

CommandWhat it does
tickbox run [--budget 2.00] [--worker name] [--cloud [url]] -- <cmd>Runs the command, meters it per second, stops it when the budget runs out, signs a receipt. Exit code is the command's own, or 124 when the budget ran out.
tickbox quote <seconds> [--rate]Cost of that many seconds.
tickbox receipts [--json]All receipts on this machine, newest first.
tickbox verify <file | session id | URL> [--offline]Checks a receipt's signature and node key, then its anchor on chain (--offline skips the anchor).
tickbox keys create --budget 1.00 [--expires 24h] [--workers python,shell] [--label name]Makes an agent key paid by this account; saves it to ~/.tickbox/keys/<id>.key.
tickbox keys listYour agent keys with spend, limit, expiry and status.
tickbox keys revoke <id>Revokes a key at once and closes its open sessions.
tickbox account [--cloud [url]]Prints your account id; with a node also balance, deposits, recent sessions and a funding link.
tickbox whoamiKey id and public key.
tickbox mcp [--max-budget 0.10]Starts the MCP server on stdio.
tickbox mcp setupPrints the JSON config block for Claude Desktop, Cursor and other clients.
tickbox run --budget 2.00 -- python scraper.py
tickbox run --cloud --worker python --budget 0.05 -- python3 -c "print(6*7)"
tickbox run --cloud --worker shell -- sh -c 'cmd1; cmd2'

SDK

import tickbox from "tickbox";

const s = await tickbox.open({ worker: "python", budget: "0.05", cloud: true });
const r = await s.exec('python3 -c "print(6*7)"');   // { code, stdout, stderr }
const receipt = await s.stop();                       // signed receipt
tickbox.verifyReceipt(receipt);                       // { ok: true }

open takes budget or seconds, plus an onTick callback. Leave out cloud to run locally.

Sandbox & limits

LimitValue
Workersshell (POSIX sh), python (3.12), node (24)
Memory150 MB hard limit
CPU0.5 core
Processes64 max
File size64 MB per file
Networknone — no traffic in or out
Filesystemread-only system; /work is writable and wiped when the session stops
Idleclosed after 120 s with no command running
Sessions1 open session per account
Isolationown namespaces (bubblewrap or a locked-down container), seccomp syscall filter, no root

Pricing

0.0004 USDG per started second. 1.2 s of wall clock bills as 2 seconds. A session holds at most 2 USDG; whatever is not used is refunded the moment it stops. Money is integer maths in 6-decimal units.

412 s at 0.0004 = 0.164800 USDG paid · 1.835200 refunded from a 2.00 budget
0.02 trial      = 50 s
0.10 MCP cap    = 250 s

Funding

Deposit USDG to the Tickbox vault on Robinhood Chain (chain 4663). The node credits your account after 3 confirmations, once per (transaction, log index). Use the fund page, or script it:

1. USDG.approve(vault, amount)                 // USDG has 6 decimals
2. vault.deposit(bytes20 account, uint256 amount)
   event Deposit(bytes20 indexed account, address indexed from, uint256 amount)

Deposits pay for compute on that node and cannot be withdrawn back to the depositor. Unused session budget always returns to your balance.

Receipts

Saved as JSON in ~/.tickbox/receipts/ and served publicly at /v1/receipts/:id.

FieldMeaning
v, modeformat version; local or cloud
session, account, worker, imagewho ran what, where
opened, closed, secondswall-clock window and billed seconds
rate, budget, paid, refund6-decimal amounts with currency
statuscompleted, budget_exhausted, idle_timeout, interrupted, node_shutdown, failed
settlementledger (cloud) or local
keythe agent key that opened the session, when it was not the account key
execseach command with its exit code and signal
outputsha256 of everything printed to stdout and stderr, in order
node{ id, pub } — id is the first 20 bytes of sha256(pub)
siged25519 over the canonical JSON (sorted keys, no whitespace) of every other field
npx tickbox verify ~/.tickbox/receipts/0x….json
npx tickbox verify https://api.tickbox.cloud/v1/receipts/0x…

Agent keys

Give every agent its own key: a spend limit, an expiry, the workers it may use, revoke anytime. Sessions it opens are paid by your account, and its receipts carry a key field. An agent key cannot make or list other keys. You can also create them on the Playground.

tickbox keys create --budget 1.00 --expires 24h --workers python,shell --label my-agent
tickbox keys list
tickbox keys revoke 0x…

TICKBOX_KEY=~/.tickbox/keys/0x….key npx tickbox run --cloud -- echo hello
claude mcp add tickbox -e TICKBOX_KEY=/path/0x….key -- npx -y tickbox mcp

Registering a key takes two signatures: your account key signs the request, and the new key signs its own grant, so nobody can bind someone else's key to their account:

grant = { v: 1, type: "tickbox-subkey", parent: <account id>, key: <new key id>,
          budget: "1.000000", expires: <ISO or null>, workers: [..] | null, label: <string | null> }
sig   = ed25519(new key, canonical(grant))

Anchoring

Every minute the node seals the receipts closed since the last batch into one sha256 Merkle root and publishes it on Robinhood Chain. A receipt then proves it existed in that batch, and nobody can rewrite it later — not even the node.

leaf = sha256(0x00 || canonical(receipt))          // whole signed receipt, sig included
node = sha256(0x01 || left || right)               // an odd node moves up as is
root = "0x" + hex

GET /v1/receipts/:id/proof → { index, proof: [{ side: "L"|"R", hash }], anchor: { n, root, status, tx } }
check: recompute the root, then eth_call roots(n) on the contract → must equal root
TickboxAnchorDoes
anchor(uint256 n, bytes32 root, uint256 receipts)Node publishes batch n (owner only).
roots(uint256 n) → bytes32The root published for batch n (selector 0xc2b40ae4).
count() → uint256Number of batches published.
event Anchored(uint256 indexed n, bytes32 root, uint256 receipts)Emitted for every batch.

tickbox verify prints the anchor status after the signature check; --offline skips it. Tickbox Scan runs the same check in your browser.

HTTP API

Base URL https://api.tickbox.cloud. Public routes need nothing; signed routes carry four headers.

RouteAuthDoes
GET /v1/nodepublicnode id, rate, workers, limits, deposit details
GET /v1/statspublicsessions, seconds, paid, accounts, recent receipts
GET /v1/receipts/:idpublica closed session's receipt
GET /v1/accountsignedbalance, held funds, deposits, recent sessions
POST /v1/sessionssigned{worker, budget} — open a sandbox, hold the budget
POST /v1/sessions/:id/execsigned{cmd} — output streamed as NDJSON
POST /v1/sessions/:id/stopsignedclose, settle, return the signed receipt
GET /v1/sessions/:idsignedstatus, and the receipt once closed
GET /v1/receipts/:id/proofpublicMerkle proof and batch (or status: unanchored)
GET /v1/anchorspubliclatest batches: n, root, receipts, status, tx
POST /v1/keysaccount{pub, budget, expires, workers, label, sig} — register an agent key
GET /v1/keysaccountyour agent keys
POST /v1/keys/:id/revokeaccountrevoke a key, close its sessions
x-tickbox-key    SPKI public key, base64
x-tickbox-ts     unix time in ms
x-tickbox-nonce  random hex, never reused
x-tickbox-sig    ed25519 over METHOD\nPATH\nTS\nNONCE\nsha256(body), base64
# requests older than 60 s or with a reused nonce are refused

MCP server

Give Claude, Cursor or any MCP client its own sandbox. Every run has a spend cap (default 0.10 USDG, set with --max-budget or TICKBOX_MAX_BUDGET).

claude mcp add tickbox -- npx -y tickbox mcp
npx tickbox mcp setup        # JSON block for other clients
ToolDoes
tickbox_runOne shot: code (python, node or sh) or a command, optional files and outputs. Returns stdout, stderr, exit code, seconds, paid, refund and the verified receipt.
tickbox_session_openOpens a persistent sandbox, billed per second, closed after 2 idle minutes.
tickbox_execRuns code or a command in an open session; /work persists between calls.
tickbox_session_closeCloses, settles, refunds and returns the verified receipt.
tickbox_accountAccount id, balance, free trial, rate, workers and funding instructions.
tickbox_quotePrice of a number of seconds.
tickbox_verifyVerifies a receipt from a session id, URL or JSON.
tickbox_receiptsLatest receipts on this machine.

Files are text content or a local_path, up to 512 KB per call, written into /work. Outputs are paths inside /work, saved to ~/.tickbox/files/<session>/; text files up to 64 KB also come back inline.