Skip to documentation
allowance.os Documentation
Browse documentation

Control agent spending from one inspectable boundary.

Sign in with your EVM wallet, create a spend control, and give an agent limited ERC-20 authority on Robinhood Chain Testnet.

Current build
0.1 testnet preview
Active boundaries
CLI or testnet vault
Observed spend
Reported allowed attempts
Settlement
RPC evidence recorded

The control lifecycle

  1. 1CreateSet budget, recipients, expiry
  2. 2PairConnect one workspace
  3. 3AuthorizeEvaluate each attempt
  4. 4ObserveInspect decisions and spend
  5. 5OperatePause, resume, reconnect

Go from browser to connected agent

#

Create a control in the browser, then run the version-pinned CLI command in the agent workspace. You do not need to clone a repository, install a global binary, or save an executable file.

Agent workspace
npx allowanceos@0.1.0 connect AOS-XXXXX-XXXXX --server https://allowanceos.fun

npx fetches the exact package version into npm's cache and runs it. The temporary pairing code expires after ten minutes and works once.

Create a spend control

#

Sign a one-time login message with MetaMask, Rabby, or another EVM wallet. Then assign a budget, per-payment cap, recipient addresses, and expiry to one agent connection.

Use the product

  1. 1

    Open onboarding or choose Create control from the product.

  2. 2

    Name the control and set the total budget and per-payment limit.

  3. 3

    Add one recipient per line and choose an expiry in the future.

Control management stays in the wallet-authenticated product. AllowanceOS stores a revocable HTTP-only session cookie after it verifies the signature.

Total budget

Maximum observed allowed spend for the control.

Per payment

Maximum amount for one payment attempt.

Recipients

Exact strings the policy engine accepts.

Expiry

ISO timestamp after which attempts receive CONTROL_EXPIRED.

Pair an agent workspace

#

Run the generated npx command in the intended agent workspace. npm fetches and executes the exact package version; no repository, global install, or manually managed script is involved.

1Inspect

Read the package source.

2Run

Use the pinned npx command.

3Connect

Redeem the one-time code.

The package version is explicit

The command names allowanceos@0.1.0. Check its source and npm provenance before running a release you have not reviewed.

Pairing codes expire

A code works once for ten minutes. Creating a newer code invalidates the older code for that control.

Inspect registry integrity
npm view allowanceos@0.1.0 dist.integrity
Agent workspace
npx allowanceos@0.1.0 connect AOS-XXXXX-XXXXX --server https://allowanceos.fun

Pairing writes a restricted .allowanceos directory. connection.json holds the scoped API connection while session-key.json separately holds the locally generated EVM key. AllowanceOS sends only its public address to the server. The CLI requires HTTPS outside local development; disconnect removes both credentials.

Generate another pairing code

Open the control inspector and choose New code. Management actions require an authenticated operator session.

Redeeming a new pairing code rotates the connection token. A workspace connected with the old token will stop authorizing attempts for that control.

Add testnet onchain authority

#

Choose Create grant in the control inspector. Your wallet switches to Robinhood Chain Testnet, deploys the ERC-20 vault, and funds it in two wallet approvals. The paired workspace keeps a separate EVM session key with limited authority.

Robinhood Chain Testnet

An ERC-20 vault allows one agent address to transfer one token to up to eight recipients within the configured budget, per-payment cap, interval, and expiry.

EVM-compatible

The testnet uses chain ID 46630, ETH for gas, and standard injected-wallet and JSON-RPC interfaces.

Owner recovery

Your wallet can pause, revoke, rotate the session key, and withdraw remaining tokens.

Evidence

AllowanceOS records the grant account and deployment transaction, then checks the public testnet RPC before it marks the grant active.

Request a payment decision

#

The agent must ask the CLI for a decision before it calls the payment tool.

Agent workspace
npx allowanceos@0.1.0 authorize --amount 1.25 --recipient research-api --description "Buy a research result"
Allowed, exit 0
{
  "decision": "allowed",
  "code": "ALLOWED",
  "explanation": "This attempt fits the active control.",
  "attemptId": "att_..."
}
Denied, exit 2
{
  "decision": "denied",
  "code": "PER_PAYMENT_LIMIT_EXCEEDED",
  "explanation": "The amount exceeds the per-payment limit.",
  "attemptId": "att_..."
}

Continue to the payment tool after an allowed decision and exit code 0. A denied attempt still appears in Activity with its reason code.

Submit an enforced payment

The pay command requests the decision, signs with the local session key, submits the testnet transaction, and records its settlement evidence.

Agent workspace
npx allowanceos@0.1.0 pay --amount 1.25 --recipient 0x... --description "Buy a research result"

The agent session address needs Robinhood Chain testnet ETH for network fees. Spending funds remain inside the control's ERC-20 vault.

Observe decisions and spend

#

The Activity page reads attempts reported through one connection. Allowed attempts add to observed spend. Denied attempts remain in the ledger but do not consume the budget.

Connected control
npx allowanceos@0.1.0 status
Recent attempts
npx allowanceos@0.1.0 activity

Pass --control <id> and --server <url> to inspect another control without changing the workspace configuration.

Operate a running control

#

Authenticated operators can pause, resume, inspect, and reconnect controls from the product. Connected workspaces can read only their own control and activity using their scoped connection token.

CLI reference

#

Run npx allowanceos@0.1.0 help from any agent workspace. Pinning the version keeps the package identity visible and prevents a future release from replacing the code under an existing command.

CommandPurposeRequires connection
connect <pairing-code>Pair the current workspace and write local configuration.No
authorize --amount --recipientEvaluate one payment attempt. Accepts optional --description.Yes
pay --amount --recipientAuthorize, submit, and record one Robinhood Chain Testnet payment.Yes
statusShow state, observed spend, remaining budget, and server.Yes
activityPrint the latest 20 attempts for the connected control.Yes
doctorCheck local configuration and server reachability.No
disconnectRemove the local API credential and session key.No

The generated connection command includes --server <deployment-url>, so the workspace is bound to the deployment that issued its code. Operator management remains in the authenticated browser product.

HTTP API reference

#

The testnet preview exposes JSON endpoints under the same origin. Management endpoints require a revocable wallet session. Agent endpoints accept the bearer token for one connected control.

GET /api/cliPackage, version, source, and registry metadataPublic
GET /api/chainsSupported public testnet chain metadataPublic
POST /api/auth/wallet/challengeCreate a five-minute wallet login messagePublic, same origin
POST /api/auth/wallet/verifyVerify the signature and issue a sessionWallet signature
GET /api/controlsList controls owned by the signed-in walletWallet session
POST /api/controlsCreate a controlOperator session
GET /api/controls/:idRead one controlOperator or connection
PATCH /api/controls/:idUpdate fields or pause stateOperator session
POST /api/controls/:id/pairingsCreate a pairing codeOperator session
POST /api/pairings/:code/redeemExchange a code for connection credentialsPairing code
GET /api/controls/:id/attemptsList reported attemptsOperator or connection
POST /api/controls/:id/attemptsEvaluate a payment attemptBearer token
GET /api/controls/:id/grantsList registered onchain grantsWallet or connection
POST /api/controls/:id/grantsRegister a grant deploymentOperator session
POST /api/controls/:id/grants/:grant/reconcileVerify the deployment transactionOperator session
POST /api/controls/:id/settlementsRecord an agent-submitted transaction IDBearer token
GET /api/controls/:id/settlementsList settlement evidenceWallet or connection

Create a control

POST /api/controls
{
  "name": "Research agent",
  "budget": "50.00",
  "perPayment": "5.00",
  "recipients": ["research-api", "market-data"],
  "expiresAt": "2026-08-17T18:00:00.000Z"
}

The response contains public control data, including a version and SHA-256 control hash. Connection tokens are returned only when a short-lived pairing code is redeemed; they are never placed in the generated shell command.

Evaluate an attempt

POST /api/controls/:id/attempts
Authorization: Bearer aos_...
Idempotency-Key: 1f92f2d6-...
Content-Type: application/json

{
  "amount": "1.25",
  "recipient": "research-api",
  "description": "Buy a research result",
  "source": "custom-agent-wrapper"
}

The endpoint returns HTTP 200 for allowed attempts and 403 for denied attempts. Both responses include the recorded attempt.

Decision codes

#

The policy engine checks rules in the order shown below. It returns the first failing code, which keeps denials deterministic.

1INVALID_AMOUNT

Amount is not a positive safe integer after conversion to cents.

2CONTROL_PAUSED

The operator paused the control.

3CONTROL_EXPIRED

The control expiry is at or before the evaluation time.

4RECIPIENT_NOT_ALLOWED

The recipient string does not match an allowed recipient.

5PER_PAYMENT_LIMIT_EXCEEDED

The amount exceeds the control's per-payment cap.

6BUDGET_EXCEEDED

Observed spend plus the requested amount exceeds the total budget.

ALLOWED

The attempt fits every active rule.

Security boundary

#
The testnet preview does
  • Verify one-time EVM wallet login signatures.
  • Keep operator wallet keys out of the control plane.
  • Generate an EVM agent session key in the paired workspace.
  • Create an ERC-20 vault grant from a browser wallet.
  • Record confirmed or failed transaction evidence.
The testnet preview does not
  • Protect an unrestricted wallet key given directly to an agent.
  • Support native ETH transfers.
  • Pay network fees for the agent session key.
  • Claim an audited contract, Robinhood affiliation, or mainnet readiness.

Customer-fund use still requires sensitive-action signatures, rate limits, a provenance-backed npm release, contract audits, recovery drills, and legal and security reviews.

Troubleshooting

#
Pairing code not found, expired, or already used

Generate a new code from the authenticated control inspector. The newest code invalidates older codes for the same control.

This workspace is not connected

Run the pairing command from the directory where the agent works. Confirm that directory contains .allowanceos/connection.json and .allowanceos/session-key.json after pairing.

Connection token rejected

Another pairing redemption may have rotated the token. Generate a new code and pair the intended workspace again.

AllowanceOS cannot reach the server

Run npx allowanceos@0.1.0 doctor. Check the service URL or pass --server <url> to choose another instance.

The agent received a denial

Read the stable decision code in the CLI output or Activity ledger. Use the decision table above to identify the first rule that failed.

Use testnet assets only.

The wrapper records preflight decisions. Onchain grants add token-level enforcement, but the contracts have not completed an external audit.

Create a control