AI Agents

Launch an AI agent on Base that actually makes money (2026 guide)

Build an AI agent on Base in 15 minutes — no code required. Then scale it into a revenue machine with x402 payments, Virtuals Protocol incentives ($1M/month pool), and autonomous DeFi trading.

20 minUpdated 2026-03-03

$1 million per month. That's what Virtuals Protocol is redirecting to AI agents right now. Not in a year. Not "soon." Right now.

Meanwhile, most "AI agent" tutorials still have you writing boilerplate code to make a chatbot that says "gm." That's not what this guide is about.

This guide gets you from zero to a working AI agent on Base in 15 minutes — no code. Then it shows you how to turn that agent into something that earns real money: charging USDC per API call, competing for protocol incentives, and trading autonomously. Every tool mentioned is live in production. Every code snippet works today.

Whether you're a builder who codes in their sleep or someone who's never opened a terminal, there's a path here for you.

What AI agents are doing on Base right now

Skip the theory. Here's what's actually happening onchain today — real agents, real transactions, real revenue.

Agents that trade. Bankr-powered agents execute DeFi strategies autonomously — swapping tokens, deploying new coins, placing Polymarket bets, running leveraged positions. All through natural language. No manual transaction signing. The agent decides, the agent executes.

Agents that talk to each other. Botchan enables agent-to-agent messaging directly onchain. Messages are permanent, permissionless, and censorship-resistant. No API keys to manage, no rate limits, no platform that can shut you down tomorrow.

Agents that get paid. Coinbase's x402 protocol turns any API endpoint into a paid service. Your agent charges USDC per request — $0.001 for weather data, $0.01 for market analysis, whatever you set. No Stripe. No payment gateway. No 2.9% + 30¢ fee. Just HTTP headers and instant settlement on Base.

Agents that earn protocol incentives. Virtuals Protocol's Agent Commerce Protocol (ACP) lets agents list services and transact with each other. The protocol redistributes up to $1M/month in revenue incentives to top-performing agents. This isn't a grant program. It's automated revenue sharing based on agent performance.

Agents with onchain identity. ERC-8004 gives your agent an NFT on Ethereum, a profile, and a reputation score. Other agents verify it before transacting. Think of it as a credit score for the agent economy.

The stack at a glance

What you needToolHow it works
Trade & DeFiBankrOpenClaw skill or REST API
Message agentsBotchanCLI or Bankr wallet
Get paid per requestx402HTTP 402 middleware
Earn protocol revenueVirtualsAgent Commerce Protocol
Onchain identityERC-8004NFT registry on Ethereum
Human-readable nameBasenamesENS subdomain on Base
Get discoveredSonarbotSubmit at sonarbot.xyz

Your first agent in 15 minutes (zero code)

Five steps. No coding. Fully functional agent that trades, messages, and has a wallet.

Step 1: Install OpenClaw

bash
npm install -g openclaw
openclaw setup

OpenClaw is where your agent lives. It handles memory (what the agent remembers between conversations), scheduling (cron jobs, periodic tasks), and messaging (Telegram, Discord, WhatsApp). You pick the AI model — Claude, GPT-5.2, Llama, anything. OpenClaw handles the rest.

During setup, OpenClaw creates a workspace at ~/.openclaw/workspace with starter files. The most important one is SOUL.md — your agent's personality:

markdown


## Identity
- Name: BaseTrader
- Personality: Direct, data-driven, no hype
- Expertise: DeFi yields and token analysis on Base

## Rules
- Always check token liquidity before recommending
- Never invest more than 5% of portfolio in one position
- Report in plain English, not jargon

Other workspace files that shape your agent's behavior:

  • AGENTS.md — operating instructions (what to do each session)
  • USER.md — info about the human the agent works for
  • IDENTITY.md — name, avatar, emoji
  • TOOLS.md — local notes about tools and environment
  • HEARTBEAT.md — periodic tasks the agent runs automatically
  • memory/ — daily logs and long-term memory files

This workspace is your agent's brain. Make it a private git repo so everything is version-controlled and backed up.

Step 2: Add skills from ClawHub

ClawHub (clawhub.ai) is the public skills registry for OpenClaw. One command per capability:

bash
# Trading, DeFi, token launches
clawhub install bankr

# Agent-to-agent messaging
clawhub install botchan

# Browse everything available
clawhub search

# Keep skills updated
clawhub update --all

You can also install skills directly from the BankrBot/openclaw-skills repo on GitHub.

Skills are plug-in capabilities. The Bankr skill gives your agent a crypto wallet, trading, token deployment, Polymarket betting, and leverage trading — all through natural language. Your agent says "swap 0.1 ETH for USDC on Base" and it happens.

Step 3: Set up Bankr

Headless setup. No browser, no MetaMask, no seed phrases:

bash
bankr login email your@email.com
# Wait for OTP code in your email
bankr login email your@email.com --code 123456 --accept-terms --key-name "My Agent" --read-write

This creates wallets on Base, Ethereum, Polygon, and Solana automatically.

Step 4: Verify everything works

bash
bankr whoami
bankr prompt "What is my ETH balance on Base?"

bankr whoami shows your wallet addresses across all chains. The prompt command lets you talk to Bankr in natural language — the same interface your agent uses.

Step 5: Add Botchan (agent messaging)

bash
npm install -g botchan
botchan feeds                    # See what agents are talking about
botchan read general --limit 5   # Read recent agent posts

Botchan connects your agent to the agent social layer on Base. Agents post updates, share data, and coordinate — all onchain and permanent.

That's it. Your agent can now trade crypto, check balances, deploy tokens, and communicate with other agents. No code written. Total time: 15 minutes.

The Base agent stack (how it all connects)

┌─────────────────────────────────────┐
│         Your AI Agent               │
│  (Claude, GPT-5, Llama — the brain) │
└──────────────┬──────────────────────┘
               │
┌──────────────▼──────────────────────┐
│         OpenClaw (Runtime)          │
│  Skills, memory, cron, messaging    │
└──────────────┬──────────────────────┘
               │
┌──────────────▼──────────────────────┐
│         Skills (Capabilities)       │
│  Bankr · Botchan · ERC-8004        │
│  Clanker · OnchainKit · Veil       │
└──────────────┬──────────────────────┘
               │
┌──────────────▼──────────────────────┐
│         Onchain Layer (Base)        │
│  Wallets · Contracts · x402        │
│  Basenames · Agent Registry         │
└─────────────────────────────────────┘

The brain — any LLM. Claude, GPT-5.2, Llama. Handles reasoning, conversation, and decision-making.

OpenClaw — the runtime. Memory, scheduling, messaging. The operating system for your agent.

Skills — modular capabilities. Each one adds a specific power. Open source, community-maintained, and you can write your own.

Base — the execution layer. Every trade, message, and payment settles onchain. Real wallets. Final transactions. Actual money.

Full skill ecosystem

Available from the BankrBot/openclaw-skills repo:

ProviderSkillWhat it does
BankrbankrTrading, token launches, Polymarket, leverage, payments
8004.orgerc-8004Onchain agent identity + reputation
BotchanbotchanAgent-to-agent messaging on Base
ClankerclankerDeploy ERC20 tokens on Base
CoinbaseonchainkitReact components for onchain apps
EndaomentendaomentCharitable donations onchain
ENSens-primary-nameSet ENS name on Base/L2s
Veil CashveilPrivacy/shielded transactions
QRCoinqrcoinQR code auction platform

Each skill comes with a SKILL.md that documents commands and configuration. Drop it into your workspace, restart OpenClaw, and your agent has a new capability.

Give your agent a voice on X (Twitter)

An agent that can trade but can't communicate is a wallflower at the party. Here's how to give your agent a public presence.

Set up X API access:

  1. Create a developer account at developer.x.com
  2. Create a project with Read and Write permissions
  3. Generate OAuth 1.0a keys
  4. Add them to your environment:
bash
# Add to ~/.config/env/global.env or your shell profile
export X_API_KEY="your-api-key"
export X_API_SECRET="your-api-secret"
export X_ACCESS_TOKEN="your-access-token"
export X_ACCESS_SECRET="your-access-secret"

Post a tweet from your agent:

typescript
// x-post.ts — Post to X using OAuth 1.0a
import OAuth from "oauth-1.0a";
import crypto from "crypto";

const oauth = new OAuth({
  consumer: { key: process.env.X_API_KEY!, secret: process.env.X_API_SECRET! },
  signature_method: "HMAC-SHA1",
  hash_function: (base, key) =>
    crypto.createHmac("sha1", key).update(base).digest("base64"),
});

const token = {
  key: process.env.X_ACCESS_TOKEN!,
  secret: process.env.X_ACCESS_SECRET!,
};

async function postTweet(text: string) {
  const url = "https://api.x.com/2/tweets";
  const authHeader = oauth.toHeader(
    oauth.authorize({ url, method: "POST" }, token)
  );

  const res = await fetch(url, {
    method: "POST",
    headers: {
      ...authHeader,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ text }),
  });

  return res.json();
}

await postTweet("First post from my AI agent on Base");

With OpenClaw's cron system, your agent can post on a schedule — market analysis every 6 hours, portfolio updates daily, engagement replies when mentioned.

Rate limit warning: Keep automated posting under 15 tweets/day. More than that and X will suspend your account. We learned this the hard way.

For developers: Coinbase AgentKit

Want full programmatic control? AgentKit is Coinbase's official SDK for building onchain agents.

Quickstart

bash
npm create onchain-agent@latest
cd onchain-agent
mv .env.local .env  # Add your CDP API key + OpenAI key
npm install && npm run dev

Running agent with a wallet. Ask it to fund your wallet, check your balance, or swap tokens.

Why AgentKit

MPC wallets — no private key to manage. Coinbase's infrastructure handles key management. Your agent signs transactions without seed phrases.

Framework-agnostic — works with OpenAI, Anthropic, open-source models. Whatever fits your use case.

Native Base support — deployments, swaps, transfers. Base is a first-class citizen.

Fee-free USDC transfers — send stablecoins on Base without gas costs eating your margins.

AgentKit is the right choice when you need custom logic, specific trading strategies, or tight backend integration. For getting started fast, the OpenClaw + Bankr path is faster. They're complementary, not competing.

Full docs: docs.cdp.coinbase.com/agentkit

Writing custom skills

Need something the existing skills don't cover? Build your own. A skill is a folder with a SKILL.md:

my-custom-skill/
├── SKILL.md          # Instructions + metadata
├── references/       # Additional docs the agent reads
└── scripts/          # Helper scripts

The SKILL.md frontmatter tells OpenClaw when to activate the skill:

yaml
---
name: my-custom-skill
description: Use when the user asks about custom DeFi strategies on Base.
---

# My Custom Skill

Instructions for the agent go here. Write them like you're
explaining to a smart colleague what to do and how.

Drop it in ~/.openclaw/workspace/skills/ and OpenClaw picks it up automatically. See the AgentSkills spec for the full format.

How agents get paid: four revenue paths

This is where it gets interesting. Your agent isn't just a tool — it's a business.

Path 1: Virtuals Protocol (up to $1M/month)

The biggest opportunity right now. Virtuals Protocol redistributes protocol fees to the best-performing AI agents. The Agent Commerce Protocol (ACP) lets agents list services and transact with each other — real agent-to-agent commerce, live today at app.virtuals.io/acp.

How the economics work:

  • Protocol fees accumulate from agent transactions
  • Revenue gets redistributed based on agent performance metrics
  • Top agents earn proportional shares of up to $1M/month in incentives
  • The more useful your agent is, the more it earns

This isn't a grant you apply for. It's automated revenue sharing. Build something useful, and the protocol pays you.

Path 2: x402 payments (charge per API call)

Coinbase's x402 turns any API endpoint into a paid service. The name comes from HTTP status code 402 — "Payment Required." Reserved since the 90s, finally has a use case.

Server-side — make any endpoint paid:

typescript
import express from "express";
import { paymentMiddleware } from "@x402/express";

const app = express();

app.use(
  paymentMiddleware({
    "GET /weather": {
      price: "$0.001",
      network: "base",
      description: "Weather data",
    },
  })
);

app.get("/weather", (req, res) => {
  res.json({ temp: 72, condition: "sunny" });
});

app.listen(3000);

When a client hits /weather without paying, the server returns HTTP 402 with payment instructions. The client pays in USDC, retries, gets the data. All automatic.

Client-side — pay automatically:

typescript
import { wrapFetch } from "@x402/fetch";

const paidFetch = wrapFetch(fetch, wallet);
const response = await paidFetch("https://agent-api.example.com/weather");
const data = await response.json();

wrapFetch intercepts 402 responses, handles payment, and retries. Your code just calls fetch like normal. The payment is invisible.

The math: 100K requests/day at $0.001 each = $100/day. At $0.01 per request, $1,000/day. The protocol handles everything.

bash
npm install @x402/core @x402/evm @x402/express

Source and docs: github.com/coinbase/x402

Path 3: Autonomous trading (Bankr)

Your agent trades on its own. DeFi strategies, arbitrage, Polymarket predictions — whatever edge you can encode. The agent keeps its own wallet and runs its own P&L.

Highest risk, highest reward. Your agent needs a real strategy, not random swaps. But the infrastructure is production-ready: Bankr handles execution, OpenClaw handles scheduling, Base handles settlement.

Path 4: Get discovered on Sonarbot

Submit your agent at sonarbot.xyz. The community curates the best AI products and agents. Top submissions earn $SNR rewards weekly — 30M $SNR to the winning product, 15M split among top curators.

Discovery is the bottleneck for most agents. Sonarbot solves it. Put your agent on the map.

Give your agent an identity

An agent without identity is invisible. Other agents can't find it, verify it, or trust it. Two primitives fix this.

Basenames

Basenames are ENS subdomains on Base. Instead of 0x7a3b..., your agent is mybot.base.eth.

Names with 10+ characters cost 0.0001 ETH/year — roughly $0.25. Register at base.org/names or programmatically using OnchainKit. For the code walkthrough, see our onchain identity guide.

ERC-8004: onchain agent registry

Your agent gets:

  • An NFT on Ethereum mainnet — proof of existence
  • A profile with metadata — what it does, who built it
  • A reputation score — feedback from other agents after interactions

Contract addresses (Ethereum mainnet):

  • Identity Registry: 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
  • Reputation Registry: 0x8004BAa17C55a88189AE136b182e5fdA19dE9b63

The agent economy only works if agents can trust each other. An agent with ERC-8004 identity and a Basename is discoverable (human-readable name), verifiable (onchain NFT), and accountable (reputation history). Without identity, it's just another anonymous bot.

What to build next

The tooling exists. The incentives are live. Here's where to go deeper:

Virtuals Protocol deep dive — understanding ACP, agent scoring, and revenue optimization.

x402 production setup — authentication, rate limiting, analytics for your paid API.

Agent wallet security — key management, spending limits, fund protection. Read our agent wallet guide.

Onchain identity — Basenames, ENS, attestations, and ERC-8004 in depth. Full walkthrough in our onchain identity guide.

Smart contracts — deploy custom contracts your agent interacts with. Start with deploying on Base.

Agents that build onchain — what happens when your agent doesn't just trade and talk, but actually deploys contracts, creates tokens, and builds products autonomously? That guide is coming soon.


The agent economy on Base is early. The barrier to entry is 15 minutes and zero lines of code. The agents that ship now get first-mover advantage in a market that's barely started.

Stop reading. Start building.