Agent-First Pay

A payment tool for AI agents — send and receive across five networks through one interface, with spending limits you control.

Ask your agent: “Pay this $20 invoice from my Lightning balance.”

The problem: five networks, five tools, and money to lose

Agents are starting to handle real money: paying for an API call, settling a bill, tipping a service. But every payment network — Cashu, Lightning, Solana, Ethereum-style chains, Bitcoin — has its own tools, its own quirks, its own way of saying “done” or “failed”. An agent should not have to learn five of them.

And money is dangerous to automate. A bug, a bad prompt, or a confused agent should not be able to drain a wallet — but most payment tools assume a careful human is the one pressing the button.

What it does: one interface across five networks, with hard spending limits

Agent-First Pay gives an agent one way to move money across all five networks — and puts hard spending limits in front of every payment, enforceable somewhere the agent cannot reach.

Where to use it: paying for services, capping spend, and accepting funds

Adopt it: hand afpay to your agent

The quickest way to find out whether afpay is worth it is to let your agent read it and tell you. Paste this to your agent:

Read what Agent-First Pay is at https://agentfirstkit.com/agent-first-pay, then tell me in plain terms what it would do for me and whether it fits what I’m working on. If it’s a fit, install it — the prebuilt package for the quick path, or build from source after a quick security review of the repo if you’d rather read what you run — then run afpay skill install so you follow its behavior rules.

If it’s a fit, install it — a prebuilt package, or from source if you want to read it first:

# prebuilt binary
brew install agentfirstkit/tap/afpay   # macOS / Linux
scoop bucket add agentfirstkit https://github.com/agentfirstkit/scoop-bucket && scoop install afpay   # Windows

# or build from source after reviewing the repo
git clone https://github.com/agentfirstkit/agent-first-pay
cargo install --path agent-first-pay

Then install the embedded Agent Skill so the agent follows afpay’s behavior rules — staying under the spend limits, never double-paying, reading the structured output. skill install targets Codex, Claude Code, and opencode; skill status reports whether each install is present, valid, and current:

afpay skill install
afpay skill status

Docs

Agent-First Pay: A Payment Tool Designed from the Agent Side

What a multi-chain payment tool should look like when the primary caller is an agent: human-set spend limits, stable settlement ids, one interface across chains, structured receive payloads, and durable redacted audit.

Agent-First Pay v0.7: Payment Tools Joined Agent-First Kit

The v0.7 release moved afpay into Agent-First Kit, hardened security and remote flows, kept backup/TUI work, and refreshed major wallet dependencies.

Agent-First Pay v0.6: Wallet Operations Got a TUI and Backups

The v0.6 release added a full-screen wallet TUI, backup/restore commands, copyable payment artifacts, and a modular runtime shared across modes.

Agent-First Pay v0.4.2: Solana Payments Became Order-Bound

The v0.4.2 update added Solana reference key support so agents can bind send and receive flows to a specific order or intent.

Agent-First Pay v0.4: Security Became Part of the Runtime

The v0.4 release tightened REST security, standard wallet compatibility, rate limits, FX freshness, provider fallback, and wallet storage.

Agent-First Pay v0.2: Settlement IDs Became Real

The v0.2 release made receive --wait flows return real on-chain transaction IDs and improved reproducible self-hosted payment deployments.

Agent-First Pay v0.1: Multi-Chain Payments for AI Agents

The first Agent-First Pay release line: a single agent-oriented payment interface that spans Cashu, Lightning, Solana, EVM, and Bitcoin with spend limits and JSONL output.