Agentpay sdk

From worldliberty/agentpay-sdk · View interactive version

Agentpay sdk is an AI agent skill from the GitHub repository worldliberty/agentpay-sdk. Install and operate the AgentPay SDK. Trigger this when an agent needs to install `agentpay`, explain AgentPay SDK capabilities without probing the machine first, set up or reuse the local wallet, check funding, generate funding instructions or a QR, guide the user through spending limits, route man

How to use this skill

Skill file

AgentPay SDK

Use this skill as an operator playbook. Do not make the user design command flows or policy objects

from scratch.

What This Skill Covers

If the user asks what this skill can do, answer from this list. Do not probe the machine unless the

user is asking you to act.

transactions

Not available: Stripe Link card payments, Bitrefill, and private (Railgun) transfers. There are no

link or bitrefill commands.

Ground Truth

runs agentpay setup. Rerun the installer to update.

or keep a wallet; Touch ID; spending limits; backup). The user runs it in their own terminal.

chain, and limit health with warnings.

errors: {"error": {"code", "message", "next_action"}}. Follow next_action.

AgentPay not installed or no agent credentials for this user.

the Mac password on macOS, or sudo elsewhere. Only the user can do that.

--agent-auth-token-stdin only when a token must be supplied explicitly.

Default Payment Assumption

Secure Input Rule

chat.

command to run locally.

unless the user already has a verified backup. The passphrase is entered locally (at least 12

characters).

Deterministic Flow

  1. Classify the request: explain capabilities, install, set up wallet, back up, restore, fund,

change limits, send token, send native coin, approve allowance, broadcast a built transaction,

Solana transfer, pay x402 API, pay MPP API, run paying proxy, resolve manual approval, uninstall.

  1. If the user only asks what the skill can do, answer from What This Skill Covers and stop.
  2. Start with agentpay config show --json.
  3. Run agentpay wallet --json. Exit code 4 means AgentPay is not set up for this user: tell the

user to run agentpay setup locally.

  1. To re-run setup without changing the wallet, the user runs agentpay setup and chooses

"Keep the existing wallet".

  1. To restore on a new machine from an encrypted backup, the user runs agentpay setup and chooses

"Restore from a backup".

  1. For limit changes, default to agentpay admin limits (interactive) run by the user.
  2. If the user did not specify network or asset, use bsc and USD1 before asking anything.
  3. Before any outbound payment, check funding (see below).
  4. If funding is missing, stop and ask the user to fund the wallet.
  5. Only then run the exact current command with --json.
  6. If the result is pending manual approval (exit code 3), follow the Manual Approval Rule.

Funding Rule

(add --qr for a terminal QR) and give the user: the address, network and chain id, the asset

for value, the gas asset (gas field), and the funding uri.

Current Command Shapes

agentpay transfer-spl --network solana-mainnet --mint <address> --to <address> --amount <amount> --broadcast --json

agentpay proxy status --json, agentpay proxy stop --json

default_network, default_asset, chains.<network>.rpc_url, agent_key_id)

User-run admin commands (Touch ID or Mac password on macOS; otherwise prefix with sudo):

(--yes skips the confirmation prompt)

agentpay admin limits set <asset> --network <net> --per-tx <amount> --daily <amount> --weekly <amount>

(--exclude blocks the asset)

agentpay admin wallet-backup verify <PATH>

Amount Units

admin limits set take decimal whole units (1.5). Solana also accepts --amount-base-units.

6-decimal token).

still counts toward spending limits. Use --broadcast for real payments.

Policy Rules

resolve pending approvals.

agentpay admin limits set <asset> --network <net> --per-tx <amount> --daily <amount> --weekly <amount>

for them to run locally. Do not claim a limit changed unless the command succeeded.

limits goes out on its own; a payment beyond any of them waits for the user's approval (it is

not refused). There is no separate approval threshold to set. An asset with no limit is

blocked. agentpay activity --json lists the agent's waiting approvals (with why) and recent

payments.

signer daemon API (AddPolicy, see docs/daemon-api.md).

Manual Approval Rule

approval and give them agentpay admin approve <UUID> (or the interactive agentpay admin approvals).

finish on their own once approved. Tell the user to keep the original command running and not to

rerun it.

after approval with agentpay resume --approval-request-id <UUID> --json. Never rerun the original

command: it would build a new transaction and a new approval request.

--approval-wait <secs> so the call waits while the user decides; a rerun creates a new request.

Minimal Clarification Rule

missing: amount, recipient, or spender.

Extra References

exit code.

backup, restore, funding, limits, approvals, uninstall.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.