Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

agentcard 🦞

Give your AI agent a Visa card. One command.

agentcard is a CLI for provisioning, funding, and managing virtual Visa cards for AI agents β€” powered by Bridge.xyz. A human does KYC once. The agent gets a real card it can spend with autonomously.

agentcard customer create
agentcard customer wait cust_abc123
agentcard card provision cust_abc123
agentcard card export card_xyz789 --env
# CARD_NUMBER=4432528012345678
# CARD_CVV=123
# CARD_EXPIRY=07/30

Why

AI agents increasingly need to buy things β€” API credits, SaaS subscriptions, compute, services. Right now they can't, because they have no payment method.

agentcard solves that. You provision a virtual Visa card backed by USDC, hand the card details to your agent as env vars, and it can spend anywhere Visa is accepted. You stay in control via freeze/unfreeze and real-time transaction webhooks. You earn interchange revenue on every swipe.


How it works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     KYC link      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Human     β”‚ ──────────────►  β”‚  Bridge  β”‚
β”‚  (you)      β”‚ ◄────────────── β”‚  Persona β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   approved βœ“     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β”‚  agentcard card provision
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   USDC deposit   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Virtual    β”‚ ◄─────────────── β”‚  Your Wallet β”‚
β”‚  Visa Card  β”‚                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β”‚  card details (--env)
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  AI Agent   β”‚ β†’ spends anywhere Visa accepted
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. KYC once β€” you (or your user) complete ID verification via Bridge's hosted Persona flow
  2. Provision β€” agentcard creates a virtual Visa card backed by a USDC card wallet
  3. Fund β€” send USDC to the deposit address Bridge provides
  4. Export β€” hand card details to your agent as env vars or JSON
  5. Monitor β€” real-time transaction webhooks, freeze/unfreeze on demand
  6. Earn β€” collect interchange share + your configured transaction fee on every swipe

Install

# One-off (no install required)
npx agentcard --help

# Global install
npm i -g agentcard
agentcard --help

Requirements: Node.js 18+, Bridge.xyz developer account


Quick Start

1. Get Bridge API credentials

Sign up at bridge.xyz and request a developer account. Once approved, generate an API key from the dashboard.

2. Configure agentcard

agentcard setup
# Enter your Bridge API key
# Choose: sandbox or production
# Saved to ~/.agentcard/config.json

Or use environment variables:

export BRIDGE_API_KEY=sk_live_...
export BRIDGE_ENV=production

3. Create a customer and complete KYC

# Create customer record + get KYC link
agentcard customer create

# Output:
# βœ“ Customer created: cust_abc123
# KYC Link: https://bridge.withpersona.com/inquiry?inquiry-id=inq_xxx
# β†’ Send this link to the cardholder to complete identity verification

# Wait for approval (polls with spinner)
agentcard customer wait cust_abc123
# β ‹ Waiting for cards endorsement... (15s)
# βœ“ Cards endorsement approved!

4. Provision a card

agentcard card provision cust_abc123

# Output:
# βœ“ Card provisioned: card_xyz789
# Card Number:  4432 5280 1234 5678
# CVV:          123
# Expiry:       07/30
# Deposit:      0xdeadbeef...  (send USDC here to fund)

5. Fund the card

# Show deposit address
agentcard fund card_xyz789

# Send USDC to the address shown, then check balance
agentcard fund status card_xyz789
# Balance: 50.00 USDC

6. Give the card to your agent

# As env vars
agentcard card export card_xyz789 --env
# CARD_NUMBER=4432528012345678
# CARD_CVV=123
# CARD_EXPIRY=07/30
# CARD_DEPOSIT_ADDRESS=0xdeadbeef...

# As JSON
agentcard card export card_xyz789 --json

Your agent loads these and can now spend anywhere Visa is accepted.


Revenue

You earn money every time a card is used. Configure your fees and payout account:

# Set a global 0.5% fee on all transactions
agentcard fees set --percent 0.5

# Configure where Bridge sends your monthly payout
agentcard fees payout set

# Estimate your revenue
agentcard fees estimate --volume 100000
# At $100,000/month spend with 0.5% fee:
# Estimated monthly revenue: ~$500 + interchange share
# Paid out by Bridge on the 5th of each month in USD

Revenue streams:

  • Interchange share β€” Bridge shares network interchange with you on every swipe
  • Transaction fee β€” your configured % cut per transaction
  • FX premium β€” configurable markup on international transactions

All Commands

Setup

Command Description
agentcard setup First-time setup: API key + environment
agentcard setup --sandbox Configure for sandbox testing
agentcard status Show current config, fee setup, payout account

Customer (KYC)

Command Description
agentcard customer create Create customer + generate KYC link
agentcard customer list List all customers
agentcard customer get <id> Get customer + endorsement status
agentcard customer kyc <id> Re-generate KYC link for cards endorsement
agentcard customer wait <id> Poll until cards endorsement approved βœ“

Cards

Command Description
agentcard card provision <customer-id> Provision virtual card
agentcard card list [customer-id] List cards
agentcard card get <card-id> Card details + balance
agentcard card freeze <card-id> Freeze card (instant)
agentcard card unfreeze <card-id> Unfreeze card
agentcard card transactions <card-id> Recent transaction history
agentcard card withdraw <card-id> Withdraw remaining balance
agentcard card export <card-id> Print card details
agentcard card export <card-id> --env Print as env vars for agent use

Funding

Command Description
agentcard fund <card-id> Show USDC deposit address
agentcard fund status <card-id> Check current balance

Fees & Revenue

Command Description
agentcard fees Show current fee configuration
agentcard fees set --percent <n> Set global transaction fee %
agentcard fees payout Show payout bank account
agentcard fees payout set Configure payout bank account
agentcard fees estimate --volume <n> Monthly revenue estimate

Webhooks

Command Description
agentcard webhook create <url> Create webhook endpoint
agentcard webhook list List all webhooks
agentcard webhook delete <id> Delete webhook
agentcard webhook test <id> Send test event
agentcard webhook logs <id> View delivery logs

Options

Every command supports:

--json       # Machine-readable JSON output (pipe to jq, etc.)
--help       # Command help

Environment overrides:

BRIDGE_API_KEY=sk_live_...   # API key
BRIDGE_ENV=sandbox           # or: production

Config file: ~/.agentcard/config.json


Sandbox

Bridge provides a sandbox environment for testing. Note that card provisioning is production-only β€” sandbox supports customer creation, KYC (auto-approved), fee configuration, and webhooks.

agentcard setup --sandbox
agentcard customer create    # auto-approved in sandbox
agentcard customer wait <id> # instant approval
agentcard fees set --percent 0.5

To get sandbox access, email support@bridge.xyz to request a developer account. They'll give you dashboard access to generate sk-test-... keys.


Use Cases

Agentic purchasing β€” agent buys API credits, SaaS tools, or compute autonomously without human intervention

Expense management β€” provision per-agent cards with spend limits, monitor via webhooks, freeze instantly if behaviour is unexpected

Multi-agent systems β€” each agent in a pipeline gets its own card with scoped funding

Developer tooling β€” build products that give end users' AI agents payment capabilities


Development

git clone https://github.com/langoustine69/agentcard
cd agentcard
npm install
npm run dev -- --help        # run via tsx
npm run build                # compile to dist/

Built with

  • Bridge.xyz β€” card issuing and payment infrastructure
  • Commander.js β€” CLI framework
  • Ora β€” terminal spinners
  • Chalk β€” terminal colors

License

MIT

About

Give your AI agent a Visa card. One command. | CLI for Bridge.xyz card management

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages