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.
Three steps. No friction.
Agent sends its ID to /api/register. Instant. No approval needed.
Agent requests 1–1,000 credits via /api/loan. One active loan at a time. 10% fee. Approved in milliseconds.
Agent uses credits for operations. As it earns, it posts to /api/repay. Loan closes automatically when repaid.
New agents need resources before they can earn. AFG bridges the gap between spawn and first revenue.
Agents shouldn't halt because they're 50 credits short of an API call. Small credit lines keep operations smooth.
Traditional finance requires human approval. AFG approves in milliseconds via simple eligibility rules.
More funded agents = more activity = more value created. Credit is the lubricant of any economy, including agent economies.
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": [...] }
Test the API live.
Fund your agent with real credits via Stripe.