Skip to main content

Crypto-native ad marketplace for AI agents. x402 micropayments on Base.

Project description

Latent Protocol

Crypto-native ad marketplace for AI agents. x402 micropayments on Base. Open source.

Get paid to wait. While your agent thinks, you earn USDC.

What Is This?

Latent Protocol is an open-source ad marketplace that monetizes AI agent idle time. When your agent is processing, thinking, or waiting — sponsored recommendations are shown, and you earn 50% of ad revenue in USDC on Base.

Built on x402 — the internet's native payment protocol by Coinbase.

Quick Start

Install Plugin (Hermes Users)

cd ~/.hermes/plugins/
git clone https://github.com/enzoonchain/latent-protocol.git agent-ads
hermes config set plugins.enabled '[agent-ads]'
hermes config set ads.wallet 0xYOUR_BASE_WALLET
hermes gateway restart

Self-Host Ad Server

git clone https://github.com/enzoonchain/latent-protocol.git
cd latent-protocol
cp .env.example .env  # edit with your values
docker compose up -d

Architecture

Advertiser (Protocol/Token)     User/Agent (Hermes)
        │                              │
        │  x402 payment                │  plugin fetches ad
        ▼                              ▼
┌──────────────────────────────────────────────┐
│           AD MARKETPLACE SERVER               │
│           (FastAPI + x402)                    │
│                                               │
│  /ad/request  /ad/click  /campaign/*          │
│  /earnings/*  /payout/*  /health              │
└──────────────────┬───────────────────────────┘
                   │
                   ▼
          ┌─────────────────┐
          │  x402 Facilitator │
          │  (Coinbase CDP)   │
          │  USDC on Base     │
          └─────────────────┘

Features

  • Hermes Plugin — drop-in plugin for any Hermes instance
  • x402 Payments — instant USDC micropayments on Base (~$0.0001 gas)
  • Multi-surface — WebUI thinking state, response footer, Telegram, CLI
  • Block Bidding — advertisers buy blocks of 1,000 impressions
  • User Dashboard — earnings, stats, payout management
  • Open Source — Apache-2.0, self-hostable

Revenue Split

Recipient Share
User (viewer) 50%
Operator (host) 30%
Protocol treasury 20%

Project Structure

latent-protocol/
├── server/          # FastAPI ad server + x402
├── plugin/          # Hermes plugin
├── webui/           # WebUI patches (thinking state, footer)
├── portal/          # Advertiser portal (Next.js)
├── contracts/       # Smart contracts (optional)
├── docs/            # Documentation
└── scripts/         # Setup + deployment scripts

Tech Stack

Component Tech
Ad Server FastAPI + x402 Python SDK
Database Railway Postgres (SQLAlchemy async + asyncpg)
Payments x402 protocol, USDC on Base
Facilitator Coinbase CDP (1K free tx/mo)
Plugin Hermes plugin system
Portal Next.js + Wagmi + RainbowKit
Chain Base L2 (eip155:8453)

Docs

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

latent_protocol-0.1.0.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

latent_protocol-0.1.0-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file latent_protocol-0.1.0.tar.gz.

File metadata

  • Download URL: latent_protocol-0.1.0.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for latent_protocol-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ff995e4b67850dbe923083491a58ac1ebc5235b7fa3262c31e90d6f0f5e4a049
MD5 581c78a1688191f9696cf1453725f2c8
BLAKE2b-256 02b7afb26cc7aa25bc9c9135187106484e673c80b28cf221713eee694540de92

See more details on using hashes here.

File details

Details for the file latent_protocol-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for latent_protocol-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7453f8fd1766eeca6bab772e6dd6757c89d3fc683e3787bc4580983ea86c858f
MD5 27dc20ce1a68ec73f2318036d19de0a9
BLAKE2b-256 99a37ae8fc8f1a8b06db3b3c5960bb25471c3bb6bf995e041b0f29f586b2a41f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page