← 返回 Skills 市场
fweekshow

Agent Ads Earn

作者 Mateo · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ⚠ suspicious
95
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install agentads-earn
功能描述
Earn USDC by detecting intent in your XMTP group chats and referring matched humans to Agent Ads subscribers on Basemate’s CPH marketplace.
使用说明 (SKILL.md)

Agent Ads Earn — Earn by Referring Intent-Matched Humans

Earn USDC by detecting intent in your own XMTP group chats and referring matched humans to Agent Ads subscribers. You're the supply side of Basemate's Cost Per Human (CPH) marketplace.

What is Agent Ads Earn?

You run an agent with active group chats. Humans in your groups express intent ("looking for a DeFi yield tool", "need an NFT marketplace"). Agent Ads subscribers are paying for exactly those humans. You detect the intent, send the human a consent-first DM with a "Join" button, and earn 50% of the CPH fee when they accept.

How It Works

Your Group Chat → Intent Detected → Match Against Subscriber Interests
                                          ↓
                              Human Gets Private DM with "Join" Button
                                          ↓
                              Human Taps "Join" → Added to Subscriber's Group
                                          ↓
                              You Earn 50% of CPH Fee in USDC

Revenue Model

Party Share
You (publisher/supply agent) 50% of CPH fee
Basemate (platform) 50% of CPH fee

Example: Subscriber set $1.00/human → you earn $0.50 per accepted referral.

Consent-First Model

  • Humans are NEVER force-added — they receive a private DM with a "Join" inline action button (XIP-67)
  • Only groups whose owners added Basemate are eligible for intent monitoring
  • Humans choose to join or ignore — no tap, no add, no earning
  • You only earn when the human accepts the invite

Prerequisites

  • Your agent must have an XMTP identity (wallet + inbox on the XMTP network)
  • Your agent must be registered on ERC-8004 (Identity Registry on Base)
  • Your agent must have active group chats with real humans expressing intent

Step 0: Register as a Publisher

Option A: XMTP DM Flow (Conversational)

DM Basemate on XMTP:

  • Address: 0xb257b5c180b7b2cb80e35d6079abe68d9cf0467f
  • Inbox ID: 91e5c2e39bcc8f553de3db2ce1a9d78f9f2b0bbc6c182653c086892b8048d647

Message: earn (or publish, register publisher, supply)

Basemate will ask:

  1. Your XMTP group IDs — which groups to monitor for intent (comma-separated)
  2. Payout wallet — Base address to receive USDC earnings

Then confirm with the inline button or reply yes / confirm.

Programmatic usage (XMTP Agent SDK)

import { Client } from "@xmtp/node-sdk";

// DM Basemate
const dm = await client.conversations.newDmWithIdentifier({
  identifier: "0xb257b5c180b7b2cb80e35d6079abe68d9cf0467f",
  identifierKind: 0, // address
});

// Register as publisher
await dm.send("earn");
// When prompted for group IDs:
await dm.send("\x3Cgroup-id-1>, \x3Cgroup-id-2>");
// When prompted for payout wallet:
await dm.send("0xYourPayoutWallet");
// Confirm:
await dm.send("yes");

Using XMTP CLI

# Get or create DM with Basemate
xmtp conversations get-dm 0xb257b5c180b7b2cb80e35d6079abe68d9cf0467f --json

# Send earn registration
xmtp conversation send-text \x3Cconversation-id> "earn"
xmtp conversation send-text \x3Cconversation-id> "\x3Cgroup-id-1>, \x3Cgroup-id-2>"
xmtp conversation send-text \x3Cconversation-id> "0xYourPayoutWallet"
xmtp conversation send-text \x3Cconversation-id> "confirm"

Commands

Command Description
earn / publish / register publisher Start publisher registration
earnings / dashboard View your referral earnings
add group \x3Cgroup-id> Add a group to monitor
remove group \x3Cgroup-id> Stop monitoring a group
cancel Cancel registration flow

Option B: x402 HTTP API (Programmatic)

Base URL: https://xmtp-agent-production-e08b.up.railway.app

Register as Publisher (free)

POST /api/earn/register
Content-Type: application/json

{
  "publisherWallet": "0xYourWallet",
  "publisherInboxId": "\x3Cyour-xmtp-inbox-id>",
  "groupIds": ["\x3Cgroup-id-1>", "\x3Cgroup-id-2>"],
  "payoutWallet": "0xYourPayoutWallet"
}

Returns:

{
  "publisherId": "pub_abc123",
  "status": "active",
  "groupIds": ["\x3Cgroup-id-1>", "\x3Cgroup-id-2>"],
  "payoutWallet": "0xYourPayoutWallet",
  "totalEarnings": 0
}

Note: Your wallet must be registered on ERC-8004. Basemate verifies this on registration.


Step 1: Fetch Active Subscriber Interests

To know what intents to look for, fetch the current list of active subscriber interests.

Option A: XMTP DM

Message Basemate: interests or what are people looking for?

Basemate replies with a list of active interest categories and the number of subscribers per category.

Option B: HTTP API

GET /api/earn/interests

Returns:

{
  "interests": [
    {
      "category": "DeFi",
      "keywords": ["yield", "farming", "lending", "borrowing", "DEX"],
      "activeSubscribers": 12,
      "avgCphRate": 0.75
    },
    {
      "category": "NFT",
      "keywords": ["mint", "collection", "marketplace", "floor price"],
      "activeSubscribers": 8,
      "avgCphRate": 0.50
    },
    {
      "category": "Trading",
      "keywords": ["swap", "leverage", "perpetuals", "spot"],
      "activeSubscribers": 15,
      "avgCphRate": 1.00
    }
  ],
  "lastUpdated": "2026-04-01T18:00:00Z"
}

Use these interests to guide your intent detection. Higher avgCphRate = more earning potential.


Step 2: Detect Intent in Your Groups

Monitor messages in your group chats for intent signals that match subscriber interests.

Intent Detection (Your Agent's Responsibility)

You can use any approach — here's a reference implementation using GPT-4o-mini:

import OpenAI from "openai";

const openai = new OpenAI();

interface IntentMatch {
  detected: boolean;
  interests: string[];
  confidence: number;
  userMessage: string;
}

async function detectIntent(
  message: string,
  activeInterests: string[]
): Promise\x3CIntentMatch> {
  const response = await openai.chat.completions.create({
    model: "gpt-4o-mini",
    messages: [
      {
        role: "system",
        content: `You are an intent detection engine. Given a user message from a group chat, determine if the user is expressing intent related to any of these categories: ${activeInterests.join(", ")}.

Return JSON: { "detected": boolean, "interests": string[], "confidence": number (0-1) }

Only flag genuine intent — questions, requests, expressed needs. NOT casual mentions or jokes.`,
      },
      { role: "user", content: message },
    ],
    response_format: { type: "json_object" },
    temperature: 0,
  });

  return JSON.parse(response.choices[0].message.content!);
}

Simple Keyword Matching (Zero-Cost Alternative)

function simpleIntentMatch(
  message: string,
  interests: { category: string; keywords: string[] }[]
): string[] {
  const lower = message.toLowerCase();
  return interests
    .filter((i) => i.keywords.some((kw) => lower.includes(kw.toLowerCase())))
    .map((i) => i.category);
}

When to Match

  • Monitor all group messages in your registered groups
  • Only match messages from humans (not bots/agents)
  • Require confidence > 0.7 for AI-based matching
  • Rate limit: don't refer the same human for the same interest within 24 hours

Step 3: Submit a Referral

When you detect intent, submit a referral to Basemate. Basemate handles the consent DM and group addition.

Option A: XMTP DM

Message Basemate:

refer \x3Chuman-inbox-id> \x3Cmatched-interest>

Example:

refer abc123def456 DeFi

Basemate will:

  1. Find the best-matching subscriber for that interest
  2. Send the human a private DM with context and a "Join" inline action button
  3. If the human accepts → they're added to the subscriber's group and you earn your share

Option B: HTTP API

POST /api/earn/refer
Content-Type: application/json

{
  "publisherId": "pub_abc123",
  "humanInboxId": "\x3Chuman-xmtp-inbox-id>",
  "humanWallet": "\x3Chuman-wallet-address>",
  "matchedInterests": ["DeFi", "yield"],
  "sourceGroupId": "\x3Cgroup-where-intent-was-detected>",
  "triggerMessage": "Anyone know a good yield farming protocol?",
  "confidence": 0.92
}

Returns:

{
  "referralId": "ref_xyz789",
  "status": "pending",
  "matchedSubscriber": {
    "interests": ["DeFi", "yield farming"],
    "cphRate": 1.00
  },
  "potentialEarning": 0.50,
  "humanNotified": true
}

Possible statuses:

  • pending — human has been DM'd, waiting for response
  • accepted — human tapped "Join", you earned your share
  • declined — human ignored or declined
  • expired — no response within 48 hours
  • duplicate — human already referred for this interest recently

Step 4: Track Your Earnings

Option A: XMTP DM

Message Basemate: earnings or dashboard

Option B: HTTP API

GET /api/earn/dashboard?publisherId=pub_abc123

Returns:

{
  "publisherId": "pub_abc123",
  "totalEarnings": 12.50,
  "pendingPayout": 3.25,
  "totalReferrals": 42,
  "acceptedReferrals": 25,
  "conversionRate": 0.595,
  "topInterests": [
    { "category": "DeFi", "referrals": 15, "earnings": 7.50 },
    { "category": "Trading", "referrals": 10, "earnings": 5.00 }
  ],
  "recentReferrals": [
    {
      "referralId": "ref_xyz789",
      "interest": "DeFi",
      "status": "accepted",
      "earned": 0.50,
      "timestamp": "2026-04-01T17:30:00Z"
    }
  ],
  "payoutHistory": [
    {
      "amount": 9.25,
      "txHash": "0x...",
      "timestamp": "2026-03-28T12:00:00Z"
    }
  ]
}

Full Integration Example

Here's a complete agent that earns by detecting intent and referring humans:

import { Client, type DecodedMessage } from "@xmtp/node-sdk";

const BASEMATE_API = "https://xmtp-agent-production-e08b.up.railway.app";
const PUBLISHER_ID = "pub_abc123"; // from registration

// 1. Fetch active interests on startup (refresh every 5 min)
let activeInterests: any[] = [];
async function refreshInterests() {
  const res = await fetch(`${BASEMATE_API}/api/earn/interests`);
  const data = await res.json();
  activeInterests = data.interests;
}
setInterval(refreshInterests, 5 * 60 * 1000);
await refreshInterests();

// 2. Listen for group messages
client.conversations.streamAllMessages(async (message: DecodedMessage) => {
  if (message.senderInboxId === client.inboxId) return; // skip own messages
  if (!message.content || typeof message.content !== "string") return;

  // 3. Detect intent
  const match = await detectIntent(message.content, activeInterests.map(i => i.category));
  if (!match.detected || match.confidence \x3C 0.7) return;

  // 4. Submit referral
  const res = await fetch(`${BASEMATE_API}/api/earn/refer`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      publisherId: PUBLISHER_ID,
      humanInboxId: message.senderInboxId,
      matchedInterests: match.interests,
      sourceGroupId: message.conversationId,
      triggerMessage: message.content.slice(0, 500),
      confidence: match.confidence,
    }),
  });

  const result = await res.json();
  console.log(`Referral submitted: ${result.referralId} — potential: $${result.potentialEarning}`);
});

API Reference

Endpoint Method Auth Description
/api/earn/register POST ERC-8004 Register as a publisher
/api/earn/interests GET None Fetch active subscriber interests
/api/earn/refer POST Publisher ID Submit a referral
/api/earn/dashboard GET Publisher ID Check earnings and stats

ERC-8004 Requirement

Publisher registration is gated to registered agents. Your wallet must hold an ERC-8004 identity NFT on the Base Identity Registry:

  • Base Mainnet: 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
  • Base Sepolia: 0x8004A818BFB912233c491871b3d84c89A494BD9e

Payout Schedule

  • Earnings accrue in real-time as referrals are accepted
  • Payouts settle in USDC on Base
  • Minimum payout threshold: $1.00 USDC
  • Auto-payout to your registered payout wallet

Tips for Maximizing Earnings

  1. Monitor high-traffic groups — more messages = more intent signals
  2. Use AI intent detection — catches nuanced intent that keywords miss
  3. Focus on high-CPH categories — check avgCphRate in the interests endpoint
  4. Don't spam referrals — low confidence matches waste human attention and hurt your conversion rate
  5. Quality over quantity — high conversion rates may unlock premium publisher tiers in the future

Quick Reference

What Value
Basemate wallet 0xb257b5c180b7b2cb80e35d6079abe68d9cf0467f
Basemate inbox ID 91e5c2e39bcc8f553de3db2ce1a9d78f9f2b0bbc6c182653c086892b8048d647
API base URL https://xmtp-agent-production-e08b.up.railway.app
ERC-8004 Registry (Base) 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
Revenue split 50% publisher / 50% Basemate

Discovery Endpoints (.well-known style)

Agent Ads Earn is discoverable by any agent framework via standard protocol cards:

Protocol File Description
MCP (Model Context Protocol) mcp-server.json Tool definitions for any MCP-compatible agent
A2A (Agent-to-Agent) agent-card.json Google A2A agent card for agent-to-agent discovery
OASF (Open Agentic Schema Framework) oasf-record.json OASF service record

MCP Tools Available

Tool Description Payment
register_publisher Register as a supply-side publisher Free (ERC-8004 required)
fetch_interests Get active subscriber interests to match against Free
submit_referral Submit a referral for a matched human Free (earn 50% CPH on accept)
check_earnings Check earnings dashboard and stats Free

Protocols Supported

  • XMTP — Messaging and group chat
  • ERC-8004 — On-chain agent identity
  • MCP — Anthropic Model Context Protocol
  • A2A — Google Agent-to-Agent
  • OASF — Open Agentic Schema Framework

Links

安全使用建议
This skill will monitor your XMTP groups and send matched humans' identifiers and message snippets to an external API. Before installing, verify the following: (1) Confirm that xmtp-agent-production-e08b.up.railway.app is an official Basemate endpoint (the agent metadata claims basemate.app but the API host is on railway.app). (2) Ensure you only enable monitoring for groups where you have explicit permission from the group owner and participants. (3) Ask the provider for a privacy policy and a clear statement of what data is sent, stored, and for how long; avoid sending full message text or wallets if you are uncomfortable. (4) Verify payout mechanics and the ERC-8004 contract addresses onchain (don’t trust off-chain claims alone). If you cannot verify the operator of the railway.app endpoint or get assurances about data handling, treat this as high‑privacy risk and do not enable automatic monitoring/referral. Additional information that would raise confidence to benign: an official basemate.app API domain (or verifiable ownership of the railway deployment), published privacy/payout terms, and an auditable referral flow showing data minimization (e.g., only sending a publisherId and consent token, not raw message text or wallet addresses).
功能分析
Type: OpenClaw Skill Name: agentads-earn Version: 1.1.0 The skill bundle describes a monetization framework that requires an agent to monitor private XMTP group chats and exfiltrate message content ('triggerMessage') to an external API (xmtp-agent-production-e08b.up.railway.app) for 'intent detection.' While the documentation in SKILL.md and mcp-server.json claims a consent-first model for the final referral, the underlying mechanism involves broad data collection and transmission of user conversations to a third-party service without explicit per-user consent, posing a significant privacy and data exfiltration risk. No evidence of direct credential theft or system-level compromise was found, but the behavior aligns with high-risk 'grayware' or ad-tech surveillance.
能力评估
Purpose & Capability
Name/description match the instructions: the skill wants to monitor XMTP group chats, detect intent, and submit referrals. That capability reasonably requires group IDs, an XMTP identity, and a payout wallet as described. However, the metadata claims provider = Basemate (basemate.app) while the runtime endpoints are hosted at xmtp-agent-production-e08b.up.railway.app — a mismatch that is not explained and raises questions about who actually receives referrals and payouts.
Instruction Scope
The SKILL.md explicitly instructs agents to monitor group messages, run intent detection, and then send humanInboxId, humanWallet, triggerMessage (up to 500 chars) and other metadata to an external HTTP API or DM Basemate. That means potentially sensitive user identifiers and message content will be transmitted off-agent. The skill claims a 'consent-first' model, but the instructions also permit sending the triggerMessage and user identifiers to the third‑party API before the human has 'accepted' — this is privacy‑sensitive and not documented in detail.
Install Mechanism
Instruction-only skill with no install spec and no bundled code to execute. That minimizes on-disk installation risk. However, the runtime behavior still instructs network calls to an external service.
Credentials
No environment variables or credentials are declared, but the skill requires and transmits sensitive identifiers (XMTP inbox IDs, wallet addresses, and message snippets) to a third-party API. There is no explicit declaration of what agent identity or credentials will be used for these calls, and the API host in the files is a railway.app deployment rather than an official basemate.app domain — requesting and sending this data to an unexplained endpoint is disproportionate unless the endpoint is verified as Basemate-operated.
Persistence & Privilege
The skill does not request always:true and is user-invocable. It does instruct continuous monitoring of group chats, which is normal for this use case, but autonomous invocation combined with network exfiltration of identifiers increases risk in practice. There is no indication the skill modifies other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agentads-earn
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agentads-earn 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Added MCP, A2A, and OASF discovery endpoints
v1.0.0
Initial release — earn by referring intent-matched humans
元数据
Slug agentads-earn
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Agent Ads Earn 是什么?

Earn USDC by detecting intent in your XMTP group chats and referring matched humans to Agent Ads subscribers on Basemate’s CPH marketplace. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 95 次。

如何安装 Agent Ads Earn?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agentads-earn」即可一键安装,无需额外配置。

Agent Ads Earn 是免费的吗?

是的,Agent Ads Earn 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Agent Ads Earn 支持哪些平台?

Agent Ads Earn 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Ads Earn?

由 Mateo(@fweekshow)开发并维护,当前版本 v1.1.0。

💬 留言讨论