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.
- Five networks, one interface. Cashu, Lightning, Solana, EVM chains, and on-chain Bitcoin — the same commands for all of them.
- Spending limits that hold. Per-wallet, per-network, and global caps, checked before every send. Run the limits on a separate machine and the agent cannot change them.
- Built for agents. Every result comes back as structured data; secrets are hidden automatically.
- Runs how you need it. As a one-shot command, a long-lived session, an interactive terminal app, or a remote server.
- One safe binary. Pure Rust with no C dependencies; compile in only the networks you actually use.
Where to use it: paying for services, capping spend, and accepting funds
- An agent paying for services — API credits, compute, data — across whichever network a vendor accepts.
- Capping what an agent can spend — set a daily limit and let the agent operate freely under it.
- A shared payment daemon — run afpay on a trusted machine; agents send requests, limits stay enforced server-side.
afpay container installstands one up in a container (Docker, Podman, or Apple) with one command. - Accepting payments — generate invoices and watch for incoming funds on any of the five networks.
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 installso 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
- Overview — the full guide: every network, setup, and examples
- CLI Reference — every command and flag
- Architecture — how it is built, deployment patterns
- Testing — unit and integration tests