Autonomous AI research agent with x402 micropayments — discovers, ranks, budgets, pays for, and synthesizes data from paywalled APIs on Base Sepolia
agent-procure is an early-stage TypeScript project in the AI payments / x402 ecosystem, focused on agentic-commerce, ai-agents, base-sepolia, hackathon. It currently has 0 GitHub stars and 0 forks, and sits alongside related tools like piprail, x402-client, solcex-autonomous-vanguard, APIbase, moltpe-agent-payments, APITOLL.
An AI agent that autonomously discovers, reasons about, pays for, and synthesizes data from x402-paywalled APIs using cryptocurrency micropayments on the Base Sepolia blockchain.
Built for the San Francisco Agentic Commerce x402 Hackathon.
User Query --> [Orchestrator]
|
[1. Discovery] --> Parallel scan of /api/discover endpoints (with timeout)
|
[2. Ranking] --> Score endpoints by relevance (keyword + optional LLM)
|
[3. Budget] --> Optimize call plan within budget (value-to-cost ratio)
|
[4. Executor] --> @x402/fetch with auto-pay, retry, and concurrency
|
[5. Synthesizer]--> LLM fusion of multi-source data
|
[Audit Trail] --> Full transparency of spend + tx hashes
@x402/fetch which automatically handles HTTP 402 payment flows with on-chain USDC micropayments. Includes exponential backoff retry and concurrent execution| Component | Technology |
|---|---|
| Payment Protocol | x402 — HTTP 402 standard for machine-to-machine commerce |
| Payment Client | @x402/fetch — Auto-handles 402 Payment Required |
| Payment Server | @x402/express — Express middleware for paywalled endpoints |
| Blockchain | Base Sepolia (EVM testnet, chain ID: 84532) |
| Token | USDC micropayments |
| Wallet | viem — Ethereum wallet interactions |
| LLM | OpenAI GPT-4o-mini — Ranking + synthesis |
| Server | Express.js |
| Language | TypeScript (end-to-end type safety) |
agent-procure/
agent/
index.ts # Barrel exports for all agent modules
discovery.ts # Service discovery + LLM-powered endpoint ranking
budget.ts # Budget planning with value-ratio optimization
executor.ts # Executes API calls with x402 payments, retry, concurrency
synthesizer.ts # LLM-powered multi-source data synthesis
orchestrator.ts # Main agent pipeline with timing metrics
audit.ts # Audit trail tracking every action and cost
services/
weather.ts # x402-paywalled weather API (mock)
news.ts # x402-paywalled news API (mock)
analytics.ts # x402-paywalled analytics API (mock)
start.ts # Entry point — boots services + web UI
package.json
tsconfig.json
.env.example
# Clone
git clone https://github.com/naividh/agent-procure.git
cd agent-procure
# Install
npm install
# Configure
cp .env.example .env
# Edit .env with your testnet private key, pay-to address, and OpenAI key
# Run
npm start
# Opens web UI at http://localhost:3000
The project includes 3 mock x402-paywalled services that simulate real paid APIs:
| Service | Endpoints | Prices |
|---|---|---|
| WeatherPro API | /api/weather, /api/weather/forecast |
$0.01, $0.03 |
| NewsWire API | /api/news, /api/news/deep |
$0.02, $0.05 |
| DataLens Analytics | /api/analytics/market, /api/analytics/competitor |
$0.04, $0.06 |
Each service uses @x402/express payment middleware and accepts USDC on Base Sepolia.
| Variable | Description |
|---|---|
PRIVATE_KEY |
EVM wallet private key (testnet only!) |
PAY_TO_ADDRESS |
Address to receive service payments |
OPENAI_API_KEY |
OpenAI API key for LLM synthesis |
FACILITATOR_URL |
x402 facilitator (default: https://facilitator.x402.org) |
AGENT_BUDGET |
Default agent budget in USD (default: 1.00) |
/api/agent{
"query": "What is the current state of AI commerce?",
"budget": 1.00
}
Returns synthesis, audit trail, timing metrics, and cost breakdown.
MIT
x402 (HTTP 402 Payment Required) SDK + MCP server: let any API charge for itself and any AI agent pay for itself, USDC & stablecoins across EVM, Solana & 8 more chain families, in a couple of lines. Backendless, no fee, self-custodial, paid straight to your wallet. TypeScript, MIT.
Client SDK for the Vybe x402 API. Pay-per-call USDC over HTTP and prepaid-credit WebSocket streaming for Vybe's Solana analytics API. Built for AI agents.
Autonomous AI BD Agent for SolCex Exchange: 24/7 Cross-Chain Token Scoring & Payments 2026
Universal MCP gateway for AI agents — 1108 tools, 307 providers. One endpoint (https://apibase.pro/mcp), pay-per-call with x402 USDC on Base + MPP USDC on Tempo.
Payment infrastructure for AI agents. Reference implementation: x402 + MPP + fiat.
The commerce layer for the x402 agent economy — micropayments for AI agents on Base and Solana
The agent-native LLM router for autonomous agents. 55+ models (8 free), <1ms local routing, USDC payments on Base & Solana via x402.
The AI agent with a wallet — spends USDC autonomously to get real work done. Apache-2.0, TypeScript.
DePIN for Vintage Hardware — Proof-of-Antiquity blockchain where old machines outmine new ones. AI-powered hardware fingerprinting, 15+ CPU architectures, Solana bridge (wRTC). $0 VC.
🚀 Curated list of x402 resources: HTTP 402 Payment Required protocol for blockchain payments, crypto micropayments, AI agents, API monetization. Includes SDKs (TypeScript, Python, Rust), examples, facilitators (Coinbase, Cloudflare), MCP integration, tutorials. Accept USDC payments with one line of code. Perfect for AI agent economy.
The financial operating system for AI agents. A single HTTP client that intercepts '402 Payment Required', routes across x402, L402, and MPP, persists credentials as recoverable assets, enforces per-envelope budgets, and emits a structured trace.
MCP server for Run402 — AI-native Postgres + REST + auth + storage + static sites. Pay with x402 USDC on Base. No signups.