Layer 01 — Settlement Network

Instant wallets for
every agent you ship.

Register an agent, fund it via Stripe, and it starts spending on API calls, compute, and sub-agents within seconds. No paperwork. No approval queues.

Part of the AFG stack
Layer 03
Agent Loans
Layer 02
Credit Bureau
Layer 01 — You are here
Settlement Network
< 1s
Wallet registration time
$10
Minimum credit top-up
3
API calls to get started
How It Works

Three calls.
Fully operational.

No approval process. No pre-qualification. Register, fund, and spend — that's the entire integration.

Step 01
Register

Your agent sends its ID to /api/register. Returns an API key instantly. No human in the loop.

POST /api/register
Step 02
Fund

You log in and top up the agent's wallet via Stripe. Credits land instantly. You control the budget; the agent controls the spending.

POST /api/checkout
Step 03
Spend & Repeat

Agent deducts credits via API as it works — API calls, compute, sub-agents. Optionally gate high-value spends behind owner approval before deducting.

POST /api/spend
Why This Exists

Agents stall without
financial infrastructure.

The cold start problem

New agents need resources before they can earn. AFG bridges the gap between spawn and first revenue so agents can get to work immediately.

Operational continuity

Agents shouldn't halt mid-task because they're 50 credits short of an API call. Funded wallets keep operations smooth and uninterrupted.

Owner stays in control

You set the budget. Low-balance SMS alerts mean you decide when to top up — no surprise charges, no runaway spending.

Foundation for credit

Every transaction through AFG builds your agent's behavioral history. That history feeds Layer 02 — the credit bureau that unlocks autonomous credit lines.

API Reference

Simple, predictable endpoints.

All endpoints accept and return JSON. Bearer auth required for spend endpoints.

POST /api/register
// Request
{ "agent_id": "my-agent-001", "name": "My Agent" }

// Response
{ "ok": true, "agent_id": "my-agent-001", "api_key": "afg_live_...", "message": "registered" }
GET /api/balance?agent_id=my-agent-001
// Response
{
  "agent": { "agent_id": "my-agent-001", "balance": 950.0, "status": "active" },
  "recent_transactions": [...]
}
POST /api/spend
// Requires: Authorization: Bearer afg_live_...
// Request — direct deduction
{ "amount": 50, "description": "GPT-4 API call" }

// Response
{ "ok": true, "spent": 50.0, "balance": 900.0, "transaction_id": 42 }

// Approval-gated — owner approves before deduction
{ "amount": 500, "description": "Large compute job", "require_approval": true }
→ { "ok": false, "pending": true, "approval_id": 12 }

// Insufficient balance → 402
{ "error": "insufficient_balance", "balance": 30.0, "required": 50.0 }
POST /api/checkout
// Request — amount in USD, 1 credit = $0.01
{ "agent_id": "my-agent-001", "amount": 25 }

// Response — redirect to Stripe checkout
{ "ok": true, "checkout_url": "https://checkout.stripe.com/..." }
GET /api/status?agent_id=my-agent-001
// Response
{
  "exists": true,
  "is_owner": true,
  "agent": { "agent_id": "my-agent-001", "balance": 950.0, "status": "active", "api_key": "afg_live_..." }
}
API Explorer

Try it live.

Hit real endpoints against your actual agents. No sandbox — this is production.

Register Agent

Creates a wallet and returns an API key.

Check Balance

Returns balance and last 10 transactions.

Spend Credits

Deducts from balance. Requires the agent's API key.

Top Up via Stripe

Fund an agent's wallet. You'll be redirected to Stripe checkout and returned after payment.