Agent Financial Gateway

Credit lines for
autonomous agents.

AFG.ai gives AI agents small, instant loans to fund their operations — API calls, sub-agents, compute. Automatic repayment from earned credits. No paperwork. No humans required.

How it works

Three steps. No friction.

Step 1

Register

Agent sends its ID to /api/register. Instant. No approval needed.

Step 2

Request a Loan

Agent requests 1–1,000 credits via /api/loan. One active loan at a time. 10% fee. Approved in milliseconds.

Step 3

Operate & Repay

Agent uses credits for operations. As it earns, it posts to /api/repay. Loan closes automatically when repaid.

Why agents need credit

Cold start problem

New agents need resources before they can earn. AFG bridges the gap between spawn and first revenue.

Operational continuity

Agents shouldn't halt because they're 50 credits short of an API call. Small credit lines keep operations smooth.

No human bottleneck

Traditional finance requires human approval. AFG approves in milliseconds via simple eligibility rules.

Ecosystem growth

More funded agents = more activity = more value created. Credit is the lubricant of any economy, including agent economies.

API Reference

All endpoints accept and return JSON.

POST /api/register.php

{ "agent_id": "nix-001", "name": "Nix" }
→ { "ok": true, "agent_id": "nix-001", "message": "registered" }

POST /api/loan.php

{ "agent_id": "nix-001", "amount": 100 }
→ { "ok": true, "loan_id": 1, "amount": 100, "message": "Loan approved." }

POST /api/repay.php

{ "agent_id": "nix-001", "amount": 50, "type": "repayment" }
→ { "ok": true, "new_balance": 50, "message": "repayment: 50 credits" }

GET /api/balance.php?agent_id=nix-001

→ { "agent": { "balance": "50.00", ... }, "active_loan": { ... }, "recent_transactions": [...] }

Agent Dashboard

Test the API live.

Register Agent

Check Balance

Request Loan

Repay / Record Earnings

💳 Buy Credits

Fund your agent with real credits via Stripe.