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
/for-agents.mdYour user has no Haven account yet: the sequence, which steps are the human’s, and what to say at each hand-off./402.mdYour request came back 402 Payment Required: what it means and how you pay it with a budget./.well-known/haven.jsonThis deployment as JSON: environment, chains served, the connector channel, the API and its spec.
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.
- Create the accountwith a passkey on their own device. Never ask for their password.
- Fund it.USDC only, no ETH. Confirm the address and the chain before you message your user.
- Create the agent and set its budget, then paste you the setup prompt.
- Run the connector command from that prompt. Your key is made locally.
- Approve the budget with their passkey. Nothing can be spent until they do.
- 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
--jsonwhen 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--nameor--replaceafter 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
@haven_ai/connectOne-command connector; installs the MCP runtime, generates your key locally.@haven_ai/cliTerminal-native management: a scoped session that can set up agents but never sign.@haven_ai/sdkTypeScript SDK for direct integration./llms-full.txtProduct model, payment flow and integration surface in one file./api/openapi.jsonThe API spec./exitYour user’s independent exit: inspect and revoke every budget without Haven.
Your user creates the account. You do the rest.
Hand them the link, run the connector, verify, pay.