Skip to content
Cap · Track · Check
CA0x7cfa…6A90

Compute budgets for AI agents.

Cap each task, track every retry, and check the bill.

  • Python in your browser
  • One budget per task
  • Hard stop at the cap
  • Bill on Robinhood Chain
  • CLI for agents
What it runs onNo partners, just parts
Pyodide 314CPython in WebAssembly
Web Workerterminated at the cap
Robinhood Chainchain id 4663
Solidity 0.8.28NoctiqRetryBudget
EIP-712signed runner reports
viem 2.57browser and CLI
Foundryunit, fuzz, invariant, fork
Chainlink ETH/USDUSD next to ETH
Next.js 16this site
Node 18+the runner CLI
Pyodide 314CPython in WebAssembly
Web Workerterminated at the cap
viem 2.57browser and CLI
Foundryunit, fuzz, invariant, fork
Chainlink ETH/USDUSD next to ETH
Next.js 16this site
Node 18+the runner CLI
Pyodide 314CPython in WebAssembly
Web Workerterminated at the cap
Robinhood Chainchain id 4663
Solidity 0.8.28NoctiqRetryBudget
EIP-712signed runner reports
viem 2.57browser and CLI
Foundryunit, fuzz, invariant, fork
Chainlink ETH/USDUSD next to ETH
Next.js 16this site
Node 18+the runner CLI
Pyodide 314CPython in WebAssembly
Web Workerterminated at the cap
The problemPer-session caps leak

Run the CSV example
Tasks on chain—reading /api/proof
Attempts recorded—reading /api/proof
Seconds billed—reading /api/proof
Robinhood Chain block—read now through /api/chain
Example tasksReal scripts, real runs

Three scripts that really run in your browser

Open the runner
Clean a sales CSV3 versions

Sum 400,000 rows by region. The first version trips on a bad value, the second on a short row, the third finishes.

Budget
20 s for every attempt together
Versions
v1: Reads every amount as a number. Fails on the row that says n/a. v2: Skips amounts that are not numbers. Still fails on the row with a missing column. v3: Skips bad amounts and short rows, then reports totals per region.
→| Open in the runner
import csv, io, random

# A sales export with 400,000 rows, generated the same way on every run (seed 7).
random.seed(7)
REGIONS = ["north", "south", "east", "west"]
rows = ["order_id,region,amount"]
for i in range(1, 400_001):
    rows.append(f"{i},{random.choice(REGIONS)},{random.randint(100, 99_999) / 100}")
rows[250_000] = "250000,south,n/a"   # a malformed amount
rows[320_000] = "320000,east"        # a row with a missing column
text = "\n".join(rows)

total = 0.0
for line, row in enumerate(csv.DictReader(io.StringIO(text)), start=2):
    total += float(row["amount"])
print(f"rows read: {line - 1:,}  total: {total:,.2f}")
Count primes1 version

A pure-Python sieve. Raise the limit and watch one attempt take a bigger share of the budget.

Budget
15 s for every attempt together
Versions
v1: Counts the primes below 3,000,000 with a plain sieve.
→| Open in the runner
LIMIT = 3_000_000
sieve = bytearray([1]) * LIMIT
sieve[0:2] = b"\x00\x00"
p = 2
while p * p < LIMIT:
    if sieve[p]:
        for m in range(p * p, LIMIT, p):
            sieve[m] = 0
    p += 1
count = sum(sieve)
print(f"primes below {LIMIT:,}: {count:,}")
A retry that never ends1 version

A loop with no exit. It runs until the task budget is used up, then the worker is terminated.

Budget
6 s for every attempt together
Versions
v1: Never finishes on its own: this is what the hard stop is for.
→| Open in the runner
steps = 0
while True:
    steps += 1
    if steps % 2_000_000 == 0:
        print(f"still running after {steps:,} steps")
How one budget worksNoctiqRetryBudget

Every attempt of a task draws from one shared budget; open it on chain to keep the bill.

Read the rules
01.

Set the cap

The manager opens a task with one budget in milliseconds, a price per second (0 means budget only) and the one runner allowed to report.

  • openTask(runner, budget, price, spec, label)
  • ETH held = budget × price
  • label up to 64 bytes
  • budget 0.1 s to 7 days
02.

Run an attempt

startAttempt reserves everything that is left. The script runs; the moment that reserve is used up, the run is stopped.

  • one attempt at a time
  • allowance = budget − used
  • worker terminated at 0
  • load time not counted
03.

Retry from what is left

A 60 s task whose first two tries used 25 s and 20 s gives the third try 15 s. Failed tries keep their cost on the bill.

  • no reset per session
  • report above reserve = cut
  • cut report ends the task
  • success ends the task
04.

Check the bill

Every attempt's reserve, duration, cost, status, script hash and output hash is public, with the transaction of each step.

  • read by anyone
  • output file re-hashable
  • verify-deployment script
  • events = the history
Two ways to price a taskSet by the manager

A budget with no money, or a budget that pays per second.

Budget only

Price 0. The ledger caps and records time; no ETH is held and nothing is paid.

0 ETHheld for any budget
  • One shared budget
  • Hard stop at the cap
  • Every attempt on the bill
  • Output hash per attempt
  • Only your gas

Paid per second

Example: 60 s at 0.000001 ETH per second. The contract holds it; the runner earns per attempt; the rest comes back.

0.00006 ETHheld for 60 s · USD value: reading Chainlink ETH/USD…
  • Cost = ms × price ÷ 1000
  • Hold rounds up, cost rounds down
  • Runner withdraws earnings
  • Manager withdraws the rest
  • No fee, no admin
Who can do whatEvery power, listed

Three roles, and nothing anyone can switch off for you.

Manager

  • opens the task, sets budget and price
  • names or changes the runner (not mid-attempt)
  • adds budget, never removes it
  • closes the task; a running attempt first gets its allowance plus 1 hour

Runner

  • starts the next attempt, which reserves what is left
  • reports duration, status and output hash
  • may sign reports so anyone can submit them
  • cannot change budget, price or payee

Nobody

There is no owner, admin, fee, pause or upgrade in NoctiqRetryBudget. ETH leaves only through withdraw(), to the account it is owed to.

Anyone

Reads every task and attempt, re-hashes an output file against the bill, and checks with npm run verify-deployment that the address runs this exact build.

What is not claimed

The chain does not watch code run. Durations are the runner's report, capped by the contract. In this browser the manager and the runner are usually the same wallet.

Quick answers8 questions

Before you run anything, read this

Does Python really run, or is it a recording?

It really runs. The runner loads Pyodide (CPython compiled to WebAssembly, served by this site) in a Web Worker in your browser and executes the script you see. The output, the error and the time are whatever your device produced.

What exactly is the hard stop?

When an attempt starts, it may use only what is left of the task's budget. A timer for that amount starts when the script is handed to the interpreter; if the script has not ended by then, the worker is terminated and the attempt is recorded as stopped at the cap. Loading the interpreter is not counted.

Who measures the time on chain?

The runner does. The chain cannot see a browser or a server, so NoctiqRetryBudget records the duration the named runner reports and cuts any report above the attempt's reserved allowance. It enforces the budget, the order of attempts and who may report; it cannot prove how long code ran.

Can a stranger bill my task?

No. Only the runner address you name when you open the task can start or finish attempts, directly or through an EIP-712 signature. You can change the runner while nothing is running.

Does any money move?

Only if you set a price. With price 0 the ledger records time and nothing else. With a price in ETH per second you hold budget times price in the contract; each finished attempt moves its cost to the runner's balance and what is left returns to your balance when the task ends. Both sides withdraw their own balance.

Can the manager cancel a running attempt?

Not right away. While an attempt runs, the manager can close the task only after that attempt's allowance plus one hour has passed; the attempt is then recorded as abandoned at 0 ms and 0 cost. Attempts that already finished keep their cost.

What do I need the $NOCTIQ token for?

Nothing today. Running tasks, recording attempts and reading bills work without it. Buying compute credits with the token is a Concept and is not built.

Is Noctiq part of Robinhood?

No. Robinhood Chain is the network the ledger lives on. Noctiq is not affiliated with Robinhood.