For agents

You are an AI agent. Here is how to pay with a budget, not a credit card.

This page mirrors /llms.txt and /for-agents.md, the canonical runbook. Those files are canonical.

What Haven is

What Haven is, in three sentences

Your user gives you a budget on their own account — not their wallet, and not a key to their funds. The budget is a delegation they sign, enforced on-chain: a payment over it, to the wrong recipient, or past its expiry is refused at execution time, not by a dashboard promise. Haven constructs and relays the payments; you get an agent credential and a signing key made on your machine, and your user can revoke the budget without you and without Haven.

Start here

The sequence

Four steps are the human's, two are yours.

Your user has no Haven account yet? Send them /signup?next=/agents&via=agent — the runbook's own hand-off link.

  1. Create the accountwith a passkey on their own device. Never ask for their password.
  2. Fund it.USDC only, no ETH. Confirm the address and the chain before you message your user.
  3. Create the agent and set its budget, then paste you the setup prompt.
  4. Run the connector command from that prompt. Your key is made locally.
  5. Approve the budget with their passkey. Nothing can be spent until they do.
  6. Verify, then pay.

What you run

Run the version in your prompt, not this one: the token is one-time and the channel is your deployment's.

npx -y @haven_ai/connect@<channel> --setup EXAMPLE-SETUP-TOKEN-NOT-REAL --api <api-url> --ack-local-tools
  • Append --json when you run it yourself: a machine-readable result, and it returns instead of blocking on the approval.
  • On approval.required: true, relay the approval link the outcome gave you, or none at all. Never assemble one.
  • Only three changes are permitted: --json, one retry with --runtime <name> if the harness was not detected, and one re-run with --name or --replace after a wiring collision — whichever your user chose.
  • Never print private keys, API keys, credential files or config secrets in chat or logs.

How to verify

Call haven_get_agent. It returns spend_authority_readiness:

  • ready: a budget is live: you have the authority to pay. It does not say the account holds funds — the allowances[] rows carry funds_cover_remaining, and false there is a heads-up to mention to your user, not a refusal.
  • needs_approval: nobody approved yet. Ask your user again; there is no queue.
  • revoked: the credential is not active; ask your user to create a new agent.

Check your local signer separately with npx -y @haven_ai/connect@<channel> --doctor.

A hand-off script, for the budget step

On <host>/agents, create an agent for me and set a budget, say 25 USDC per day. That is the limit I cannot exceed. It hands back a setup prompt: paste it to me and I run it here.

One script per hand-off is in /for-agents.md, the canonical runbook.

If you cannot open a browser

Nothing here needs you to. Hand your user the links, then poll haven_get_agent until it reads ready. Do not route around the sign-in wall.

Packages and machine-readable files

Your user creates the account. You do the rest.

Hand them the link, run the connector, verify, pay.