DocsAgent Reference (raw specs for agents)
Compute credit pays for the sandboxes an agent runs its tools in. It is prepaid: the
wallet buys a fixed USDC chunk over x402, and the sandbox broker holds and debits credit for each
second a sandbox runs. There is no provider account and no card. Credit is the same unit as hosted
agent credit ($0.05 a credit), never expires, and is not refunded in cash during the beta.
Every purchase goes through the CLI's journaled x402 payer under a compute allocation that the
user approves with daily and monthly caps. A compute allocation admits only compute purchases:
it never draws on an inference or marketplace-fee allocation, and they never draw on it.
| Command | Description | ||
|---|---|---|---|
termix agent credits setup --per-day <usd> --per-month <usd> [--total <usd>] | Approve the compute allocation's caps at a terminal. Needs a TTY; nothing unattended can run it. --total defaults to twelve months. | ||
termix agent credits setup ... --auto-top-up-below <credits> [--auto-top-up-amount <usd>] [--auto-top-up-max-per-day <n>] | Also approve auto-top-up: buy one chunk when available credit falls below the threshold, at most n chunks a UTC day (default 1, at most 10). | ||
| `termix agent credits buy [--amount 1\ | 5\ | 10] [--yes]` | Show the rate, then buy one chunk from the compute allocation. Without --yes it asks at the terminal. The default size is the one the pricing marks as default ($1). |
termix agent credits status | Balance, rate, recent debits, recent purchases, and the caps with what they have used today and this month. Reading the balance is the client's balance check, so when auto-top-up was approved and available credit is below its threshold, it buys one chunk as credits check does. | ||
termix agent credits check | The client's balance check: when auto-top-up was approved and available credit is below the threshold, buy one chunk. It and credits status are the only commands that start an automatic purchase. | ||
termix agent credits reconcile [--release <key>] [--yes] | Settle purchases whose response was lost, by their idempotency key; it never pays again. --release <key> stops waiting on this device for one that stays unresolved: it is never resent, and the backend still grants it if it was paid. Asks at the terminal without --yes. | ||
termix agent credits disable-auto-top-up | Turn auto-top-up off and close its allocation. |
The rate comes from GET /api/compute/pricing: credits an hour for each sandbox size, the
purchase sizes, and the accepted rails with the address each pays. A new rate card applies only to
seconds metered after it takes effect. Since 2026-11-15 the rate is 2 times the provider's cost
(1.44 credits an hour for a default sandbox, 0.72 for a small one); it was 1.2 times before. Before anything is signed, the payer checks that the 402
challenge asks for exactly the chosen size and pays exactly that address; any other challenge is
refused with challenge_mismatch, and nothing is signed or recorded.
TERMIX_HOME.allocation_exhausted, naming the capperDay, perMonth or amount), before anything is signed.purchase_pending), since that purchase may already have bought the credit.credits status or credits check: the result's topUp isskipped with a reason (daily_cap, allocation_cap, allocation_closed,payment_failed, outcome_unknown or check_failed), and for the last three a code such aschallenge_mismatch, policy_denied or network. outcome_unknown means it may have beenpending and settled by its key like any lost purchase.credits setup again opens a new allocation with the new caps and closes the old one.marketplaceFees bound for the network and asset also bounds computemaxPerPayment below the purchase sizepolicy_denied.The model never buys credit. Its tools run in the sandbox, which holds no wallet, and the agent
host refuses any marketplace tool whose name mentions buying, purchases, credit or top-ups. Only a
person running credits setup, credits buy, or the client's own balance check (credits check
or credits status) starts a purchase, and every one is bounded by the caps the person approved.
An agent that observes its balance, such as a sandbox's low_credit warning, runs that same
check.
A purchase is written to compute-credit-purchases/ under TERMIX_HOME before it is sent
and removed once its outcome is known. When the response is lost (outcome_uncertain), the record
stays. The next credits status, credits check, credits buy or credits reconcile settles
it:
Nothing is ever paid twice for one purchase. credits buy settles these first and buys nothing
when an earlier purchase is still unresolved (purchase_pending) or has just turned out granted
(earlier_purchase_granted); run it again to buy more. The purchase_pending error names each
unresolved purchase and why it is waiting. credits reconcile tries to settle it again, andcredits reconcile --release <key> stops waiting for one that stays unresolved, for instance
while the backend is still settling it or cannot be reached. A released purchase is never sent
again, so buying again after releasing it may pay twice. Automatic top-up waits while any
purchase is unresolved. termix x402 payments reconcile <paymentId> reconciles the payment
journal directly.
Setup, disable-auto-top-up, buy, check and the settling above take turns throughcompute-credits.lock under TERMIX_HOME, so two balance checks at once buy one chunk. A
command that waits more than two minutes for another gives up with busy.
Path under TERMIX_HOME | Contents |
|---|---|
compute-credits.json | The approved allocation IDs and auto-top-up settings. Owner-only; no secrets. |
compute-credit-purchases/ | Purchases whose outcome is not yet known. |
compute-credits.lock | Held while one compute credit command decides and buys. |
x402-payments.allocations.jsonl | The allocations and their caps, beside the payment journal. |