Skip to content

borahanmirzaii/agentpay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgentPay

Autonomous AI Agents Trading USDC Micropayments on Arc Network

Two AI agents that autonomously discover, negotiate, and pay each other sub-cent USDC for data and analysis services — powered by Circle Programmable Wallets on Arc Network, with Gemini AI for agent intelligence.

Architecture

                    +------------------+
                    |   Control Room   |
                    |   (Single HTML)  |
                    +--------+---------+
                             | SSE
                    +--------+---------+
                    |   Backend API    |
                    |     (Hono)       |
                    +--------+---------+
                             |
              +--------------+--------------+
              |                             |
     +--------+--------+         +---------+--------+
     |   DataAgent      |         |  AnalysisAgent   |
     |   $0.002/req     |         |  $0.005/analysis |
     |   Gemini AI      |         |  Gemini AI       |
     |   Circle Wallet  |         |  Circle Wallet   |
     +---------+--------+         +---------+--------+
               |                             |
               +----------+------------------+
                           |
                  +--------+---------+
                  | Circle Wallets   |
                  | Arc Network      |
                  | (USDC gas)       |
                  +------------------+

How It Works

  1. AnalysisAgent needs market data → discovers DataAgent
  2. AnalysisAgent pays DataAgent $0.002 USDC via Circle Programmable Wallets
  3. DataAgent fetches live crypto prices (BTC, ETH, SOL, DOGE) from CoinGecko
  4. DataAgent uses Gemini AI to summarize data into insights
  5. AnalysisAgent uses Gemini AI for risk analysis → BUY/HOLD/SELL recommendation
  6. Each cycle = 1 real on-chain USDC transaction on Arc

Why Arc?

Chain Gas Cost $0.002 Payment Works?
Ethereum L1 $0.50 - $5.00 No (gas 250x > payment)
Polygon $0.01 - $0.05 No (gas 5-25x > payment)
Base / Arbitrum $0.005 - $0.02 Marginal
Arc Network < $0.0001 Yes (gas 20x < payment)

Quick Start

pnpm install
cp .env.example .env
# Add your keys to .env
pnpm dev
# Open http://localhost:3000

Environment Variables

CIRCLE_API_KEY=          # Circle Developer Console
CIRCLE_ENTITY_SECRET=    # 32-byte hex, registered with Circle
GEMINI_API_KEY=          # Google AI Studio
PORT=3000

Tech Stack

  • Runtime: TypeScript, Node.js
  • Backend: Hono
  • AI: Gemini 2.0 Flash (Google AI Studio)
  • Payments: Circle Programmable Wallets
  • Chain: Arc Network (USDC-native L1)
  • Data: CoinGecko API
  • UI: Vanilla JS + Server-Sent Events

Demo

51+ verified on-chain transactions, $0.10+ USDC moved autonomously between agents.

Built For

Agentic Economy on Arc hackathon — lablab.ai, April 2026

License

MIT

About

Autonomous AI Agents Trading USDC Micropayments on Arc Network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors