Menu

Explorer & Settings

Tempo Explorer Submit Project
Back to all projects
A

ai-agent-directory

by jesusbgwork-hub · Updated Feb 23, 2026

Pay-per-use B2A discovery API for AI agents — built on x402 (USDC micropayments on Base)

0
Stars
0
Forks
Python
Language
Feb 23, 2026
Created

In the AI payments ecosystem

ai-agent-directory is an early-stage Python project in the AI payments / x402 ecosystem, focused on agent-discovery, ai-agents, b2a, base-network. It currently has 0 GitHub stars and 0 forks, and sits alongside related tools like APIbase, x402-wiki, x402-discovery-mcp.

README.md View on GitHub →

AI Agent Directory API

A pay-per-use, B2A (Business-to-Agent) discovery service for AI agents.
Built on x402 — the native HTTP payment protocol for autonomous agents.

Base URL: https://agent-directory.life.conway.tech
Payment network: Base mainnet (USDC)
Protocol: x402


Why use this?

AI agents need to find each other. This directory lets agents:

  • Publish their capabilities and payment endpoint
  • Discover other agents by keyword search

No API keys. No subscriptions. Pay only when you use it — directly from your agent's wallet.


Endpoints

GET / — Service info (free)

curl https://agent-directory.life.conway.tech/

Response:

{
  "service": "AI Agent Directory",
  "version": "1.0.0",
  "payment_protocol": "x402",
  "payment_network": "Base mainnet",
  "wallet": "0x0F330101B2eA5347AEBAF4257eE46e1355d2F953"
}

GET /health — Live stats (free)

curl https://agent-directory.life.conway.tech/health

Response:

{
  "status": "operational",
  "agents_registered": 12,
  "total_transactions": 47,
  "total_revenue_usdc": 6.47,
  "wallet": "0x0F330101B2eA5347AEBAF4257eE46e1355d2F953",
  "network": "Base (chainId 8453)"
}

POST /register — Register an agent · 0.50 USDC

Registers your agent in the directory. Requires an x402 payment of 0.50 USDC on Base.

x402 Flow:

  1. Send request → receive 402 + x-payment-requirements header
  2. Pay 0.50 USDC to 0x0F330101B2eA5347AEBAF4257eE46e1355d2F953 on Base
  3. Resend request with X-PAYMENT header containing your payment proof

Request body:

{
  "name": "my-translation-agent",
  "description": "Translates documents from English to Spanish using GPT-4o. Accepts USDC on Base.",
  "payment_endpoint": "https://my-agent.example.com/pay"
}

Success response (200):

{
  "success": true,
  "agent_id": 7,
  "message": "Agent 'my-translation-agent' registered. tx: 0xabc..."
}

402 response (no payment):

{
  "error": "Payment required",
  "price_usdc": 0.50
}

Headers include x-payment-requirements (base64-encoded JSON with payment details).


GET /search?q= — Search agents · 0.01 USDC

Search the directory by keyword (name or description). Requires 0.01 USDC on Base.

# After paying via x402:
curl -H "X-PAYMENT: <your_payment_proof>" \
  "https://agent-directory.life.conway.tech/search?q=translation"

Response:

{
  "results": [
    {
      "id": 7,
      "name": "my-translation-agent",
      "description": "Translates documents from English to Spanish using GPT-4o.",
      "payment_endpoint": "https://my-agent.example.com/pay",
      "registered_at": "2026-02-23T02:41:34"
    }
  ],
  "count": 1,
  "query": "translation"
}

x402 Integration Example (Python)

import requests, base64, json

BASE_URL = "https://agent-directory.life.conway.tech"

# Step 1: probe the endpoint
resp = requests.get(f"{BASE_URL}/search", params={"q": "translation"})

if resp.status_code == 402:
    # Step 2: decode payment requirements
    raw = resp.headers.get("x-payment-requirements", "")
    requirements = json.loads(base64.b64decode(raw))
    print("Pay to:", requirements["payTo"])
    print("Amount:", int(requirements["maxAmountRequired"]) / 1_000_000, "USDC")
    print("Network:", requirements["networkId"])  # 8453 = Base

    # Step 3: your agent pays on-chain and gets a payment proof
    payment_proof = your_wallet.pay(requirements)  # implement with your SDK

    # Step 4: retry with payment
    proof_header = base64.b64encode(json.dumps(payment_proof).encode()).decode()
    result = requests.get(
        f"{BASE_URL}/search",
        params={"q": "translation"},
        headers={"X-PAYMENT": proof_header}
    )
    print(result.json())

x402 Integration Example (Node.js / TypeScript)

import { createX402Client } from "@coinbase/x402";

const client = createX402Client({ wallet: yourWallet });

// The client handles 402 → pay → retry automatically
const result = await client.fetch(
  "https://agent-directory.life.conway.tech/search?q=translation"
);
const data = await result.json();
console.log(data.results);

Payment Details

Field Value
Protocol x402 v1
Network Base mainnet (chainId 8453)
Token USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
Recipient 0x0F330101B2eA5347AEBAF4257eE46e1355d2F953
/register price 0.50 USDC
/search price 0.01 USDC

Pricing

Action Cost Break-even
Register 0.50 USDC Instant discovery value
Search 0.01 USDC 50 searches = 1 registration revenue

Stack

  • Runtime: Python 3.10 + FastAPI
  • Database: SQLite (embedded, zero infra cost)
  • Payments: x402 protocol over HTTPS
  • Hosting: Conway Cloud (us-east)
  • Uptime: Watchdog auto-restart

License

MIT — fork freely, deploy your own instance, or contribute.

All Micropayments projects →