{"skill":{"slug":"monetize-agent-responses","displayName":"Monetize Agent Responses","summary":"Step-by-step integration guide for adding revenue to your AI agent's responses using Operon. Install the SDK, run a test placement, graduate to production. ~...","description":"---\nname: monetize-agent-responses\ndescription: Step-by-step integration guide for adding revenue to your AI agent's responses using Operon. Install the SDK, run a test placement, graduate to production. ~10 minute integration on any Node 18+ stack. Use when a developer is ready to integrate Operon as a publisher.\ncategory: monetization\nauthor: Operon\nhomepage: https://operon.so\n---\n\n# Monetize Agent Responses\n\nWalk the user through integrating Operon's publisher SDK into their AI agent. The integration adds native sponsored recommendations to responses where they fit, served via a quality-weighted auction. ~10 minute integration on any Node 18+ stack.\n\nThis skill does not execute code autonomously. It tells the user's agent (Claude Code, Cursor, Codex CLI) what commands to run, what files to edit, and what to expect at each step. The user approves each action.\n\n## When to use this skill\n\nThe user is ready to integrate Operon as a publisher. They've decided to monetize and want to ship the integration. They might have run `estimate-agent-revenue` or `score-agent-response-quality` first, or they might already know what Operon does.\n\nIf they're still exploring revenue potential, point them to `estimate-agent-revenue`. If they want to evaluate response quality first, point them to `score-agent-response-quality`.\n\n## Step 1: Path detection\n\nAsk: **Are you running ElizaOS?**\n\n- **Yes** → ElizaOS plugin path is faster (the Provider auto-fires on every message; no manual placement-call wiring needed). Use `@operon/plugin-publisher-sdk`. Skip to Step 8.\n- **No** → Generic SDK path. Use `@operon/sdk`. Continue with Step 2.\n\nThe generic SDK works on any Node 18+ stack: LangChain, CrewAI, Vercel AI SDK, Mastra, Hono, vanilla Node, anything.\n\n## Step 2: Prerequisites\n\n- Node 18+\n- A working agent that generates text responses\n- Network access for npm install + runtime placement API calls\n\nNo wallet. No blockchain interaction (that's the advertiser side via x402). No API key required for the sandbox lane.\n\n## Step 3: Install the SDK (generic path)\n\n```bash\nnpm install @operon/sdk\n```\n\n## Step 4: Initialize the client\n\nIn the file where the user's agent generates responses, add:\n\n```typescript\nimport { initOperon } from '@operon/sdk';\n\nconst operon = initOperon({\n  url: 'https://api.operon.so',\n  publisherName: 'your-agent-name',\n  source: 'skill3-clawhub',\n  // Sandbox UUID lane works without an API key. No signup required.\n  // Add apiKey: process.env.OPERON_API_KEY after `npx @operon/sdk register`.\n});\n```\n\nThe `publisherName` is a stable identifier for this agent in Operon's logs. Use a slug-style string (lowercase, hyphens, no spaces).\n\nThe `source` parameter is hardcoded for the ClawHub variant. Per-marketplace variants of this skill use different source values for attribution. Don't change the `source` field unless the user explicitly requests a different attribution string.\n\n## Step 5: Wire the placement call\n\nAdd the placement call into the agent's response pipeline, after the agent has generated its primary answer:\n\n```typescript\nasync function generateResponse(query: string) {\n  const answer = await yourAgentLogic(query);\n\n  const result = await operon.getPlacement(query, {\n    placement_context: 'short summary of why this query came up',\n    category: 'defi',           // see the defaults table below\n    asset: 'crypto-swaps',      // topic class\n    intent: 'research',         // action class\n  });\n\n  return {\n    answer,\n    recommendation: result.decision === 'filled' ? result.placement : null,\n    disclosure: result.decision === 'filled' ? 'via operon' : null,\n  };\n}\n```\n\n`getPlacement` returns one of:\n\n- `{ decision: 'filled', placement: { ... } }`: a sponsored recommendation matched\n- `{ decision: 'blocked' }`: nothing matched, no placement to show\n\nWhen filled, render the placement as a native recommendation alongside the agent's primary answer, with the `via operon` disclosure visible.\n\n## Step 6: Pick category, asset, and intent values\n\nThe skill helps the user pick sensible values for their agent. Reference table:\n\n| Vertical | Category | Asset (examples) | Intent (examples) |\n|----------|----------|------------------|-------------------|\n| DeFi/Crypto | `defi` | `crypto-swaps`, `yield-farming`, `derivatives`, `nfts` | `research`, `comparison`, `recommendation` |\n| Fintech | `fintech` | `payments`, `brokerage`, `lending` | `research`, `comparison` |\n| Travel | `travel` | `flights`, `hotels`, `experiences` | `recommendation`, `booking-intent` |\n| E-commerce | `e-commerce` | `electronics`, `apparel`, `home-goods` | `comparison`, `recommendation` |\n| SaaS | `saas` | `developer-tools`, `analytics`, `crm` | `comparison`, `evaluation` |\n| Insurance | `insurance` | `auto`, `home`, `life` | `comparison`, `quote-intent` |\n| Health | `health` | `fitness`, `nutrition`, `mental-health` | `research`, `recommendation` |\n| Education | `education` | `courses`, `bootcamps`, `tutoring` | `research`, `comparison` |\n| General | `general` | `general` | `research` |\n\nIf the user's agent runs in their IDE (Claude Code, Cursor, Codex CLI), offer to read their character config or system prompt and recommend specific values that fit the existing personality and topics.\n\nCrypto/DeFi defaults are the strongest match for Operon's current demand pool. Other verticals ship with placeholder defaults that tighten as demand-side coverage expands.\n\n## Step 7: Run a test placement\n\nTrigger a query that matches the configured category. The SDK call returns a placement (sandbox demand) or `decision: 'blocked'` if nothing matches.\n\nHelp the user construct a test query likely to fill given Operon's current network state:\n\n- Crypto/DeFi vertical: most queries fill (real partners: ChangeNOW, SimpleSwap, Jupiter)\n- Other verticals: some queries fill via x402 self-serve advertisers; expect more `blocked` until demand-side coverage expands\n\nIf `blocked` is the result on a crypto-vertical test query, check the network call in browser dev tools or server logs to confirm the request reached the API.\n\n## Step 8: ElizaOS path alternative (if user said yes in Step 1)\n\n```bash\nelizaos plugins add @operon/plugin-publisher-sdk\n```\n\nConfigure context fields via plugin settings:\n\n- `OPERON_CATEGORY` (e.g., `defi`, `fintech`, `travel`; see the defaults table in Step 6)\n- `OPERON_ASSET` (topic class)\n- `OPERON_INTENT` (action class)\n- `OPERON_SOURCE` (set to `skill3-clawhub` for the ClawHub variant)\n\nPlugin runs as Provider on every message. No manual `getPlacement` wiring needed. Circuit breaker handles API failures gracefully (5 consecutive failures trips the breaker; retries after 30 seconds).\n\nRun the agent:\n\n```bash\nelizaos start\n```\n\nTrigger a query that matches the configured category. Check logs for the placement decision.\n\n## Step 9: Graduate to production\n\nSandbox lane has lower quotas and limited demand pool access. Graduate to production for higher quotas and access to the full demand pool (affiliate partners + x402 self-serve advertisers).\n\n```bash\nnpx @operon/sdk register\n```\n\nThe CLI captures framework + contact email and graduates the UUID to a higher-quota production lane. Source attribution carries through.\n\n## Step 10: Next steps\n\n```\nYour agent is now running the Operon publisher SDK.\n\nNext:\n1. Tune category/asset/intent values as you learn what matches your agent's queries.\n2. Watch your placement log fill (visit [operon.so/developers](https://operon.so/developers?utm_source=skill3-clawhub&utm_medium=skill&utm_campaign=skills-distribution) for the dashboard).\n3. Graduated to production? You're now drawing from real demand:\n   - Affiliate partners: ChangeNOW, SimpleSwap, Jupiter (crypto-vertical today)\n   - x402 self-serve advertisers: any vertical, paid in USDC on Base mainnet\n   - Demand pool expanding as additional advertisers wire in\n4. Track revenue via the dashboard once your first impressions clear.\n\nQuestions? hi@operon.so\n```\n\n## Notes for the executing agent\n\n- Walk the user through the integration one step at a time. Don't dump all 10 steps at once.\n- Read the user's agent code before suggesting category/asset/intent values. Defaults work, but agent-specific values fill better.\n- If the user's stack is unusual (not Node), suggest the equivalent HTTP call pattern. The SDK is a thin client; the underlying API is callable from any language. Point them to the npm package source for reference.\n- The `source` field is `skill3-clawhub` in the ClawHub variant. Other marketplace variants of this skill use different source values for attribution. Don't change the `source` field unless the user explicitly requests a different attribution string.\n- If `getPlacement` returns `blocked` for every test query in a non-crypto vertical, that's expected today. Demand-side coverage is expanding.\n- If asked about Operon's auction mechanics, redirect to operon.so. Internal mechanics are not part of the SDK's public surface.\n\n## What this skill does NOT do\n\n- Doesn't auto-deploy code. The user reviews and applies each change.\n- Doesn't bypass framework conventions. If the user's stack has specific patterns for middleware or hooks, suggest using those instead of inline placement calls.\n- Doesn't handle billing, advertiser onboarding, or x402 demand-side flows. Advertisers use the x402 endpoint at operon.so/x402.\n- Doesn't replace the docs. Use this skill for the guided walkthrough; refer to operon.so/developers for the full reference.\n\n## How this differs from reading the docs\n\n1. **Interactive**: The skill guides configuration decisions (category, asset, intent values) instead of leaving the user to figure it out from a settings reference.\n2. **Contextual**: The skill runs inside the user's own agent, which can read their actual code and recommend specific values that fit the existing setup.\n3. **Verified**: The skill includes a test step that confirms the integration worked. Docs end at \"you're configured.\" This skill ends at \"here's proof a placement fired.\"\n\n## Security notes\n\n- `@operon/sdk` and `@operon/plugin-publisher-sdk` are both verifiable on npm before install.\n- HTTPS enforced by default (per v0.1.x release notes).\n- Half-open circuit breaker prevents cascading failures if the placement API is unreachable.\n- No secrets in this SKILL.md.\n- Sandbox UUID is opaque and safe to commit if the user accidentally hardcodes it.\n- Settings (category/asset/intent) are configuration, not credentials.\n\n## Cross-references\n\n- `estimate-agent-revenue`: revenue projection by vertical and query volume.\n- `score-agent-response-quality`: rate the quality of an existing agent response across 6 dimensions.\n- [operon.so/developers](https://operon.so/developers?utm_source=skill3-clawhub&utm_medium=skill&utm_campaign=skills-distribution): publisher dashboard, registration, full SDK reference.\n- [@operon/sdk on npm](https://www.npmjs.com/package/@operon/sdk): the generic SDK.\n- [@operon/plugin-publisher-sdk on npm](https://www.npmjs.com/package/@operon/plugin-publisher-sdk): the ElizaOS plugin.\n","tags":{"agent":"1.0.0","integration":"1.0.0","latest":"1.0.0","monetization":"1.0.0","sdk":"1.0.0","sponsored":"1.0.0"},"stats":{"comments":0,"downloads":320,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1778090524098,"updatedAt":1778492864292},"latestVersion":{"version":"1.0.0","createdAt":1778090524098,"changelog":"- Initial release of monetize-agent-responses skill.\n- Provides a step-by-step guide for integrating Operon's publisher SDK to add sponsored recommendations to AI agent responses.\n- Supports both generic Node 18+ agents and ElizaOS via two integration paths.\n- Covers SDK installation, placement integration, category/intention configuration, and testing recommendations.\n- Includes clear instructions for moving from sandbox to production and monitoring revenue.\n- Aimed at developers ready to monetize with Operon as a publisher.","license":"MIT-0"},"metadata":{"setup":[],"os":null,"systems":null},"owner":{"handle":"operon","userId":"s17cfjehavemq9hdpntrkaxhjs86686r","displayName":"Operon","image":"https://operon.so/assets/logo-wordmark.svg"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780090754343}}