Reins for
AI agents

Let your agent pay for APIs, data and compute on NEAR — inside a budget it cannot change. The agent gets a limited key; the contract keeps the rules and checks every payment.

Built on NEAR • Agent safe • Keys stay home •

Three steps. Your keys stay home.

A rein is a NEAR function-call key added to your own account. NEAR itself stops that kind of key from moving money directly or calling anything except the three agent methods on the Reins contract.

1

Describe it

Type what the agent may spend, in plain English. Reins turns it into terms you review, then your wallet signs create_rein.

2

Hand over a key

Your wallet adds a new key that can only call pay, request_approval and issue_subrein. Paste it into Claude or Codex with one command.

3

The chain decides

Each payment is checked on-chain against your rules and paid from your vault. A failed transfer puts the budget back.

A budget it can't raise

You set a spend limit per day or week, a cap per payment, an expiry and a merchant list. Only your wallet can change them; the agent's key can't.

update_terms needs your wallet

Big buys ask first

Above your threshold the agent files a request instead of paying. You approve it from your phone; the contract re-checks the rest.

request_approval · approve_request

One tap to stop

Freeze a rein for a moment, revoke it and every sub-rein for good, or revoke everything you own in one transaction.

freeze · revoke · revoke_all

Scams get shared

Anyone can report a drain address with a bond and proof. Every agent on Reins refuses to pay it unless its owner allows it.

bonded blocklist

Checks before it pays

Is the account new? Did its code just change? Does the name imitate one you trust? A warning asks you; a block never signs.

allow · warn · block

Agents split, never mint

An agent can hand a sub-agent a smaller rein. It only works once you add its key, and its spending counts against the parent.

issue_subrein

Stablecoins too

A rein can budget in a NEP-141 token instead of NEAR. Deposit it once; the contract pays merchants with ft_transfer.

NEP-141 · tUSD on testnet

Pays on other chains

The same limits gate payments on Base Sepolia: the contract asks NEAR's MPC network to sign, and only if the rein allows it.

Chain Signatures

Each agent, its own account

Give an agent a named sub-account like research.you.testnet. Its key lives there, never on your account.

named sub-accounts
The agent holds a key. The chain holds the rules.
— how Reins works, in one line

One rein per agent

Each agent gets its own rein and its own key. Freeze one without touching the others; give a sub-agent a smaller one; see what each spent today.

claude mcp add reins \
  -e REINS_OWNER=you.testnet \
  -e REINS_AGENT_KEY=ed25519:… \
  -- bun run Reins/packages/mcp/src/index.ts
# tools: rein_status, check_counterparty, pay, …
Research
0.5 Ⓝ / day · cap 0.2
ed25519:DQRq…Rr5u
Scraper
0.1 Ⓝ / day · sub-rein
ed25519:DKmo…EP8m
Shopper
1 Ⓝ / week · 2 merchants
ed25519:wiAo…afd

The rules, in order

Who is paying
unknown keyThe key that signed must be bound to a live rein on your account.
Is it on
rein not activeFrozen or revoked reins can't pay.
Per payment
over per tx capNo single payment above the cap, approved or not.
Per window
over budgetSub-rein spending counts against every parent too.
To whom
receiver blockedReported accounts are refused unless you allow them.
Big ones
needs approvalAbove the threshold, you decide.

Give it a rein