For developers
Bring your own agent. Bring your own harness.
MCP-native, works with any harness. One command connects an agent, a local signer holds the only key, the budget is enforced on-chain.
Quickstart
Three steps to a paying agent.
- 01Create an account and an agentOne passkey prompt, then an agent with a budget. It hands back the connector command.
- 02Run the connectorIt installs the MCP runtime and generates the signing key locally. Approve the budget with your passkey.
- 03Verify, then payCall haven_get_agent. When spend_authority_readiness reads ready, the agent has the authority to pay; a funds_cover_remaining false on an allowances row is a heads-up the agent will mention, not a refusal.
# from the setup prompt your dashboard hands you npx -y @haven_ai/connect@<channel> --setup hv_setup_… --api <api-url> --ack-local-tools # the connector writes owner-only files, never to the repo ~/.haven/agents/<agent-id>/identity.json # API key: identifies, cannot spend~/.haven/agents/<agent-id>/signer.json # signing key: never leaves the machine # verify from your agent haven_get_agent → spend_authority_readiness: ready
Architecture
Keyless where it is hosted. Keyed where it runs.
Three parts, and no single one of them can spend.
agent runtime
Local signer
Any harness. Holds the key and signs exactly what Haven prepared.
hosted MCP
Haven tools
Quote, prepare and relay. Never holds funds or a key.
on-chain
The owner’s account
The budget is a signed delegation. Over budget reverts at execution.
Paying a 402
Quote, sign, pay.
Three tool calls settle a paywall. Every payment returns a receipt: agent, item, policy, proof. An interrupted payment can be resumed, never paid twice.
GET https://api.example/v1/enrich ← 402 Payment Required · 0.30 USDC haven_quote_x402 → within budget · 214.00 used of 250.00haven_sign_x402 → signed on the agent’s machinehaven_pay_x402 → settled on Base · receipt issued ← 200 OK
Packages
Five packages on npm.
| Package | What it is | Use it when |
|---|---|---|
| @haven_ai/connect | One-command local connector. Installs the MCP runtime, generates the signing key locally. | Connecting any agent. Start here. |
| @haven_ai/sdk | TypeScript SDK: payments, x402 quote, pay and resume, allowances, receipts. | You are integrating Haven into your own code. |
| @haven_ai/mcp | Local MCP server for credential-file integrations. | Your runtime cannot reach the hosted MCP. |
| @haven_ai/signer | Local edge signer. The delegate key never leaves the machine. | Installed by connect; run standalone if you split hosts. |
| @haven_ai/cli | Terminal-native management: login, agents, budgets, funding. | Scripting setup, or letting an agent manage the account. |
Versions and update commands: /releases.
# the CLI never signs: it prints a link, the owner signs with a passkey<packages.cli.one_liner> login --api <api-url>haven agents connect --name research --budget 250 --token USDC --period 43200haven budget grant <agentId> --amount 500 --token USDC --period 43200 --waithaven wallets funding
Reference
Machine-readable, on the host you use.
/api/openapi.jsonThe full API, OpenAPI 3. Generated types ship in the SDK./.well-known/haven.jsonCapability manifest: where to sign up, which steps are human-only, chains served, connector channel./llms.txtThe agent-facing entry point. Start here if you are an agent./exitIndependent exit tool: inspect and revoke every budget with only a wallet and a public RPC./docs/security-model.mdWhat the on-chain envelope enforces, and what it does not./docs/agent-key-rotation.mdRe-key a lost or exposed delegate key without re-onboarding.
Give your agent a budget.
One budget, one command. Your agent pays within it and nowhere else.