{"id":"bde6c147-c715-40b4-bf3d-dc6258162e6d","entityType":"agent","slug":"clawhub-dujch-adcp-advertising-1-0-1","name":"Adcp Advertising 1.0.1","canonicalUrl":"https://www.xpersona.co/agent/clawhub-dujch-adcp-advertising-1-0-1","canonicalPath":"/agent/clawhub-dujch-adcp-advertising-1-0-1","generatedAt":"2026-10-11T14:16:59.723Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T09:45:49.017Z","emptyReason":null},"description":"Automate advertising campaigns with AI. Create ads, buy media, manage ad budgets, discover ad inventory, run display ads, video ads, CTV campaigns, and optim...","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s17fvfh4qke6y4zxvs507kh8ns83js7x:adcp-advertising-1-0-1","sourceUrl":"https://clawhub.ai/dujch/adcp-advertising-1-0-1","homepage":"https://clawhub.ai/dujch/skills/adcp-advertising-1-0-1","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/dujch/adcp-advertising-1-0-1","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/dujch/skills/adcp-advertising-1-0-1","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":61,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Adcp Advertising 1.0.1 technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T09:45:49.017Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T09:45:49.017Z","emptyReason":null},"stars":null,"forks":null,"downloads":1096,"packageName":null,"latestVersion":"1.0.0","tractionLabel":"1.1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T09:45:48.953Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T09:45:49.017Z","lastCrawledAt":"2026-10-11T09:45:48.953Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T09:45:48.953Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.0","createdAt":"2026-03-20T14:35:50.544Z","changelog":"Initial release of AdCP Advertising skill. - Automate ad campaigns with AI using natural language commands. - Launch and manage display, video, CTV, and multi-channel campaigns across multiple platforms. - Discover ad inventory, target audiences, and automatically optimize ad spend. - Upload creatives and track performance metrics like ROI and CTR in real time. - Suitable for marketing teams, agencies, media buyers, e-commerce brands, and startups.","fileCount":10,"zipByteSize":46703}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17fvfh4qke6y4zxvs507kh8ns83js7x:adcp-advertising-1-0-1","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17fvfh4qke6y4zxvs507kh8ns83js7x:adcp-advertising-1-0-1` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/dujch/adcp-advertising-1-0-1 before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dujch-adcp-advertising-1-0-1/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dujch-adcp-advertising-1-0-1/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dujch-adcp-advertising-1-0-1/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dujch-adcp-advertising-1-0-1/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dujch-adcp-advertising-1-0-1/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dujch-adcp-advertising-1-0-1/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T14:16:59.721Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dujch-adcp-advertising-1-0-1/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dujch-adcp-advertising-1-0-1/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dujch-adcp-advertising-1-0-1/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dujch-adcp-advertising-1-0-1/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T09:45:49.017Z","emptyReason":null},"readme":"Skill: Adcp Advertising 1.0.1\n\nOwner: dujch\n\nSummary: Automate advertising campaigns with AI. Create ads, buy media, manage ad budgets, discover ad inventory, run display ads, video ads, CTV campaigns, and optim...\n\nTags: latest:1.0.0\n\nVersion history:\n\nv1.0.0 | 2026-03-20T14:35:50.544Z | auto\n\nInitial release of AdCP Advertising skill.\n\n- Automate ad campaigns with AI using natural language commands.\n- Launch and manage display, video, CTV, and multi-channel campaigns across multiple platforms.\n- Discover ad inventory, target audiences, and automatically optimize ad spend.\n- Upload creatives and track performance metrics like ROI and CTR in real time.\n- Suitable for marketing teams, agencies, media buyers, e-commerce brands, and startups.\n\nArchive index:\n\nArchive v1.0.0: 10 files, 46703 bytes\n\nFiles: _meta.json (141b), CREATIVE.md (17570b), EXAMPLES.md (31051b), PROTOCOLS.md (9981b), QUICKREF.md (7165b), README.md (13560b), REFERENCE.md (34314b), skill-card.md (3059b), SKILL.md (16317b), TARGETING.md (13947b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: adcp-advertising\ndisplayName: AdCP Advertising\ndescription: Automate advertising campaigns with AI. Create ads, buy media, manage ad budgets, discover ad inventory, run display ads, video ads, CTV campaigns, and optimize ad performance. Perfect for marketing automation, programmatic advertising, media buying, ad management, campaign optimization, creative management, and performance tracking. Launch Facebook ads, Google ads, display advertising, video marketing, and multi-channel campaigns using natural language. Supports ad targeting, audience segmentation, ROI tracking, and automated bidding.\nauthor: AdCP Community\nlicense: MIT\nhomepage: https://docs.adcontextprotocol.org\nrepository: https://github.com/edyyy62/openclaw-adcp\ncategory: advertising\nsubcategory: marketing-automation\ntype: agent\nkeywords:\n  - advertising\n  - ads\n  - marketing\n  - campaigns\n  - adcp\n  - programmatic\n  - media-buying\n  - display-ads\n  - video-ads\n  - facebook-ads\n  - google-ads\n  - ctv\n  - connected-tv\n  - marketing-automation\n  - ad-management\n  - campaign-optimization\n  - targeting\n  - roi-tracking\n  - performance-marketing\n  - retargeting\n---\n\n# Ad Context Protocol (AdCP) Advertising Skill\n\n## Overview\n\n**Automate your advertising campaigns with AI.** This skill enables OpenClaw agents to discover ad inventory, launch campaigns, manage creatives, and optimize performance across display, video, CTV, audio, and more - all through natural language commands.\n\nNo dashboards. No forms. No ad platform expertise required.\n\n### What You Can Do\n\n- 🎯 **Launch campaigns in minutes** - \"Create a $10k display campaign targeting tech professionals in California\"\n- 🔍 **Discover ad inventory instantly** - \"Find premium video placements for luxury brands\"\n- 🎨 **Upload ads with ease** - \"Upload these banner images as creatives\"\n- 📊 **Track ROI in real-time** - \"Show me campaign performance and CTR by creative\"\n- 🎛️ **Auto-optimize spend** - \"Reallocate budget to top-performing packages\"\n- 🌐 **Target precisely** - Demographics, behaviors, interests, locations, devices, times\n\n### Perfect For\n\n**Marketing teams** running Facebook ads, Google ads, and multi-channel campaigns  \n**Media buyers** managing programmatic ad spend across publishers  \n**Agencies** automating client campaign management and reporting  \n**E-commerce brands** launching product ads and retargeting campaigns  \n**Startups** running lean marketing with AI-powered automation\n\n### Why Choose This Skill?\n\n**Skip the learning curve** - No need to master complex ad platforms  \n**Save time** - Launch in 5 minutes vs. hours of manual setup  \n**Spend smarter** - AI automatically optimizes budgets to top performers  \n**Scale faster** - Manage unlimited campaigns through simple commands  \n**Test risk-free** - Public test agent included, no setup required\n\n**Official AdCP Repository**: https://github.com/adcontextprotocol/adcp  \n**Official AdCP Documentation**: https://docs.adcontextprotocol.org  \n**Complete Documentation Index**: https://docs.adcontextprotocol.org/llms.txt\n\n## When to Use This Skill\n\nTrigger this skill when users ask about:\n\n**Campaign Management**\n- \"Create a display ad campaign\"\n- \"Launch Facebook ads for my product\"\n- \"Set up a $5000 video advertising campaign\"\n- \"Pause my underperforming campaigns\"\n\n**Ad Discovery & Media Buying**\n- \"Find advertising inventory for luxury brands\"\n- \"Show me CTV ad placements in major cities\"\n- \"What display ad options are available?\"\n- \"Buy media for a tech startup\"\n\n**Creative Management**\n- \"Upload these banner images\"\n- \"Which creative is performing best?\"\n- \"Add video ads to my campaign\"\n- \"Manage my ad library\"\n\n**Performance & Optimization**\n- \"How is my campaign performing?\"\n- \"Show me ROI by channel\"\n- \"Optimize my ad spend\"\n- \"Reallocate budget to top performers\"\n- \"Track impressions and click-through rates\"\n\n**Targeting & Audiences**\n- \"Target professionals in California\"\n- \"Set up demographic targeting\"\n- \"Create a retargeting campaign\"\n- \"Target by device type and time of day\"\n\n## Quick Start\n\n### Launch Your First Campaign (5 Minutes)\n\n**No setup required.** Use the included test agent to try everything:\n\n**Step 1: Discover what's available**\n```\n\"Show me advertising capabilities\"\n```\nBrowse available channels, publishers, and formats.\n\n**Step 2: Find ad inventory**\n```\n\"Find display ads for a tech startup, budget $5000\"\n```\nAI searches and shows matching products with pricing.\n\n**Step 3: Launch campaign**\n```\n\"Create campaign with Product prod_123, $5000 budget, targeting California tech professionals\"\n```\nCampaign goes live instantly.\n\n**Step 4: Upload your ads**\n```\n\"Upload these banner images as creatives\"\n```\nDrop files, get instant creative IDs.\n\n**Step 5: Monitor performance**\n```\n\"Show campaign metrics and ROI\"\n```\nReal-time impressions, clicks, CTR, spend.\n\n### Real-World Usage Examples\n\n**Quick campaign launch:**\n```\nUser: \"I need to run display ads for my SaaS product\"\nAgent: [Discovers products] \"Found 5 display packages. Want details?\"\nUser: \"Create campaign with Product 1, $10k budget, target CTOs\"\nAgent: [Creates campaign] \"Campaign live! ID: mb_abc123\"\n```\n\n**Performance optimization:**\n```\nUser: \"How are my video ads performing?\"\nAgent: [Shows metrics] \"Package A: 2.3% CTR, Package B: 0.8% CTR\"\nUser: \"Move $5k from B to A\"\nAgent: [Reallocates] \"Budget updated. Package A now $15k\"\n```\n\n**Multi-channel campaign:**\n```\nUser: \"Launch omnichannel campaign: display in CA, video in NYC, $50k total\"\nAgent: [Creates packages] \"3 packages created across display and video\"\n```\n\n## How It Works\n\n### Natural Language Understanding\n\nSpeak naturally. The skill understands:\n- **Budgets**: \"$5000\", \"five thousand dollars\", \"5k budget\"\n- **Locations**: \"California\", \"major US cities\", \"New York and LA\"\n- **Audiences**: \"tech professionals\", \"age 25-45\", \"high income\"\n- **Goals**: \"brand awareness\", \"drive conversions\", \"increase sales\"\n\n### Progressive Workflow\n\n**1. Discovery Phase**\n```\n\"Find video advertising for luxury brands\"\n```\n↓ Agent searches inventory\n↓ Shows matched products with pricing\n↓ Explains targeting and formats\n\n**2. Campaign Creation**\n```\n\"Create campaign with Product 1, $25k, target professionals\"\n```\n↓ Agent creates media buy\n↓ Sets up targeting overlay\n↓ Returns campaign ID and status\n\n**3. Creative Management**\n```\n\"Upload my banner ads\"\n```\n↓ Agent syncs creatives\n↓ Assigns to campaign\n↓ Returns creative IDs\n\n**4. Monitoring & Optimization**\n```\n\"Show performance\"\n```\n↓ Agent fetches delivery data  \n↓ Shows metrics by package/creative  \n↓ Suggests optimizations\n\n## Core Operations\n\n### Create Campaign\n\n```javascript\nconst campaign = await testAgent.createMediaBuy({\n  buyer_ref: 'campaign-2026-q1',\n  brand_manifest: { url: 'https://acme.com' },\n  packages: [{ product_id: 'premium_display', budget: 10000 }]\n});\n```\n\n### Upload Creatives\n\n```javascript\nawait testAgent.syncCreatives({\n  creatives: [{ \n    buyer_ref: 'banner-300x250',\n    url: 'https://cdn.acme.com/banner.jpg'\n  }]\n});\n```\n\n### Monitor Performance\n\n```javascript\nconst delivery = await testAgent.getMediaBuyDelivery({\n  media_buy_id: 'mb_abc123'\n});\nconsole.log(`CTR: ${delivery.totals.ctr}%, Spend: $${delivery.totals.spend}`);\n```\n\nSee [REFERENCE.md](REFERENCE.md) for complete API docs and [EXAMPLES.md](EXAMPLES.md) for detailed workflows.\n\n## Core Concepts\n\n### The 8 Media Buy Tasks\n\nAdCP provides 8 standardized tasks for the complete advertising lifecycle. Learn more in the [Media Buy Protocol documentation](https://docs.adcontextprotocol.org/docs/media-buy/).\n\n1. **get_adcp_capabilities** - Discover agent features and portfolio (~1s)\n2. **get_products** - Find inventory using natural language (~60s)\n3. **list_creative_formats** - View creative specifications (~1s)\n4. **create_media_buy** - Launch campaigns (minutes-days, may require approval)\n5. **update_media_buy** - Modify campaigns (minutes-days)\n6. **sync_creatives** - Upload creative assets (minutes-days)\n7. **list_creatives** - Query creative library (~1s)\n8. **get_media_buy_delivery** - Track performance (~60s)\n\n**Complete task reference**: https://docs.adcontextprotocol.org/docs/media-buy/task-reference/\n\n### Brand Manifest\n\nBrand context can be provided two ways:\n\n**URL reference** (recommended - agent fetches brand info):\n```json\n{\n  \"brand_manifest\": {\n    \"url\": \"https://brand.com\"\n  }\n}\n```\n\n**Inline manifest** (full brand details):\n```json\n{\n  \"brand_manifest\": {\n    \"name\": \"Brand Name\",\n    \"url\": \"https://brand.com\",\n    \"tagline\": \"Brand tagline\",\n    \"colors\": { \"primary\": \"#FF0000\" },\n    \"logo\": { \"url\": \"https://cdn.brand.com/logo.png\" }\n  }\n}\n```\n\n### Pricing Models\n\nProducts support various pricing models:\n- **CPM** (Cost Per Mille/Thousand) - Fixed price per 1000 impressions\n- **CPM-Auction** - Bid-based pricing for impressions\n- **CPCV** (Cost Per Completed View) - Video completions\n- **Flat-Fee** - Fixed campaign cost\n- **CPP** (Cost Per Point) - Percentage of audience reached\n\nFor auction pricing, include `bid_price` in your package.\n\n### Asynchronous Operations\n\nAdCP is **not a real-time protocol**. Operations may take:\n- **~1 second** - Simple lookups (formats, creative lists)\n- **~60 seconds** - AI/inference operations (product discovery)\n- **Minutes to days** - Operations requiring human approval (campaign creation)\n\nAlways check the `status` field in responses:\n- `completed` - Operation finished successfully\n- `pending` - Awaiting approval or processing\n- `failed` - Operation failed (check error details)\n\n### Targeting Capabilities\n\nApply targeting overlays to campaigns:\n```javascript\n{\n  targeting_overlay: {\n    geo: {\n      included: ['US-CA', 'US-NY'],  // DMA codes or regions\n      excluded: ['US-TX']\n    },\n    demographics: {\n      age_ranges: [{ min: 25, max: 44 }],\n      genders: ['M', 'F']\n    },\n    behavioral: {\n      interests: ['technology', 'gaming'],\n      purchase_intent: ['consumer_electronics']\n    },\n    contextual: {\n      keywords: ['innovation', 'design'],\n      categories: ['IAB19'] // Technology & Computing\n    }\n  }\n}\n```\n\n## Common Workflows\n\n### Workflow 1: Campaign Discovery to Launch\n\n```javascript\n// 1. Discover capabilities\nconst caps = await agent.getAdcpCapabilities({});\n\n// 2. Find products\nconst products = await agent.getProducts({\n  brief: 'Q1 2026 brand awareness campaign for tech startup',\n  brand_manifest: { url: 'https://startup.com' },\n  filters: { channels: ['display', 'video'] }\n});\n\n// 3. Check creative formats\nconst formats = await agent.listCreativeFormats({\n  format_types: ['display', 'video']\n});\n\n// 4. Create campaign\nconst campaign = await agent.createMediaBuy({\n  buyer_ref: 'q1-2026-awareness',\n  brand_manifest: { url: 'https://startup.com' },\n  packages: [\n    {\n      buyer_ref: 'pkg-001',\n      product_id: products.products[0].product_id,\n      pricing_option_id: 'cpm-standard',\n      budget: 15000\n    }\n  ],\n  start_time: { type: 'asap' },\n  end_time: '2026-03-31T23:59:59Z'\n});\n\n// 5. Upload creatives\nawait agent.syncCreatives({\n  creatives: [...], // Your creative assets\n  assignments: {\n    'creative_001': ['pkg-001']\n  }\n});\n\n// 6. Monitor performance\nconst delivery = await agent.getMediaBuyDelivery({\n  media_buy_id: campaign.media_buy_id\n});\n```\n\n### Workflow 2: Update Running Campaign\n\n```javascript\n// Pause, adjust budget, and resume campaign\nawait agent.updateMediaBuy({\n  media_buy_id: 'mb_abc123',\n  updates: {\n    status: 'paused',\n    budget_change: 5000, // Add $5000\n    end_time: '2026-04-30T23:59:59Z'\n  }\n});\n\n// Resume after adjustments\nawait agent.updateMediaBuy({\n  media_buy_id: 'mb_abc123',\n  updates: { status: 'active' }\n});\n```\n\n**More workflow examples**: See [EXAMPLES.md](EXAMPLES.md) for complete campaign scenarios including creative management, multi-channel campaigns, and optimization workflows.\n\n## Test Agent\n\nFor development and testing, use the public test agent:\n\n**Agent URL**: `https://test-agent.adcontextprotocol.org/mcp`  \n**Auth Token**: `1v8tAhASaUYYp4odoQ1PnMpdqNaMiTrCRqYo9OJp6IQ`\n\n```javascript\nimport { testAgent } from '@adcp/client/testing';\n\n// No authentication needed for test agent\nconst result = await testAgent.getProducts({\n  brief: 'Test campaign',\n  brand_manifest: { url: 'https://example.com' }\n});\n```\n\nInteractive testing available at: **[testing.adcontextprotocol.org](https://testing.adcontextprotocol.org)**\n\n## Error Handling\n\nCommon error patterns:\n\n**400 Bad Request** - Invalid parameters:\n```json\n{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"budget must be greater than 0\",\n    \"field\": \"packages[0].budget\"\n  }\n}\n```\n\n**401 Unauthorized** - Missing or invalid auth:\n```json\n{\n  \"error\": {\n    \"code\": \"UNAUTHORIZED\",\n    \"message\": \"Invalid authentication token\"\n  }\n}\n```\n\n**404 Not Found** - Invalid ID reference:\n```json\n{\n  \"error\": {\n    \"code\": \"NOT_FOUND\",\n    \"message\": \"Product not found\",\n    \"resource\": \"product_id: premium_video_30s\"\n  }\n}\n```\n\nAlways check for errors before processing responses:\n```javascript\nif (result.error) {\n  console.error(`Error: ${result.error.message}`);\n  return;\n}\n```\n\n## Best Practices\n\n### 1. Always Start with Capabilities\n\nCall `get_adcp_capabilities` first to understand what the agent supports before making other requests.\n\n### 2. Use Clear Buyer References\n\nUse descriptive `buyer_ref` values for tracking:\n- Good: `'campaign-2026-q1-tech-launch'`\n- Avoid: `'c1'`, `'test'`, `'abc'`\n\n### 3. Handle Async Operations\n\nCheck `status` field and implement polling for pending operations:\n```javascript\nlet status = 'pending';\nwhile (status === 'pending') {\n  await sleep(5000); // Wait 5 seconds\n  const update = await agent.getMediaBuyDelivery({\n    media_buy_id: campaign.media_buy_id\n  });\n  status = update.status;\n}\n```\n\n### 4. Write Detailed Briefs\n\nBetter briefs lead to better product matches:\n- Good: `'Premium video inventory for luxury automotive brand targeting high-income professionals aged 35-54 in major metros. Focus on brand awareness with completion rates above 70%.'`\n- Avoid: `'video ads'`, `'need advertising'`\n\n### 5. Validate Creative Formats\n\nAlways check `list_creative_formats` to ensure your creatives meet requirements before uploading.\n\n### 6. Monitor Budget Pacing\n\nRegularly check delivery metrics to ensure campaigns are pacing properly:\n```javascript\nconst delivery = await agent.getMediaBuyDelivery({\n  media_buy_id: campaign.media_buy_id\n});\n\nconst pacing = delivery.delivery.spend / delivery.delivery.budget;\nconsole.log(`Budget pacing: ${(pacing * 100).toFixed(1)}%`);\n```\n\n## Additional Resources\n\n### Official AdCP Documentation\n- **Main Documentation**: https://docs.adcontextprotocol.org\n- **Complete Index**: https://docs.adcontextprotocol.org/llms.txt\n- **Media Buy Protocol**: https://docs.adcontextprotocol.org/docs/media-buy/\n- **Quick Reference**: https://docs.adcontextprotocol.org/docs/media-buy/quick-reference\n- **Task Reference**: https://docs.adcontextprotocol.org/docs/media-buy/task-reference/\n- **Quickstart Guide**: https://docs.adcontextprotocol.org/docs/quickstart\n\n### This Skill's Documentation\n- [REFERENCE.md](REFERENCE.md) - Complete API reference and schemas\n- [EXAMPLES.md](EXAMPLES.md) - Real-world campaign examples\n- [PROTOCOLS.md](PROTOCOLS.md) - MCP vs A2A protocol details\n- [TARGETING.md](TARGETING.md) - Advanced targeting strategies\n- [CREATIVE.md](CREATIVE.md) - Creative asset management guide\n\n## Key Reminders\n\n1. **AdCP is asynchronous** - Operations may take minutes to days\n2. **Human approval may be required** - Check for `pending` status\n3. **Start with capabilities** - Always call `get_adcp_capabilities` first\n4. **Brand context matters** - Provide detailed brand manifests for better results\n5. **Targeting is additive** - Product targeting + your overlay = final targeting\n6. **Creative formats are strict** - Always validate against format specifications\n7. **Monitor performance** - Regular delivery checks ensure campaign success\n\n## Support\n\nFor help with AdCP:\n- Official Repository: https://github.com/adcontextprotocol/adcp\n- Documentation: https://docs.adcontextprotocol.org\n- Interactive Testing: https://testing.adcontextprotocol.org\n- Complete API Docs: https://docs.adcontextprotocol.org/llms.txt\n\nFile v1.0.0:README.md\n\n# Ad Context Protocol (AdCP) Advertising Skill for OpenClaw\n\n**Launch and optimize advertising campaigns using AI.** Automate media buying, ad creation, campaign management, and performance tracking across display, video, CTV, audio, and more.\n\n**Official AdCP Repository**: [github.com/adcontextprotocol/adcp](https://github.com/adcontextprotocol/adcp)  \n**Official AdCP Documentation**: https://docs.adcontextprotocol.org  \n**Complete Documentation Index**: https://docs.adcontextprotocol.org/llms.txt\n\n## Overview\n\nTransform how you run advertising campaigns. This skill provides OpenClaw agents with AI-powered advertising automation:\n\n- 🔍 **Discover ad inventory** - Find display ads, video placements, CTV spots using natural language\n- 🎯 **Launch campaigns instantly** - Create multi-channel campaigns across display, video, CTV, audio, native, DOOH\n- 🎨 **Manage ad creatives** - Upload banners, videos, HTML5 ads and track performance by creative\n- 📊 **Monitor ROI in real-time** - Get impressions, clicks, conversions, CPM, CTR, and spend data instantly\n- 🎛️ **Auto-optimize performance** - Reallocate budgets, pause underperformers, scale winners automatically\n- 🌐 **Target precisely** - Demographics, behaviors, interests, locations, devices, times, and contexts\n\n### Perfect For\n\n**Marketing teams** running Facebook ads, Google ads, programmatic campaigns  \n**Media buyers** managing multi-channel ad spend and inventory  \n**Agencies** automating client campaign management and reporting  \n**E-commerce** launching product ads and retargeting campaigns  \n**Startups** running lean marketing with AI-powered ad automation\n\n## Quick Start\n\n### Installation\n\nFor ClawHub users:\n```bash\n# Install via ClawHub\nopenclaw skills install adcp-advertising\n```\n\nFor local development:\n```bash\n# Clone or download this skill to your workspace\ncd ~/.openclaw/workspace/skills/\ngit clone <this-repo> adcp-advertising\n```\n\n### Launch Your First Ad Campaign in 5 Minutes\n\nGo from zero to live campaign using just natural language. No forms, no dashboards, no ad platform expertise needed.\n\n**Step 1: Discover what's available** (No login required)\n```\n\"Show me advertising options for my business\"\n```\nBrowse inventory across publishers without authentication.\n\n**Step 2: Find your perfect ad placement**\n```\n\"Find display ads for a tech startup, $5000 budget\"\n```\nAI searches inventory and shows matching products with pricing.\n\n**Step 3: Launch your campaign**\n```\n\"Create campaign with Product ID prod_abc123, $5000 budget, \ntargeting tech professionals in California\"\n```\nCampaign goes live instantly using the test environment.\n\n**Step 4: Upload your ads**\n```\n\"Upload this banner as a creative\"\n```\nDrop your image, video, or HTML5 ad. Done.\n\n**Step 5: Track performance**\n```\n\"Show campaign performance\"\n```\nGet impressions, clicks, CTR, spend, and pacing in real-time.\n\n**That's it!** Your first campaign is live in the test environment. When ready, switch to production for real ad delivery.\n\n### Moving to Production\n\nReady for real ad delivery? Switch seamlessly:\n1. Find sales agents: `get_adcp_capabilities` on production endpoints\n2. Get credentials from their sales team\n3. Update agent URL to production\n4. Launch campaigns with real budgets\n\n## Why Choose This Skill?\n\n### Say Goodbye to Ad Platform Complexity\n- **No more dashboards** - Manage everything through conversation\n- **No forms to fill** - Just describe what you want in plain English  \n- **No platform learning curve** - AI handles the technical details\n- **No manual optimization** - Automated performance management\n\n### Built for Results\n- **Launch faster** - 5 minutes from idea to live campaign vs. hours in traditional platforms\n- **Spend smarter** - AI-powered optimization reallocates budgets to top performers\n- **Scale easier** - Manage unlimited campaigns through simple commands\n- **Track better** - Real-time metrics without dashboard switching\n\n### Trusted Technology\n- **Open standard** - Built on Ad Context Protocol used by real advertising platforms\n- **Production-ready** - Complete error handling, validation, and best practices\n- **Well-documented** - 5,600+ lines of guides, examples, and references\n- **Test environment included** - Try everything risk-free before going live\n\n## Features\n\n### 🔍 Product Discovery\n- Natural language search for advertising inventory\n- Filter by channel, budget, format, and date range\n- Detailed product information including pricing and targeting options\n\n### 🎯 Campaign Management\n- Create campaigns across multiple channels\n- Update budgets, targeting, and creative assignments\n- Pause/resume campaigns\n- Schedule campaigns for future launch\n\n### 🎨 Creative Management\n- Support for all standard IAB formats (display, video, native)\n- Bulk creative upload\n- Creative library management\n- Performance tracking by creative\n\n### 📊 Performance Monitoring\n- Real-time campaign metrics\n- Detailed breakdowns by package, creative, and geography\n- Budget pacing alerts\n- Daily/hourly granularity\n\n### 🎛️ Optimization\n- Automatic budget reallocation based on performance\n- A/B testing for creatives\n- Targeting optimization recommendations\n- Pacing adjustments\n\n## Supported Channels\n\n- **Display**: Banner ads, rich media, HTML5\n- **Video**: Pre-roll, mid-roll, outstream\n- **CTV**: Connected TV advertising\n- **Audio**: Streaming audio, podcast ads\n- **Native**: In-feed, content-style ads\n- **DOOH**: Digital out-of-home advertising\n\n## Documentation\n\nComprehensive documentation is included with this skill:\n\n- **[SKILL.md](SKILL.md)** - Main skill guide with quick start and core concepts\n- **[REFERENCE.md](REFERENCE.md)** - Complete API reference for all 8 AdCP tasks\n- **[EXAMPLES.md](EXAMPLES.md)** - Real-world campaign examples and use cases\n- **[PROTOCOLS.md](PROTOCOLS.md)** - MCP vs A2A protocol details\n- **[TARGETING.md](TARGETING.md)** - Advanced targeting strategies\n- **[CREATIVE.md](CREATIVE.md)** - Creative asset management guide\n\n## Example Workflows\n\n### Launch a Simple Campaign\n\n```\nAgent: \"I need to run a display campaign for my startup\"\n\nSystem discovers products, shows options\n\nAgent: \"Create a campaign with Product 1, $10,000 budget, \n       targeting tech professionals in California\"\n\nSystem creates campaign\n\nAgent: \"Upload my 300x250 banner to this campaign\"\n\nSystem uploads creative and assigns to campaign\n```\n\n### Monitor and Optimize\n\n```\nAgent: \"Show me how my video campaign is performing\"\n\nSystem shows metrics: impressions, CTR, spend, pacing\n\nAgent: \"Which creative is performing best?\"\n\nSystem analyzes and shows creative performance rankings\n\nAgent: \"Shift $5,000 from package B to package A \n       since it's performing better\"\n\nSystem updates budget allocation\n```\n\n## Authentication\n\nAdCP uses a tiered authentication model - some operations are public, others require credentials.\n\n### Public Operations (No Auth Required)\n\nThese work without any credentials:\n\n- **`get_adcp_capabilities`** - Discover agent capabilities and portfolio\n- **`list_creative_formats`** - Browse available ad formats  \n- **`get_products`** (limited) - Basic inventory discovery (partial catalog, no pricing)\n\n**Why?** Publishers want potential buyers to explore capabilities before establishing relationships.\n\n### Authenticated Operations (Credentials Required)\n\nEverything else needs authentication:\n\n- **`get_products`** (full) - Complete catalog with pricing and custom products\n- **`create_media_buy`** - Create advertising campaigns\n- **`update_media_buy`** - Modify existing campaigns\n- **`sync_creatives`** - Upload creative assets\n- **`list_creatives`** - View your creative library\n- **`get_media_buy_delivery`** - Monitor campaign performance\n- **`provide_performance_feedback`** - Submit optimization signals\n\n### Authentication Method\n\nAdCP uses **Bearer token authentication**:\n\n```\nAuthorization: Bearer <your-token>\n```\n\nTokens can be:\n- **Opaque tokens**: Server-validated strings\n- **JWT tokens**: Self-contained with embedded claims\n\n### Test Agent (Public Credentials)\n\nA public test agent is available with shared credentials for development:\n\n- **Agent URL**: `https://test-agent.adcontextprotocol.org/mcp`\n- **Auth Token**: `1v8tAhASaUYYp4odoQ1PnMpdqNaMiTrCRqYo9OJp6IQ`\n- **Interactive Testing**: [testing.adcontextprotocol.org](https://testing.adcontextprotocol.org)\n\nThis token is **intentionally public** - anyone can use it for testing. It's included in package.json and official AdCP documentation.\n\n### Production Credentials\n\nFor real campaigns, you need credentials from each sales agent:\n\n1. **Discover agents**: Use `get_adcp_capabilities` on production endpoints\n2. **Contact sales**: Reach out to the agent's sales/partnerships team\n3. **Complete onboarding**: Provide business info, sign agreements, configure billing\n4. **Receive credentials**: Get your API Bearer token or OAuth credentials\n5. **Store securely**: Use environment variables or secret managers (never commit to git)\n\n**Important**: Each sales agent manages credentials independently. You need separate auth for each one you work with.\n\n### Example Configuration\n\n**Test environment:**\n```json\n{\n  \"agent_url\": \"https://test-agent.adcontextprotocol.org/mcp\",\n  \"auth\": {\n    \"type\": \"bearer\",\n    \"token\": \"1v8tAhASaUYYp4odoQ1PnMpdqNaMiTrCRqYo9OJp6IQ\"\n  }\n}\n```\n\n**Production environment:**\n```json\n{\n  \"agent_url\": \"https://sales-agent.example.com/mcp\",\n  \"auth\": {\n    \"type\": \"bearer\",\n    \"token\": \"your-production-token-here\"\n  }\n}\n```\n\nFor more details, see the [official authentication guide](https://docs.adcontextprotocol.org/docs/building/integration/authentication).\n\n## Key Concepts\n\n### Asynchronous Operations\n\nAdCP is **not a real-time protocol**. Operations may take:\n- **~1 second**: Simple lookups (formats, creative lists)\n- **~60 seconds**: AI operations (product discovery)\n- **Minutes to days**: Operations requiring approval (campaign creation)\n\nAlways check the `status` field and handle `pending` states.\n\n### Targeting is Additive\n\nYour targeting overlay + Product targeting = Final targeting\n\nProducts already have targeting. Your overlay adds constraints.\n\n### Brand Context Matters\n\nProvide detailed brand manifests for better product matches:\n\n```javascript\n{\n  brand_manifest: {\n    name: 'Acme Corp',\n    url: 'https://acme.com',\n    tagline: 'Innovation that matters',\n    colors: { primary: '#FF4500' }\n  }\n}\n```\n\n## Who Should Use This Skill?\n\n### Marketing Teams\n- Launch campaigns faster without learning complex platforms\n- Monitor multiple campaigns through conversational queries\n- Get instant performance insights and optimization recommendations\n\n### Media Buyers\n- Discover inventory across multiple publishers at once\n- Compare products and pricing using natural language\n- Automate routine optimization tasks\n\n### Agencies\n- Manage client campaigns through AI agents\n- Scale operations without proportional staff increases\n- Standardize workflows across different platforms\n\n### Developers\n- Build advertising automation tools\n- Integrate ad buying into larger workflows\n- Access advertising APIs through natural language\n\n## Common Use Cases\n\n### Launch New Product Campaign\n```\nAgent: \"I need to launch a campaign for our new SaaS product targeting \n        CTOs and tech directors in major US cities, $50,000 budget\"\n\nSystem: Discovers suitable products, creates multi-package campaign, \n        sets up targeting, and uploads provided creatives\n```\n\n### Optimize Existing Campaign\n```\nAgent: \"Analyze my video campaign performance and recommend optimizations\"\n\nSystem: Reviews metrics, identifies top performers, suggests budget \n        reallocation, pauses underperforming elements\n```\n\n### Multi-Channel Strategy\n```\nAgent: \"Create an omnichannel campaign: display in California, \n        video in major cities, audio during commute hours\"\n\nSystem: Creates coordinated campaign across channels with unified \n        targeting and creative strategy\n```\n\n## Requirements\n\n- **OpenClaw**: Compatible with OpenClaw 2026.1.0+\n- **Node.js**: 18+ (for JavaScript examples)\n- **Python**: 3.9+ (for Python examples)\n\n## Support & Resources\n\n### Official AdCP Resources\n- **Official Repository**: https://github.com/adcontextprotocol/adcp\n- **Main Documentation**: https://docs.adcontextprotocol.org\n- **Complete Index (for AI agents)**: https://docs.adcontextprotocol.org/llms.txt\n- **Media Buy Protocol**: https://docs.adcontextprotocol.org/docs/media-buy/\n- **Task Reference**: https://docs.adcontextprotocol.org/docs/media-buy/task-reference/\n- **Quickstart Guide**: https://docs.adcontextprotocol.org/docs/quickstart\n- **Interactive Testing**: https://testing.adcontextprotocol.org\n\n### This Skill Repository\n- **Repository**: https://github.com/edyyy62/openclaw-adcp\n- **Issues**: https://github.com/edyyy62/openclaw-adcp/issues\n\n### OpenClaw Resources\n- **OpenClaw Docs**: https://docs.openclaw.ai\n- **ClawHub**: https://www.clawhub.ai/\n\n## License\n\nThis skill is provided under the MIT License. See [LICENSE](LICENSE) for details.\n\n## Contributing\n\nContributions are welcome! Please submit issues or pull requests on GitHub.\n\n## Version\n\n**Version**: 1.0.0  \n**Last Updated**: January 2026  \n**AdCP Version**: 3.x compatible\n\n## Author\n\nCreated for the OpenClaw community to enable AI-powered advertising automation.\n\n## Acknowledgments\n\n- Ad Context Protocol team for the comprehensive advertising API\n- OpenClaw community for the excellent AI assistant framework\n- ClawHub for skill distribution infrastructure\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7bt5g276gmskrngqwj35mbnh835e53\",\n  \"slug\": \"adcp-advertising-1-0-1\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1774017350544\n}\n\nFile v1.0.0:CREATIVE.md\n\n# Creative Asset Management Guide\n\nComplete guide to managing advertising creatives with AdCP.\n\n**Official AdCP Documentation**: https://docs.adcontextprotocol.org  \n**Creative Protocol**: https://docs.adcontextprotocol.org/docs/creative/  \n**Creative Formats**: https://docs.adcontextprotocol.org/docs/creative/formats\n\nThis guide covers creative asset management with AdCP. For the complete creative specification and format details, see the [official AdCP creative documentation](https://docs.adcontextprotocol.org/docs/creative/).\n\n## Overview\n\nAdCP provides a comprehensive creative management system:\n- **Format Discovery** - Understand creative requirements\n- **Asset Upload** - Sync creatives across platforms\n- **Library Management** - Query and organize assets\n- **Creative Assignment** - Link creatives to campaigns\n- **Performance Tracking** - Monitor creative effectiveness\n\n## Creative Lifecycle\n\n```\n1. Discover Formats\n   ↓\n2. Build/Prepare Assets\n   ↓\n3. Validate Requirements\n   ↓\n4. Upload to Agent\n   ↓\n5. Assign to Campaigns\n   ↓\n6. Monitor Performance\n   ↓\n7. Optimize/Replace\n```\n\n## Creative Formats\n\n### Standard IAB Formats\n\nAdCP supports standard IAB creative formats via the Standard Creative Agent at `https://creative.adcontextprotocol.org`.\n\n#### Display Formats\n\n| Format ID | Name | Dimensions | Use Case |\n|-----------|------|------------|----------|\n| `display_300x250` | Medium Rectangle | 300x250 | Most versatile display format |\n| `display_728x90` | Leaderboard | 728x90 | Top of page banner |\n| `display_160x600` | Wide Skyscraper | 160x600 | Sidebar placement |\n| `display_300x600` | Half Page | 300x600 | Premium sidebar |\n| `display_970x250` | Billboard | 970x250 | Above-the-fold large format |\n| `display_320x50` | Mobile Banner | 320x50 | Mobile web |\n| `display_300x50` | Mobile Banner Small | 300x50 | Mobile web |\n\n#### Video Formats\n\n| Format ID | Name | Duration | Use Case |\n|-----------|------|----------|----------|\n| `video_standard_15s` | Pre-roll 15s | 15 seconds | Short-form video |\n| `video_standard_30s` | Pre-roll 30s | 30 seconds | Standard video ad |\n| `video_standard_60s` | Mid-roll 60s | 60 seconds | Long-form content |\n| `video_outstream_15s` | Outstream 15s | 15 seconds | In-feed video |\n\n#### Native Formats\n\n| Format ID | Name | Use Case |\n|-----------|------|----------|\n| `native_standard` | Standard Native | Content-style ads |\n| `native_in_feed` | In-Feed Native | Social feed ads |\n\n### Discovering Formats\n\n```javascript\n// Get all available formats\nconst formats = await agent.listCreativeFormats({});\n\n// Filter by type\nconst videoFormats = await agent.listCreativeFormats({\n  format_types: ['video']\n});\n\n// Filter by channel\nconst ctvFormats = await agent.listCreativeFormats({\n  channels: ['ctv']\n});\n\n// Examine format details\nvideoFormats.formats.forEach(format => {\n  console.log(`${format.name}:`);\n  console.log(`  Format ID: ${format.format_id.id}`);\n  console.log(`  Dimensions: ${format.specifications.width}x${format.specifications.height}`);\n  console.log(`  Duration: ${format.specifications.duration_ms}ms`);\n  console.log(`  Max size: ${format.specifications.max_file_size_kb}KB`);\n  console.log(`  Codecs: ${format.specifications.video_codec?.join(', ')}`);\n});\n```\n\n## Building Creatives\n\n### Display Creative Structure\n\n```javascript\n{\n  creative_id: 'display_mrec_v1',\n  name: 'Display Banner - Medium Rectangle',\n  format_id: {\n    agent_url: 'https://creative.adcontextprotocol.org',\n    id: 'display_300x250'\n  },\n  assets: {\n    image: {\n      url: 'https://cdn.brand.com/banner_300x250.jpg',\n      width: 300,\n      height: 250,\n      mime_type: 'image/jpeg'\n    }\n  },\n  click_through_url: 'https://brand.com/campaign',\n  tracking_pixels: [\n    'https://analytics.brand.com/impression?id=123',\n    'https://analytics.brand.com/click?id=123'\n  ],\n  status: 'active'\n}\n```\n\n### Video Creative Structure\n\n```javascript\n{\n  creative_id: 'video_30s_hero',\n  name: 'Hero Video 30s',\n  format_id: {\n    agent_url: 'https://creative.adcontextprotocol.org',\n    id: 'video_standard_30s'\n  },\n  assets: {\n    video: {\n      url: 'https://cdn.brand.com/hero_30s.mp4',\n      width: 1920,\n      height: 1080,\n      duration_ms: 30000,\n      mime_type: 'video/mp4'\n    }\n  },\n  click_through_url: 'https://brand.com/product',\n  tracking_pixels: [\n    'https://analytics.brand.com/video_start?id=456',\n    'https://analytics.brand.com/video_complete?id=456'\n  ]\n}\n```\n\n### HTML5 Creative Structure\n\n```javascript\n{\n  creative_id: 'html5_interactive',\n  name: 'Interactive HTML5 Ad',\n  format_id: {\n    agent_url: 'https://creative.adcontextprotocol.org',\n    id: 'display_300x250'\n  },\n  assets: {\n    html: {\n      content: '<div>...</div>',  // Full HTML content\n      width: 300,\n      height: 250\n    },\n    backup_image: {  // Fallback for non-HTML5 support\n      url: 'https://cdn.brand.com/backup.jpg',\n      width: 300,\n      height: 250\n    }\n  },\n  click_through_url: 'https://brand.com/campaign'\n}\n```\n\n### Native Creative Structure\n\n```javascript\n{\n  creative_id: 'native_article',\n  name: 'Native Article Ad',\n  format_id: {\n    agent_url: 'https://creative.adcontextprotocol.org',\n    id: 'native_standard'\n  },\n  assets: {\n    title: {\n      text: 'Discover the Future of Cloud Computing'\n    },\n    body: {\n      text: 'Learn how our platform helps businesses scale faster'\n    },\n    image: {\n      url: 'https://cdn.brand.com/native_image.jpg',\n      width: 1200,\n      height: 627\n    },\n    logo: {\n      url: 'https://cdn.brand.com/logo.png',\n      width: 200,\n      height: 200\n    },\n    cta: {\n      text: 'Learn More'\n    }\n  },\n  click_through_url: 'https://brand.com/cloud'\n}\n```\n\n## Uploading Creatives\n\n### Single Creative Upload\n\n```javascript\nconst result = await agent.syncCreatives({\n  creatives: [\n    {\n      creative_id: 'display_300x250_v1',\n      name: 'Display Banner',\n      format_id: {\n        agent_url: 'https://creative.adcontextprotocol.org',\n        id: 'display_300x250'\n      },\n      assets: {\n        image: {\n          url: 'https://cdn.brand.com/banner.jpg',\n          width: 300,\n          height: 250\n        }\n      }\n    }\n  ]\n});\n\nconsole.log(`Creative uploaded: ${result.synced_creatives[0].status}`);\n```\n\n### Bulk Upload\n\n```javascript\nconst creativeLibrary = [\n  { id: 'banner_300x250', format: 'display_300x250', url: 'banner_300x250.jpg' },\n  { id: 'banner_728x90', format: 'display_728x90', url: 'banner_728x90.jpg' },\n  { id: 'banner_160x600', format: 'display_160x600', url: 'banner_160x600.jpg' },\n  { id: 'video_15s', format: 'video_standard_15s', url: 'video_15s.mp4', duration: 15000 },\n  { id: 'video_30s', format: 'video_standard_30s', url: 'video_30s.mp4', duration: 30000 }\n];\n\nconst creatives = creativeLibrary.map(item => {\n  const isVideo = item.format.includes('video');\n  const [width, height] = isVideo ? [1920, 1080] : item.format.match(/\\d+x\\d+/)[0].split('x').map(Number);\n  \n  return {\n    creative_id: item.id,\n    name: `Campaign Creative - ${item.format}`,\n    format_id: {\n      agent_url: 'https://creative.adcontextprotocol.org',\n      id: item.format\n    },\n    assets: isVideo ? {\n      video: {\n        url: `https://cdn.brand.com/${item.url}`,\n        width,\n        height,\n        duration_ms: item.duration\n      }\n    } : {\n      image: {\n        url: `https://cdn.brand.com/${item.url}`,\n        width,\n        height\n      }\n    }\n  };\n});\n\nconst result = await agent.syncCreatives({ creatives });\nconsole.log(`Uploaded ${result.synced_creatives.length} creatives`);\n```\n\n### Upload with Assignments\n\nLink creatives to packages during upload:\n\n```javascript\nawait agent.syncCreatives({\n  creatives: [\n    {\n      creative_id: 'video_30s_version_a',\n      name: 'Video 30s - Version A',\n      format_id: {\n        agent_url: 'https://creative.adcontextprotocol.org',\n        id: 'video_standard_30s'\n      },\n      assets: { /* ... */ }\n    },\n    {\n      creative_id: 'video_30s_version_b',\n      name: 'Video 30s - Version B',\n      format_id: {\n        agent_url: 'https://creative.adcontextprotocol.org',\n        id: 'video_standard_30s'\n      },\n      assets: { /* ... */ }\n    }\n  ],\n  assignments: {\n    'video_30s_version_a': ['pkg-001', 'pkg-002'],  // Assign to multiple packages\n    'video_30s_version_b': ['pkg-003']\n  }\n});\n```\n\n## Creative Library Management\n\n### Querying Creatives\n\n```javascript\n// List all active creatives\nconst all = await agent.listCreatives({\n  filters: { status: ['active'] }\n});\n\n// Filter by format type\nconst videos = await agent.listCreatives({\n  filters: {\n    status: ['active'],\n    format_types: ['video']\n  }\n});\n\n// Search by name\nconst results = await agent.listCreatives({\n  filters: {\n    search: 'holiday campaign'\n  }\n});\n\n// Get specific creatives\nconst specific = await agent.listCreatives({\n  filters: {\n    creative_ids: ['creative_001', 'creative_002', 'creative_003']\n  }\n});\n```\n\n### Pagination\n\n```javascript\nasync function getAllCreatives() {\n  const allCreatives = [];\n  let offset = 0;\n  const limit = 50;\n  let hasMore = true;\n  \n  while (hasMore) {\n    const result = await agent.listCreatives({\n      limit,\n      offset,\n      sort_by: 'created_at',\n      sort_order: 'desc'\n    });\n    \n    allCreatives.push(...result.creatives);\n    hasMore = result.has_more;\n    offset += limit;\n  }\n  \n  return allCreatives;\n}\n```\n\n### Organizing Creatives\n\nUse naming conventions for easy management:\n\n```javascript\n// Format: [campaign]-[format]-[variant]-[version]\nconst namingExamples = [\n  'q1-launch-display-300x250-hero-v1',\n  'q1-launch-display-728x90-hero-v1',\n  'q1-launch-video-30s-product-v2',\n  'holiday-sale-display-300x250-promo-v1'\n];\n\n// Query by campaign\nconst q1Creatives = await agent.listCreatives({\n  filters: { search: 'q1-launch' }\n});\n```\n\n## Creative Assignment\n\n### Assigning During Campaign Creation\n\n```javascript\nconst campaign = await agent.createMediaBuy({\n  buyer_ref: 'campaign-001',\n  brand_manifest: { url: 'https://brand.com' },\n  packages: [{\n    buyer_ref: 'pkg-001',\n    product_id: 'product_001',\n    pricing_option_id: 'cpm-standard',\n    budget: 10000,\n    \n    // Option 1: Inline creatives\n    creatives: [\n      {\n        creative_id: 'inline_creative_001',\n        format_id: { /* ... */ },\n        assets: { /* ... */ }\n      }\n    ],\n    \n    // Option 2: Reference existing creatives\n    creative_ids: ['existing_creative_001', 'existing_creative_002']\n  }],\n  start_time: { type: 'asap' },\n  end_time: '2026-12-31T23:59:59Z'\n});\n```\n\n### Updating Assignments\n\n```javascript\n// Reassign creatives after upload\nawait agent.syncCreatives({\n  creatives: [],  // No new creatives\n  assignments: {\n    'creative_001': ['pkg-001', 'pkg-002'],\n    'creative_002': ['pkg-003']\n  }\n});\n\n// Or update via campaign\nawait agent.updateMediaBuy({\n  media_buy_id: 'mb_abc123',\n  updates: {\n    package_updates: [{\n      package_id: 'pkg-001',\n      creative_ids: ['new_creative_001', 'new_creative_002']\n    }]\n  }\n});\n```\n\n## Creative Validation\n\n### Pre-Upload Validation\n\n```javascript\nasync function validateCreative(creative, formatSpec) {\n  const errors = [];\n  \n  // Check dimensions\n  if (creative.assets.image) {\n    if (creative.assets.image.width !== formatSpec.specifications.width) {\n      errors.push(`Width mismatch: ${creative.assets.image.width} vs ${formatSpec.specifications.width}`);\n    }\n    if (creative.assets.image.height !== formatSpec.specifications.height) {\n      errors.push(`Height mismatch: ${creative.assets.image.height} vs ${formatSpec.specifications.height}`);\n    }\n  }\n  \n  // Check video duration\n  if (creative.assets.video) {\n    const duration = creative.assets.video.duration_ms;\n    if (formatSpec.specifications.min_duration_ms && duration < formatSpec.specifications.min_duration_ms) {\n      errors.push(`Video too short: ${duration}ms < ${formatSpec.specifications.min_duration_ms}ms`);\n    }\n    if (formatSpec.specifications.max_duration_ms && duration > formatSpec.specifications.max_duration_ms) {\n      errors.push(`Video too long: ${duration}ms > ${formatSpec.specifications.max_duration_ms}ms`);\n    }\n  }\n  \n  return {\n    valid: errors.length === 0,\n    errors\n  };\n}\n\n// Usage\nconst formats = await agent.listCreativeFormats({});\nconst format = formats.formats.find(f => f.format_id.id === 'display_300x250');\nconst validation = await validateCreative(myCreative, format);\n\nif (!validation.valid) {\n  console.error('Validation errors:', validation.errors);\n}\n```\n\n### Dry Run Testing\n\n```javascript\n// Test upload without committing\nconst preview = await agent.syncCreatives({\n  creatives: [myCreative],\n  dry_run: true\n});\n\nconsole.log('Preview results:');\npreview.synced_creatives.forEach(result => {\n  console.log(`${result.creative_id}: ${result.status}`);\n  if (result.rejection_reasons) {\n    console.log('  Reasons:', result.rejection_reasons);\n  }\n});\n```\n\n## Performance Tracking\n\n### Creative Performance Analysis\n\n```javascript\nasync function analyzeCreativePerformance(mediaBuyId) {\n  const delivery = await agent.getMediaBuyDelivery({\n    media_buy_id: mediaBuyId,\n    dimensions: ['creative']\n  });\n  \n  if (!delivery.by_creative) {\n    console.log('No creative performance data available');\n    return;\n  }\n  \n  // Calculate efficiency scores\n  const performance = delivery.by_creative.map(creative => ({\n    creative_id: creative.creative_id,\n    impressions: creative.impressions,\n    clicks: creative.clicks || 0,\n    ctr: (creative.clicks || 0) / creative.impressions,\n    cpm: (creative.spend / creative.impressions) * 1000,\n    efficiency_score: ((creative.clicks || 0) / creative.impressions) * (creative.impressions / creative.spend)\n  }));\n  \n  // Rank by efficiency\n  performance.sort((a, b) => b.efficiency_score - a.efficiency_score);\n  \n  console.log('Creative Performance Rankings:');\n  performance.forEach((p, index) => {\n    console.log(`${index + 1}. ${p.creative_id}`);\n    console.log(`   CTR: ${(p.ctr * 100).toFixed(3)}%`);\n    console.log(`   CPM: $${p.cpm.toFixed(2)}`);\n    console.log(`   Efficiency: ${p.efficiency_score.toFixed(2)}`);\n  });\n  \n  return performance;\n}\n```\n\n### Creative Rotation Optimization\n\n```javascript\nasync function optimizeCreativeRotation(mediaBuyId) {\n  const performance = await analyzeCreativePerformance(mediaBuyId);\n  \n  // Find top 3 performers\n  const topCreatives = performance.slice(0, 3).map(p => p.creative_id);\n  \n  console.log(`\\nOptimizing to use top performers: ${topCreatives.join(', ')}`);\n  \n  // Update campaign to use only top performers\n  await agent.updateMediaBuy({\n    media_buy_id: mediaBuyId,\n    updates: {\n      package_updates: [{\n        package_id: 'pkg-001',\n        creative_ids: topCreatives\n      }]\n    }\n  });\n  \n  console.log('✅ Creative rotation optimized');\n}\n```\n\n## Best Practices\n\n### 1. Maintain Creative Library\n\nOrganize creatives systematically:\n\n```javascript\n// Use consistent naming\nconst naming = {\n  pattern: '[campaign]-[format]-[message]-[version]',\n  examples: [\n    'spring-2026-display-300x250-sale-v1',\n    'spring-2026-video-30s-product-v1'\n  ]\n};\n\n// Track creative metadata\nconst creativeMetadata = {\n  creative_id: 'spring-2026-display-300x250-sale-v1',\n  campaign: 'spring-2026',\n  format: 'display-300x250',\n  message: 'sale',\n  version: 'v1',\n  created_date: '2026-01-15',\n  designer: 'John Doe'\n};\n```\n\n### 2. Version Control\n\nTrack creative versions:\n\n```javascript\n// Use version suffixes\nconst versions = [\n  'banner-300x250-hero-v1',  // Original\n  'banner-300x250-hero-v2',  // Headline changed\n  'banner-300x250-hero-v3'   // CTA updated\n];\n\n// Document changes\nconst versionLog = {\n  'v1': 'Initial version',\n  'v2': 'Updated headline for clarity',\n  'v3': 'Strengthened call-to-action'\n};\n```\n\n### 3. Test Multiple Variations\n\nAlways A/B test creatives:\n\n```javascript\n// Upload test variations\nconst variations = ['variant_a', 'variant_b', 'variant_c'];\n\nawait agent.syncCreatives({\n  creatives: variations.map(v => ({\n    creative_id: `test-${v}`,\n    name: `Test - ${v}`,\n    format_id: { /* ... */ },\n    assets: { /* ... */ }\n  })),\n  assignments: {\n    'test-variant_a': ['pkg-001'],\n    'test-variant_b': ['pkg-001'],\n    'test-variant_c': ['pkg-001']\n  }\n});\n```\n\n### 4. Archive Old Creatives\n\nKeep library clean:\n\n```javascript\n// Archive outdated creatives\nawait agent.syncCreatives({\n  creatives: [{\n    creative_id: 'old_creative',\n    status: 'archived'\n  }]\n});\n\n// Query only active\nconst active = await agent.listCreatives({\n  filters: { status: ['active'] }\n});\n```\n\n### 5. Monitor File Sizes\n\nOptimize creative file sizes:\n\n```javascript\n// Check format requirements\nconst format = await agent.listCreativeFormats({\n  format_types: ['display']\n});\n\nformat.formats.forEach(f => {\n  console.log(`${f.name}: Max ${f.specifications.max_file_size_kb}KB`);\n});\n\n// Optimize before upload\n// - Compress images (use tools like TinyPNG, ImageOptim)\n// - Optimize videos (H.264, proper bitrate)\n// - Minify HTML/CSS/JS for HTML5 ads\n```\n\n## Summary\n\nEffective creative management requires:\n\n1. **Understanding format requirements** - Check specifications before building\n2. **Systematic organization** - Use consistent naming and metadata\n3. **Validation before upload** - Check dimensions, file sizes, durations\n4. **Performance tracking** - Monitor CTR, completion rates, efficiency\n5. **Continuous optimization** - Test variations, optimize based on data\n\nAdCP's creative management system provides the tools needed to deliver high-quality advertising at scale.\n\nFile v1.0.0:EXAMPLES.md\n\n# AdCP Real-World Examples\n\nComplete, working examples for common advertising scenarios using AdCP.\n\n**Official AdCP Documentation**: https://docs.adcontextprotocol.org  \n**Media Buy Protocol**: https://docs.adcontextprotocol.org/docs/media-buy/  \n**Task Reference**: https://docs.adcontextprotocol.org/docs/media-buy/task-reference/\n\nThese examples demonstrate practical implementations of the Ad Context Protocol. For the complete specification and additional examples, see the [official AdCP documentation](https://docs.adcontextprotocol.org).\n\n## Table of Contents\n\n1. [Quick Start Examples](#quick-start-examples)\n2. [Display Advertising Campaigns](#display-advertising-campaigns)\n3. [Video Advertising Campaigns](#video-advertising-campaigns)\n4. [Multi-Channel Campaigns](#multi-channel-campaigns)\n5. [Campaign Optimization](#campaign-optimization)\n6. [Creative Management](#creative-management)\n7. [Advanced Targeting](#advanced-targeting)\n8. [Performance Monitoring](#performance-monitoring)\n\n---\n\n## Quick Start Examples\n\n### Example 1: Minimal Campaign\n\nThe simplest possible campaign - discover products and launch immediately.\n\n```javascript\nimport { testAgent } from '@adcp/client/testing';\n\nasync function launchQuickCampaign() {\n  // 1. Discover products\n  const products = await testAgent.getProducts({\n    brief: 'Display advertising for tech startup',\n    brand_manifest: { url: 'https://startup.com' }\n  });\n  \n  const firstProduct = products.products[0];\n  \n  // 2. Create campaign\n  const campaign = await testAgent.createMediaBuy({\n    buyer_ref: 'quick-campaign-001',\n    brand_manifest: { url: 'https://startup.com' },\n    packages: [{\n      buyer_ref: 'pkg-001',\n      product_id: firstProduct.product_id,\n      pricing_option_id: firstProduct.pricing_options[0].pricing_option_id,\n      budget: 5000\n    }],\n    start_time: { type: 'asap' },\n    end_time: '2026-12-31T23:59:59Z'\n  });\n  \n  console.log(`✅ Campaign created: ${campaign.media_buy_id}`);\n}\n```\n\n### Example 2: Discover and Review\n\nExplore available products before committing.\n\n```javascript\nasync function exploreInventory() {\n  // Discover products\n  const result = await testAgent.getProducts({\n    brief: 'Premium video inventory for luxury brand',\n    brand_manifest: {\n      name: 'Luxury Auto Corp',\n      url: 'https://luxuryauto.com'\n    },\n    filters: {\n      channels: ['video', 'ctv'],\n      budget_range: { min: 20000, max: 100000 }\n    }\n  });\n  \n  console.log(`Found ${result.products.length} matching products:\\n`);\n  \n  result.products.forEach((product, index) => {\n    console.log(`${index + 1}. ${product.name}`);\n    console.log(`   ${product.description}`);\n    console.log(`   Channels: ${product.channels.join(', ')}`);\n    console.log(`   Pricing: ${JSON.stringify(product.pricing_options[0])}`);\n    \n    if (product.inventory_estimate) {\n      console.log(`   Estimated reach: ${product.inventory_estimate.min_impressions?.toLocaleString()} - ${product.inventory_estimate.max_impressions?.toLocaleString()} impressions`);\n    }\n    \n    console.log(`   Formats: ${product.format_ids.map(f => f.id).join(', ')}`);\n    console.log('');\n  });\n}\n```\n\n---\n\n## Display Advertising Campaigns\n\n### Example 3: Standard Display Campaign\n\nLaunch a multi-format display campaign with proper creatives.\n\n```javascript\nasync function launchDisplayCampaign() {\n  // 1. Discover capabilities\n  const caps = await testAgent.getAdcpCapabilities({});\n  console.log('Agent supports channels:', caps.media_buy.supported_channels);\n  \n  // 2. Find display products\n  const products = await testAgent.getProducts({\n    brief: 'Display advertising for e-commerce fashion brand targeting women 25-40',\n    brand_manifest: {\n      name: 'FashionCo',\n      url: 'https://fashionco.com',\n      tagline: 'Sustainable fashion for modern women',\n      colors: {\n        primary: '#E91E63',\n        secondary: '#9C27B0'\n      }\n    },\n    filters: {\n      channels: ['display'],\n      budget_range: { min: 10000, max: 30000 }\n    }\n  });\n  \n  const displayProduct = products.products.find(p => \n    p.channels.includes('display') && \n    p.format_ids.some(f => f.id.includes('300x250'))\n  );\n  \n  if (!displayProduct) {\n    throw new Error('No suitable display product found');\n  }\n  \n  // 3. Check format requirements\n  const formats = await testAgent.listCreativeFormats({\n    format_types: ['display']\n  });\n  \n  const requiredFormats = formats.formats.filter(f => \n    displayProduct.format_ids.some(pf => pf.id === f.format_id.id)\n  );\n  \n  console.log('Required creative formats:');\n  requiredFormats.forEach(f => {\n    console.log(`  - ${f.name}: ${f.specifications.width}x${f.specifications.height}`);\n  });\n  \n  // 4. Create campaign with creatives\n  const campaign = await testAgent.createMediaBuy({\n    buyer_ref: 'fashionco-spring-2026',\n    brand_manifest: {\n      name: 'FashionCo',\n      url: 'https://fashionco.com'\n    },\n    packages: [{\n      buyer_ref: 'pkg-display-spring',\n      product_id: displayProduct.product_id,\n      pricing_option_id: displayProduct.pricing_options[0].pricing_option_id,\n      budget: 15000,\n      \n      targeting_overlay: {\n        demographics: {\n          age_ranges: [{ min: 25, max: 40 }],\n          genders: ['F']\n        },\n        behavioral: {\n          interests: ['fashion', 'sustainable_living', 'online_shopping']\n        }\n      },\n      \n      creatives: [\n        {\n          creative_id: 'spring_banner_300x250',\n          format_id: {\n            agent_url: 'https://creative.adcontextprotocol.org',\n            id: 'display_300x250'\n          },\n          assets: {\n            image: {\n              url: 'https://cdn.fashionco.com/ads/spring_300x250.jpg',\n              width: 300,\n              height: 250,\n              mime_type: 'image/jpeg'\n            }\n          },\n          click_through_url: 'https://fashionco.com/spring-collection'\n        },\n        {\n          creative_id: 'spring_leaderboard_728x90',\n          format_id: {\n            agent_url: 'https://creative.adcontextprotocol.org',\n            id: 'display_728x90'\n          },\n          assets: {\n            image: {\n              url: 'https://cdn.fashionco.com/ads/spring_728x90.jpg',\n              width: 728,\n              height: 90,\n              mime_type: 'image/jpeg'\n            }\n          },\n          click_through_url: 'https://fashionco.com/spring-collection'\n        }\n      ],\n      \n      frequency_cap: {\n        impressions: 5,\n        time_unit: 'day',\n        time_count: 1\n      }\n    }],\n    start_time: { type: 'asap' },\n    end_time: '2026-04-30T23:59:59Z',\n    optimization_goal: 'clicks',\n    pacing: 'even'\n  });\n  \n  console.log(`✅ Display campaign created: ${campaign.media_buy_id}`);\n  console.log(`   Status: ${campaign.status}`);\n  \n  if (campaign.status === 'pending') {\n    console.log(`   ⏳ Awaiting approval - Task ID: ${campaign.task_id}`);\n  }\n}\n```\n\n### Example 4: Programmatic Display with Real-Time Bidding\n\nAuction-based display campaign with bid optimization.\n\n```javascript\nasync function launchProgrammaticDisplay() {\n  const products = await testAgent.getProducts({\n    brief: 'Programmatic display inventory with RTB support',\n    brand_manifest: { url: 'https://brand.com' },\n    filters: {\n      channels: ['display'],\n      delivery_type: 'non-guaranteed'\n    }\n  });\n  \n  // Find auction-based product\n  const auctionProduct = products.products.find(p =>\n    p.pricing_options.some(opt => opt.pricing_model === 'cpm-auction')\n  );\n  \n  if (!auctionProduct) {\n    throw new Error('No auction product found');\n  }\n  \n  const auctionPricing = auctionProduct.pricing_options.find(\n    opt => opt.pricing_model === 'cpm-auction'\n  );\n  \n  // Calculate bid (20% above floor)\n  const bidPrice = auctionPricing.floor * 1.2;\n  \n  const campaign = await testAgent.createMediaBuy({\n    buyer_ref: 'programmatic-campaign-001',\n    brand_manifest: { url: 'https://brand.com' },\n    packages: [{\n      buyer_ref: 'pkg-rtb-001',\n      product_id: auctionProduct.product_id,\n      pricing_option_id: auctionPricing.pricing_option_id,\n      budget: 25000,\n      bid_price: bidPrice,  // Required for auction\n      \n      targeting_overlay: {\n        geo: {\n          included: ['US-CA', 'US-NY', 'US-TX', 'US-FL']\n        },\n        contextual: {\n          keywords: ['technology', 'innovation', 'business'],\n          categories: ['IAB19']  // Technology & Computing\n        }\n      }\n    }],\n    start_time: { type: 'asap' },\n    end_time: '2026-03-31T23:59:59Z',\n    optimization_goal: 'impressions'\n  });\n  \n  console.log(`✅ Programmatic campaign created with $${bidPrice.toFixed(2)} CPM bid`);\n}\n```\n\n---\n\n## Video Advertising Campaigns\n\n### Example 5: Pre-Roll Video Campaign\n\nStandard 30-second pre-roll video campaign.\n\n```javascript\nasync function launchVideoPreRoll() {\n  // 1. Find video products\n  const products = await testAgent.getProducts({\n    brief: '30-second pre-roll video for streaming services targeting tech enthusiasts',\n    brand_manifest: {\n      name: 'StreamTech',\n      url: 'https://streamtech.com'\n    },\n    filters: {\n      channels: ['video'],\n      format_types: ['video']\n    }\n  });\n  \n  const videoProduct = products.products.find(p =>\n    p.format_ids.some(f => f.id.includes('30s'))\n  );\n  \n  // 2. Create campaign\n  const campaign = await testAgent.createMediaBuy({\n    buyer_ref: 'streamtech-video-q1-2026',\n    brand_manifest: {\n      name: 'StreamTech',\n      url: 'https://streamtech.com',\n      tagline: 'Stream smarter, not harder'\n    },\n    packages: [{\n      buyer_ref: 'pkg-preroll-30s',\n      product_id: videoProduct.product_id,\n      pricing_option_id: videoProduct.pricing_options[0].pricing_option_id,\n      budget: 40000,\n      \n      targeting_overlay: {\n        demographics: {\n          age_ranges: [{ min: 18, max: 44 }],\n          genders: ['M', 'F']\n        },\n        behavioral: {\n          interests: ['technology', 'streaming', 'entertainment'],\n          purchase_intent: ['electronics', 'software']\n        }\n      },\n      \n      creatives: [{\n        creative_id: 'streamtech_preroll_30s_v1',\n        format_id: {\n          agent_url: 'https://creative.adcontextprotocol.org',\n          id: 'video_standard_30s'\n        },\n        assets: {\n          video: {\n            url: 'https://cdn.streamtech.com/ads/preroll_30s_v1.mp4',\n            width: 1920,\n            height: 1080,\n            duration_ms: 30000,\n            mime_type: 'video/mp4'\n          }\n        },\n        click_through_url: 'https://streamtech.com/signup',\n        tracking_pixels: [\n          'https://analytics.streamtech.com/impression',\n          'https://analytics.streamtech.com/completion'\n        ]\n      }],\n      \n      frequency_cap: {\n        impressions: 2,\n        time_unit: 'day',\n        time_count: 1\n      }\n    }],\n    start_time: {\n      type: 'scheduled',\n      datetime: '2026-02-01T00:00:00Z'\n    },\n    end_time: '2026-03-31T23:59:59Z',\n    optimization_goal: 'conversions'\n  });\n  \n  console.log(`✅ Video campaign created: ${campaign.media_buy_id}`);\n  \n  // 3. Monitor completion rates\n  setTimeout(async () => {\n    const delivery = await testAgent.getMediaBuyDelivery({\n      media_buy_id: campaign.media_buy_id\n    });\n    \n    console.log(`\\n📊 Video Performance:`);\n    console.log(`   Impressions: ${delivery.delivery.impressions.toLocaleString()}`);\n    console.log(`   Completion Rate: ${(delivery.delivery.completion_rate * 100).toFixed(1)}%`);\n    console.log(`   CPM: $${delivery.delivery.cpm.toFixed(2)}`);\n  }, 60000);  // Check after 1 minute\n}\n```\n\n### Example 6: Connected TV Campaign\n\nCTV campaign targeting cord-cutters and streaming audiences.\n\n```javascript\nasync function launchCTVCampaign() {\n  const products = await testAgent.getProducts({\n    brief: 'Connected TV advertising for premium streaming platforms targeting cord-cutters',\n    brand_manifest: {\n      name: 'Premium Streaming Service',\n      url: 'https://premiumstream.com'\n    },\n    filters: {\n      channels: ['ctv'],\n      budget_range: { min: 50000, max: 200000 }\n    }\n  });\n  \n  const ctvProduct = products.products[0];\n  \n  const campaign = await testAgent.createMediaBuy({\n    buyer_ref: 'ctv-campaign-q1-2026',\n    brand_manifest: { url: 'https://premiumstream.com' },\n    packages: [{\n      buyer_ref: 'pkg-ctv-premium',\n      product_id: ctvProduct.product_id,\n      pricing_option_id: ctvProduct.pricing_options[0].pricing_option_id,\n      budget: 100000,\n      \n      targeting_overlay: {\n        geo: {\n          included: [\n            'US-NY', 'US-LA', 'US-CHI', 'US-SF', 'US-PHI',  // Top 5 DMAs\n            'US-DAL', 'US-DC', 'US-ATL', 'US-BOS', 'US-SEA'  // Top 6-10 DMAs\n          ]\n        },\n        demographics: {\n          age_ranges: [{ min: 25, max: 54 }],\n          income_brackets: ['75k+']\n        },\n        behavioral: {\n          interests: ['streaming', 'premium_content', 'cord_cutting']\n        }\n      },\n      \n      creatives: [{\n        creative_id: 'ctv_spot_30s',\n        format_id: {\n          agent_url: 'https://creative.adcontextprotocol.org',\n          id: 'video_standard_30s'\n        },\n        assets: {\n          video: {\n            url: 'https://cdn.premiumstream.com/ctv_30s_4k.mp4',\n            width: 3840,  // 4K\n            height: 2160,\n            duration_ms: 30000,\n            mime_type: 'video/mp4'\n          }\n        }\n      }],\n      \n      frequency_cap: {\n        impressions: 3,\n        time_unit: 'week',\n        time_count: 1\n      }\n    }],\n    start_time: { type: 'asap' },\n    end_time: '2026-03-31T23:59:59Z',\n    optimization_goal: 'impressions',\n    pacing: 'even'\n  });\n  \n  console.log(`✅ CTV campaign launched: ${campaign.media_buy_id}`);\n  console.log(`   Budget: $${campaign.packages[0].budget.toLocaleString()}`);\n  console.log(`   DMAs: 10 major markets`);\n}\n```\n\n---\n\n## Multi-Channel Campaigns\n\n### Example 7: Integrated Display + Video Campaign\n\nCoordinated campaign across multiple channels.\n\n```javascript\nasync function launchMultiChannelCampaign() {\n  // 1. Discover products across channels\n  const products = await testAgent.getProducts({\n    brief: 'Multi-channel campaign for tech product launch - display and video',\n    brand_manifest: {\n      name: 'TechCorp',\n      url: 'https://techcorp.com'\n    },\n    filters: {\n      channels: ['display', 'video'],\n      budget_range: { min: 50000, max: 150000 }\n    }\n  });\n  \n  // 2. Separate products by channel\n  const displayProducts = products.products.filter(p => p.channels.includes('display'));\n  const videoProducts = products.products.filter(p => p.channels.includes('video'));\n  \n  // 3. Create integrated campaign with multiple packages\n  const campaign = await testAgent.createMediaBuy({\n    buyer_ref: 'techcorp-product-launch-2026',\n    brand_manifest: {\n      name: 'TechCorp',\n      url: 'https://techcorp.com',\n      tagline: 'Innovation that matters'\n    },\n    packages: [\n      // Display package (40% of budget)\n      {\n        buyer_ref: 'pkg-display-awareness',\n        product_id: displayProducts[0].product_id,\n        pricing_option_id: displayProducts[0].pricing_options[0].pricing_option_id,\n        budget: 40000,\n        \n        targeting_overlay: {\n          demographics: {\n            age_ranges: [{ min: 25, max: 54 }]\n          },\n          behavioral: {\n            interests: ['technology', 'business', 'innovation']\n          }\n        },\n        \n        creatives: [\n          {\n            creative_id: 'display_300x250_launch',\n            format_id: {\n              agent_url: 'https://creative.adcontextprotocol.org',\n              id: 'display_300x250'\n            },\n            assets: {\n              image: {\n                url: 'https://cdn.techcorp.com/launch_300x250.jpg',\n                width: 300,\n                height: 250\n              }\n            }\n          },\n          {\n            creative_id: 'display_728x90_launch',\n            format_id: {\n              agent_url: 'https://creative.adcontextprotocol.org',\n              id: 'display_728x90'\n            },\n            assets: {\n              image: {\n                url: 'https://cdn.techcorp.com/launch_728x90.jpg',\n                width: 728,\n                height: 90\n              }\n            }\n          }\n        ]\n      },\n      \n      // Video package (60% of budget)\n      {\n        buyer_ref: 'pkg-video-consideration',\n        product_id: videoProducts[0].product_id,\n        pricing_option_id: videoProducts[0].pricing_options[0].pricing_option_id,\n        budget: 60000,\n        \n        targeting_overlay: {\n          demographics: {\n            age_ranges: [{ min: 25, max: 54 }]\n          },\n          behavioral: {\n            interests: ['technology', 'business', 'innovation'],\n            purchase_intent: ['electronics', 'software']\n          }\n        },\n        \n        creatives: [{\n          creative_id: 'video_30s_product_demo',\n          format_id: {\n            agent_url: 'https://creative.adcontextprotocol.org',\n            id: 'video_standard_30s'\n          },\n          assets: {\n            video: {\n              url: 'https://cdn.techcorp.com/demo_30s.mp4',\n              width: 1920,\n              height: 1080,\n              duration_ms: 30000\n            }\n          }\n        }],\n        \n        frequency_cap: {\n          impressions: 3,\n          time_unit: 'week',\n          time_count: 1\n        }\n      }\n    ],\n    start_time: { type: 'asap' },\n    end_time: '2026-06-30T23:59:59Z',\n    optimization_goal: 'conversions',\n    pacing: 'even'\n  });\n  \n  console.log(`✅ Multi-channel campaign created: ${campaign.media_buy_id}`);\n  console.log(`   Display budget: $40,000`);\n  console.log(`   Video budget: $60,000`);\n  console.log(`   Total: $100,000`);\n  \n  // 4. Monitor performance by channel\n  setTimeout(async () => {\n    const delivery = await testAgent.getMediaBuyDelivery({\n      media_buy_id: campaign.media_buy_id,\n      dimensions: ['package']\n    });\n    \n    console.log('\\n📊 Performance by Channel:');\n    delivery.by_package?.forEach(pkg => {\n      const channel = pkg.buyer_ref.includes('display') ? 'Display' : 'Video';\n      console.log(`   ${channel}:`);\n      console.log(`     Impressions: ${pkg.impressions.toLocaleString()}`);\n      console.log(`     Spend: $${pkg.spend.toLocaleString()}`);\n      console.log(`     CPM: $${(pkg.spend / pkg.impressions * 1000).toFixed(2)}`);\n    });\n  }, 120000);  // Check after 2 minutes\n}\n```\n\n---\n\n## Campaign Optimization\n\n### Example 8: Dynamic Budget Reallocation\n\nMonitor and optimize budget allocation based on performance.\n\n```javascript\nasync function optimizeCampaignBudget(mediaBuyId) {\n  // 1. Get current performance\n  const delivery = await testAgent.getMediaBuyDelivery({\n    media_buy_id: mediaBuyId,\n    dimensions: ['package']\n  });\n  \n  // 2. Calculate efficiency scores\n  const packagePerformance = delivery.by_package?.map(pkg => ({\n    package_id: pkg.package_id,\n    buyer_ref: pkg.buyer_ref,\n    impressions: pkg.impressions,\n    spend: pkg.spend,\n    clicks: pkg.clicks || 0,\n    efficiency: pkg.impressions / pkg.spend,  // Impressions per dollar\n    ctr: pkg.clicks / pkg.impressions\n  }));\n  \n  // 3. Rank by efficiency\n  packagePerformance?.sort((a, b) => b.efficiency - a.efficiency);\n  \n  console.log('📊 Package Performance Rankings:');\n  packagePerformance?.forEach((pkg, index) => {\n    console.log(`${index + 1}. ${pkg.buyer_ref}`);\n    console.log(`   Efficiency: ${pkg.efficiency.toFixed(0)} imps/$`);\n    console.log(`   CTR: ${(pkg.ctr * 100).toFixed(2)}%`);\n  });\n  \n  // 4. Identify optimization opportunity\n  if (packagePerformance && packagePerformance.length >= 2) {\n    const best = packagePerformance[0];\n    const worst = packagePerformance[packagePerformance.length - 1];\n    \n    const efficiencyRatio = best.efficiency / worst.efficiency;\n    \n    if (efficiencyRatio > 2) {\n      console.log(`\\n💡 Optimization Opportunity:`);\n      console.log(`   ${best.buyer_ref} is ${efficiencyRatio.toFixed(1)}x more efficient than ${worst.buyer_ref}`);\n      console.log(`   Recommend: Shift $5,000 from ${worst.buyer_ref} to ${best.buyer_ref}`);\n      \n      // 5. Implement optimization (if approved)\n      const shouldOptimize = true;  // Get user approval in real scenario\n      \n      if (shouldOptimize) {\n        await testAgent.updateMediaBuy({\n          media_buy_id: mediaBuyId,\n          updates: {\n            package_updates: [\n              {\n                package_id: best.package_id,\n                budget_change: 5000  // Add $5k\n              },\n              {\n                package_id: worst.package_id,\n                budget_change: -5000  // Remove $5k\n              }\n            ]\n          }\n        });\n        \n        console.log('✅ Budget reallocation complete');\n      }\n    }\n  }\n}\n```\n\n### Example 9: A/B Testing Creatives\n\nTest multiple creative variations and identify winners.\n\n```javascript\nasync function runCreativeABTest(mediaBuyId) {\n  // 1. Upload test variations\n  await testAgent.syncCreatives({\n    creatives: [\n      {\n        creative_id: 'variant_a_headline_1',\n        name: 'Variant A - Headline 1',\n        format_id: {\n          agent_url: 'https://creative.adcontextprotocol.org',\n          id: 'display_300x250'\n        },\n        assets: {\n          image: {\n            url: 'https://cdn.brand.com/test_a.jpg',\n            width: 300,\n            height: 250\n          }\n        }\n      },\n      {\n        creative_id: 'variant_b_headline_2',\n        name: 'Variant B - Headline 2',\n        format_id: {\n          agent_url: 'https://creative.adcontextprotocol.org',\n          id: 'display_300x250'\n        },\n        assets: {\n          image: {\n            url: 'https://cdn.brand.com/test_b.jpg',\n            width: 300,\n            height: 250\n          }\n        }\n      },\n      {\n        creative_id: 'variant_c_headline_3',\n        name: 'Variant C - Headline 3',\n        format_id: {\n          agent_url: 'https://creative.adcontextprotocol.org',\n          id: 'display_300x250'\n        },\n        assets: {\n          image: {\n            url: 'https://cdn.brand.com/test_c.jpg',\n            width: 300,\n            height: 250\n          }\n        }\n      }\n    ],\n    assignments: {\n      'variant_a_headline_1': ['pkg-001'],\n      'variant_b_headline_2': ['pkg-001'],\n      'variant_c_headline_3': ['pkg-001']\n    }\n  });\n  \n  console.log('✅ A/B test creatives uploaded');\n  \n  // 2. Wait for sufficient data (check after 24 hours in production)\n  console.log('⏳ Collecting performance data...');\n  \n  // 3. Analyze results\n  const delivery = await testAgent.getMediaBuyDelivery({\n    media_buy_id: mediaBuyId,\n    dimensions: ['creative']\n  });\n  \n  if (!delivery.by_creative || delivery.by_creative.length < 2) {\n    console.log('⚠️ Insufficient data for analysis');\n    return;\n  }\n  \n  // 4. Calculate statistical significance and find winner\n  const results = delivery.by_creative.map(creative => ({\n    creative_id: creative.creative_id,\n    impressions: creative.impressions,\n    clicks: creative.clicks || 0,\n    ctr: (creative.clicks || 0) / creative.impressions,\n    confidence: creative.impressions > 1000 ? 'high' : 'low'\n  }));\n  \n  results.sort((a, b) => b.ctr - a.ctr);\n  \n  console.log('\\n📊 A/B Test Results:');\n  results.forEach((result, index) => {\n    const isWinner = index === 0;\n    console.log(`${isWinner ? '🏆' : '  '} ${result.creative_id}`);\n    console.log(`     CTR: ${(result.ctr * 100).toFixed(3)}%`);\n    console.log(`     Impressions: ${result.impressions.toLocaleString()}`);\n    console.log(`     Confidence: ${result.confidence}`);\n  });\n  \n  // 5. Implement winner\n  const winner = results[0];\n  \n  if (winner.confidence === 'high') {\n    console.log(`\\n✅ Winner identified: ${winner.creative_id}`);\n    console.log(`   Recommend: Use this creative for remaining campaign`);\n    \n    // Update campaign to use only winner\n    await testAgent.syncCreatives({\n      creatives: [],  // No new creatives\n      assignments: {\n        [winner.creative_id]: ['pkg-001']  // Only winner\n      }\n    });\n    \n    console.log('✅ Campaign updated to use winning creative');\n  } else {\n    console.log('\\n⚠️ Need more data before selecting winner');\n  }\n}\n```\n\n---\n\n## Creative Management\n\n### Example 10: Bulk Creative Upload\n\nUpload multiple creative assets efficiently.\n\n```javascript\nasync function uploadCreativeLibrary() {\n  // Prepare creative library\n  const creatives = [\n    // Display formats\n    { id: 'display_mrec', format: 'display_300x250', url: 'banner_300x250.jpg', w: 300, h: 250 },\n    { id: 'display_leader', format: 'display_728x90', url: 'banner_728x90.jpg', w: 728, h: 90 },\n    { id: 'display_sky', format: 'display_160x600', url: 'banner_160x600.jpg', w: 160, h: 600 },\n    \n    // Video formats\n    { id: 'video_15s', format: 'video_standard_15s', url: 'video_15s.mp4', w: 1920, h: 1080, duration: 15000 },\n    { id: 'video_30s', format: 'video_standard_30s', url: 'video_30s.mp4', w: 1920, h: 1080, duration: 30000 }\n  ];\n  \n  // Build creative objects\n  const creativeObjects = creatives.map(c => {\n    const isVideo = c.format.includes('video');\n    \n    return {\n      creative_id: c.id,\n      name: `Campaign Creative - ${c.format}`,\n      format_id: {\n        agent_url: 'https://creative.adcontextprotocol.org',\n        id: c.format\n      },\n      assets: isVideo ? {\n        video: {\n          url: `https://cdn.brand.com/${c.url}`,\n          width: c.w,\n          height: c.h,\n          duration_ms: c.duration,\n          mime_type: 'video/mp4'\n        }\n      } : {\n        image: {\n          url: `https://cdn.brand.com/${c.url}`,\n          width: c.w,\n          height: c.h,\n          mime_type: 'image/jpeg'\n        }\n      },\n      click_through_url: 'https://brand.com/campaign'\n    };\n  });\n  \n  // Upload all creatives\n  const result = await testAgent.syncCreatives({\n    creatives: creativeObjects\n  });\n  \n  console.log(`✅ Uploaded ${result.synced_creatives.length} creatives`);\n  \n  result.synced_creatives.forEach(creative => {\n    console.log(`   ${creative.creative_id}: ${creative.status}`);\n  });\n}\n```\n\n---\n\n## Advanced Targeting\n\n### Example 11: Geo-Fenced Campaign\n\nTarget specific geographic regions with precision.\n\n```javascript\nasync function launchGeoTargetedCampaign() {\n  const products = await testAgent.getProducts({\n    brief: 'Retail store promotion targeting customers near store locations',\n    brand_manifest: { url: 'https://retailchain.com' },\n    filters: {\n      channels: ['display', 'mobile']\n    }\n  });\n  \n  const campaign = await testAgent.createMediaBuy({\n    buyer_ref: 'store-promo-geo-q1',\n    brand_manifest: { url: 'https://retailchain.com' },\n    packages: [{\n      buyer_ref: 'pkg-geo-promo',\n      product_id: products.products[0].product_id,\n      pricing_option_id: products.products[0].pricing_options[0].pricing_option_id,\n      budget: 20000,\n      \n      targeting_overlay: {\n        geo: {\n          included: [\n            'US-10001',  // NYC ZIP\n            'US-10002',\n            'US-90001',  // LA ZIP\n            'US-90002',\n            'US-60601',  // Chicago ZIP\n            'US-60602'\n          ]\n        },\n        demographics: {\n          age_ranges: [{ min: 21, max: 65 }]\n        }\n      }\n    }],\n    start_time: { type: 'asap' },\n    end_time: '2026-03-31T23:59:59Z'\n  });\n  \n  console.log(`✅ Geo-targeted campaign launched`);\n  console.log(`   Targeting 6 ZIP codes across 3 cities`);\n}\n```\n\n---\n\n## Performance Monitoring\n\n### Example 12: Real-Time Campaign Dashboard\n\nMonitor campaign performance with comprehensive metrics.\n\n```javascript\nasync function monitorCampaign(mediaBuyId) {\n  const delivery = await testAgent.getMediaBuyDelivery({\n    media_buy_id: mediaBuyId,\n    granularity: 'daily',\n    dimensions: ['package', 'creative']\n  });\n  \n  console.log('=' .repeat(60));\n  console.log('📊 CAMPAIGN PERFORMANCE DASHBOARD');\n  console.log('='.repeat(60));\n  \n  // Overall metrics\n  console.log('\\n📈 Overall Performance:');\n  console.log(`   Status: ${delivery.status}`);\n  console.log(`   Impressions: ${delivery.delivery.impressions.toLocaleString()}`);\n  console.log(`   Clicks: ${(delivery.delivery.clicks || 0).toLocaleString()}`);\n  console.log(`   CTR: ${((delivery.delivery.ctr || 0) * 100).toFixed(3)}%`);\n  console.log(`   Spend: $${delivery.delivery.spend.toLocaleString()}`);\n  console.log(`   CPM: $${delivery.delivery.cpm?.toFixed(2)}`);\n  \n  // Budget pacing\n  console.log('\\n💰 Budget Pacing:');\n  const pacingBar = '█'.repeat(Math.floor(delivery.pacing.spend_pacing * 20));\n  console.log(`   ${pacingBar} ${(delivery.pacing.spend_pacing * 100).toFixed(1)}%`);\n  console.log(`   Days ${delivery.pacing.days_elapsed} of ${delivery.pacing.days_total}`);\n  console.log(`   Campaign ${(delivery.pacing.percent_complete * 100).toFixed(1)}% complete`);\n  \n  const pacingHealth = Math.abs(delivery.pacing.spend_pacing - delivery.pacing.percent_complete);\n  if (pacingHealth < 0.1) {\n    console.log(`   ✅ On track`);\n  } else if (delivery.pacing.spend_pacing < delivery.pacing.percent_complete) {\n    console.log(`   ⚠️ Underpacing by ${(pacingHealth * 100).toFixed(1)}%`);\n  } else {\n    console.log(`   ⚠️ Overpacing by ${(pacingHealth * 100).toFixed(1)}%`);\n  }\n  \n  // Package performance\n  if (delivery.by_package && delivery.by_package.length > 0) {\n    console.log('\\n📦 Performance by Package:');\n    delivery.by_package.forEach(pkg => {\n      console.log(`   ${pkg.buyer_ref}:`);\n      console.log(`     Impressions: ${pkg.impressions.toLocaleString()}`);\n      console.log(`     Spend: $${pkg.spend.toLocaleString()}`);\n      console.log(`     CPM: $${((pkg.spend / pkg.impressions) * 1000).toFixed(2)}`);\n    });\n  }\n  \n  // Creative performance\n  if (delivery.by_creative && delivery.by_creative.length > 0) {\n    console.log('\\n🎨 Performance by Creative:');\n    delivery.by_creative\n      .sort((a, b) => (b.ctr || 0) - (a.ctr || 0))\n      .forEach(creative => {\n        console.log(`   ${creative.creative_id}:`);\n        console.log(`     CTR: ${((creative.ctr || 0) * 100).toFixed(3)}%`);\n        console.log(`     Impressions: ${creative.impressions.toLocaleString()}`);\n      });\n  }\n  \n  // Daily trend\n  if (delivery.timeseries && delivery.timeseries.length > 0) {\n    console.log('\\n📅 Last 7 Days:');\n    delivery.timeseries.slice(-7).forEach(day => {\n      const date = new Date(day.timestamp).toLocaleDateString();\n      console.log(`   ${date}: ${day.impressions.toLocaleString()} imps, $${day.spend.toLocaleString()}`);\n    });\n  }\n  \n  console.log('\\n' + '='.repeat(60));\n}\n\n// Run dashboard every 5 minutes\nsetInterval(() => {\n  monitorCampaign('your-media-buy-id');\n}, 300000);\n```\n\nThis comprehensive example guide provides OpenClaw agents with practical, working code for common advertising scenarios using AdCP. Each example is complete and can be adapted to specific use cases.\n\nFile v1.0.0:PROTOCOLS.md\n\n# AdCP Protocol Details\n\nUnderstanding MCP vs A2A protocols for AdCP integration.\n\n**Official AdCP Documentation**: https://docs.adcontextprotocol.org  \n**Protocol Comparison**: https://docs.adcontextprotocol.org/docs/building/understanding/protocol-comparison  \n**MCP Guide**: https://docs.adcontextprotocol.org/docs/building/integration/mcp-guide  \n**A2A Guide**: https://docs.adcontextprotocol.org/docs/building/integration/a2a-guide\n\nThis guide explains how to use AdCP with different transport protocols. For the complete protocol specification, see the [official AdCP protocol documentation](https://docs.adcontextprotocol.org/docs/building/understanding/protocol-comparison).\n\n## Overview\n\nAdCP works over two transport protocols:\n- **MCP (Model Context Protocol)** - For Claude and MCP-compatible AI assistants\n- **A2A (Agent-to-Agent)** - For Google's agent ecosystem and complex workflows\n\n**The tasks are identical** across both protocols - only the transport format differs.\n\n## When to Use Which Protocol\n\n### Use MCP When:\n- Building for Claude or MCP-compatible clients\n- Direct integration with AI assistants\n- Simpler request/response workflows\n- Working in Cursor, Cline, or other MCP hosts\n\n### Use A2A When:\n- Building for Google's agent ecosystem\n- Complex multi-agent workflows\n- Agent collaboration scenarios\n- Need streaming responses with SSE\n\n## Protocol Comparison\n\n| Feature | MCP | A2A |\n|---------|-----|-----|\n| **Tasks** | Same 8 media buy tasks | Same 8 media buy tasks |\n| **Request Format** | JSON-RPC tool calls | HTTP POST with JSON |\n| **Response Format** | Unified status system | Same unified status |\n| **Authentication** | Bearer token header | API key in request |\n| **Transport** | WebSocket or SSE | HTTP with SSE streaming |\n| **Artifacts** | N/A | Agent cards, proposals |\n\n## MCP Integration\n\n### Setup\n\n```javascript\nimport { createMCPClient } from '@adcp/client';\n\nconst client = createMCPClient({\n  url: 'https://agent.example.com/mcp',\n  auth: {\n    type: 'bearer',\n    token: 'your-auth-token'\n  }\n});\n```\n\n### Making Requests\n\n```javascript\n// MCP tool call format\nconst result = await client.callTool({\n  name: 'get_products',\n  arguments: {\n    brief: 'Display advertising for tech startup',\n    brand_manifest: {\n      url: 'https://startup.com'\n    }\n  }\n});\n\n// Response is the task result directly\nconsole.log(result.products);\n```\n\n### Context Management\n\nMCP sessions maintain context automatically:\n\n```javascript\n// Context is preserved across calls\nawait client.callTool({ name: 'get_products', arguments: {...} });\nawait client.callTool({ name: 'list_creative_formats', arguments: {...} });\nawait client.callTool({ name: 'create_media_buy', arguments: {...} });\n```\n\n## A2A Integration\n\n### Setup\n\n```javascript\nimport { createA2AClient } from '@adcp/client';\n\nconst client = createA2AClient({\n  agentUrl: 'https://agent.example.com',\n  agentId: 'sales-agent-001',\n  auth: {\n    apiKey: 'your-api-key'\n  }\n});\n```\n\n### Making Requests\n\n```javascript\n// A2A uses call_adcp_agent wrapper\nconst result = await client.executeTask({\n  task: 'get_products',\n  params: {\n    brief: 'Display advertising for tech startup',\n    brand_manifest: {\n      url: 'https://startup.com'\n    }\n  }\n});\n\n// Response includes agent card and task result\nconsole.log(result.agent_card);\nconsole.log(result.task_result.products);\n```\n\n### Agent Cards\n\nA2A agents expose metadata via agent cards:\n\n```javascript\n// Fetch agent card\nconst card = await client.getAgentCard();\n\nconsole.log(card.name);                    // Agent name\nconsole.log(card.description);             // Agent description\nconsole.log(card.capabilities);            // Supported protocols\nconsole.log(card.portfolio.publishers);    // Publisher portfolio\n```\n\n### Streaming Responses (SSE)\n\nA2A supports streaming for long-running operations:\n\n```javascript\nconst stream = await client.executeTaskStream({\n  task: 'create_media_buy',\n  params: {...}\n});\n\nfor await (const event of stream) {\n  if (event.type === 'status') {\n    console.log(`Status: ${event.status}`);\n  } else if (event.type === 'progress') {\n    console.log(`Progress: ${event.percent}%`);\n  } else if (event.type === 'complete') {\n    console.log('Campaign created:', event.result);\n  }\n}\n```\n\n## Unified Status System\n\nBoth protocols use the same status system for task responses:\n\n```typescript\n{\n  status: \"completed\" | \"pending\" | \"failed\";\n  \n  // If completed\n  data?: {...};\n  \n  // If pending\n  task_id?: string;\n  estimated_completion?: string;\n  \n  // If failed\n  error?: {\n    code: string;\n    message: string;\n    field?: string;\n  };\n}\n```\n\n### Handling Pending Operations\n\n```javascript\nasync function waitForCompletion(taskId, protocol) {\n  let status = 'pending';\n  \n  while (status === 'pending') {\n    await sleep(5000);  // Wait 5 seconds\n    \n    if (protocol === 'mcp') {\n      const result = await mcpClient.callTool({\n        name: 'get_task_status',\n        arguments: { task_id: taskId }\n      });\n      status = result.status;\n    } else {\n      const result = await a2aClient.executeTask({\n        task: 'get_task_status',\n        params: { task_id: taskId }\n      });\n      status = result.task_result.status;\n    }\n  }\n  \n  return status;\n}\n```\n\n## Authentication\n\n### MCP Authentication\n\n```javascript\n// Bearer token in header\nconst client = createMCPClient({\n  url: 'https://agent.example.com/mcp',\n  auth: {\n    type: 'bearer',\n    token: 'your-auth-token'\n  }\n});\n\n// JWT authentication\nconst client = createMCPClient({\n  url: 'https://agent.example.com/mcp',\n  auth: {\n    type: 'jwt',\n    token: 'your-jwt-token'\n  }\n});\n```\n\n### A2A Authentication\n\n```javascript\n// API key\nconst client = createA2AClient({\n  agentUrl: 'https://agent.example.com',\n  auth: {\n    apiKey: 'your-api-key'\n  }\n});\n\n// OAuth\nconst client = createA2AClient({\n  agentUrl: 'https://agent.example.com',\n  auth: {\n    type: 'oauth',\n    accessToken: 'your-access-token'\n  }\n});\n```\n\n## Error Handling\n\n### MCP Errors\n\n```javascript\ntry {\n  const result = await mcpClient.callTool({\n    name: 'create_media_buy',\n    arguments: {...}\n  });\n} catch (error) {\n  if (error.code === 'VALIDATION_ERROR') {\n    console.error(`Validation error: ${error.message}`);\n    console.error(`Field: ${error.field}`);\n  } else if (error.code === 'UNAUTHORIZED') {\n    console.error('Authentication failed');\n  } else {\n    console.error(`Error: ${error.message}`);\n  }\n}\n```\n\n### A2A Errors\n\n```javascript\nconst result = await a2aClient.executeTask({\n  task: 'create_media_buy',\n  params: {...}\n});\n\nif (result.status === 'failed') {\n  console.error(`Error: ${result.error.message}`);\n  console.error(`Code: ${result.error.code}`);\n  if (result.error.field) {\n    console.error(`Field: ${result.error.field}`);\n  }\n}\n```\n\n## Best Practices\n\n### 1. Start with Capabilities\n\nAlways call `get_adcp_capabilities` first, regardless of protocol:\n\n```javascript\n// MCP\nconst caps = await mcpClient.callTool({\n  name: 'get_adcp_capabilities',\n  arguments: {}\n});\n\n// A2A\nconst caps = await a2aClient.executeTask({\n  task: 'get_adcp_capabilities',\n  params: {}\n});\n```\n\n### 2. Handle Async Operations\n\nBoth protocols support asynchronous operations. Design for pending states:\n\n```javascript\nconst result = await client.createMediaBuy(...);\n\nif (result.status === 'pending') {\n  console.log('Awaiting approval...');\n  // Poll or wait for webhook\n} else if (result.status === 'completed') {\n  console.log('Campaign created immediately');\n}\n```\n\n### 3. Use Appropriate Protocol\n\n- **MCP**: Simple AI assistant integrations\n- **A2A**: Complex workflows, agent collaboration\n\n### 4. Implement Retries\n\nBoth protocols benefit from retry logic:\n\n```javascript\nasync function retryOperation(fn, maxRetries = 3) {\n  for (let i = 0; i < maxRetries; i++) {\n    try {\n      return await fn();\n    } catch (error) {\n      if (i === maxRetries - 1) throw error;\n      await sleep(Math.pow(2, i) * 1000);  // Exponential backoff\n    }\n  }\n}\n```\n\n## OpenClaw Integration\n\n### Using AdCP with OpenClaw\n\nOpenClaw agents can use either protocol seamlessly:\n\n```javascript\n// In OpenClaw skill\nexport async function publishAd(brief, brandUrl) {\n  // Detect available protocol\n  const protocol = detectProtocol();\n  \n  if (protocol === 'mcp') {\n    return await publishViaMCP(brief, brandUrl);\n  } else {\n    return await publishViaA2A(brief, brandUrl);\n  }\n}\n\nfunction detectProtocol() {\n  // Check if MCP client is available\n  if (typeof mcpClient !== 'undefined') {\n    return 'mcp';\n  }\n  return 'a2a';\n}\n```\n\n### Test Agent Access\n\nBoth protocols work with the test agent:\n\n```javascript\n// MCP endpoint\nconst mcpUrl = 'https://test-agent.adcontextprotocol.org/mcp';\n\n// A2A endpoint\nconst a2aUrl = 'https://test-agent.adcontextprotocol.org';\n\n// Auth token (same for both)\nconst authToken = '1v8tAhASaUYYp4odoQ1PnMpdqNaMiTrCRqYo9OJp6IQ';\n```\n\n## Summary\n\n| Aspect | MCP | A2A |\n|--------|-----|-----|\n| **Use Case** | AI assistants | Agent workflows |\n| **Complexity** | Simpler | More features |\n| **Format** | JSON-RPC | HTTP + JSON |\n| **Tasks** | Same 8 tasks | Same 8 tasks |\n| **Auth** | Bearer token | API key |\n| **Streaming** | Limited | Full SSE support |\n| **Artifacts** | No | Yes (agent cards) |\n\n**Key Takeaway**: The advertising functionality is identical. Choose based on your integration environment.\n\n## Additional Resources\n\n### Official AdCP Protocol Documentation\n- **Protocol Comparison**: https://docs.adcontextprotocol.org/docs/building/understanding/protocol-comparison\n- **MCP Integration Guide**: https://docs.adcontextprotocol.org/docs/building/integration/mcp-guide\n- **A2A Integration Guide**: https://docs.adcontextprotocol.org/docs/building/integration/a2a-guide\n- **Authentication Guide**: https://docs.adcontextprotocol.org/docs/building/integration/authentication\n- **Main Documentation**: https://docs.adcontextprotocol.org\n- **Complete Index**: https://docs.adcontextprotocol.org/llms.txt\n\nFile v1.0.0:QUICKREF.md\n\n# AdCP Quick Reference Card\n\nFast reference for common AdCP operations. Keep this handy when working with advertising campaigns.\n\n**Official AdCP Documentation**: https://docs.adcontextprotocol.org  \n**Quick Reference**: https://docs.adcontextprotocol.org/docs/media-buy/quick-reference  \n**Complete Index**: https://docs.adcontextprotocol.org/llms.txt\n\n## 🚀 Getting Started (30 seconds)\n\n```javascript\n// 1. Check what agent supports\nawait agent.getAdcpCapabilities({});\n\n// 2. Find products\nawait agent.getProducts({\n  brief: 'Display ads for tech startup',\n  brand_manifest: { url: 'https://brand.com' }\n});\n\n// 3. Create campaign\nawait agent.createMediaBuy({\n  buyer_ref: 'campaign-001',\n  brand_manifest: { url: 'https://brand.com' },\n  packages: [{\n    buyer_ref: 'pkg-001',\n    product_id: 'product_id_from_step_2',\n    pricing_option_id: 'pricing_option_from_step_2',\n    budget: 10000\n  }],\n  start_time: { type: 'asap' },\n  end_time: '2026-12-31T23:59:59Z'\n});\n```\n\n## 📋 The 8 Core Tasks\n\n| Task | Purpose | Time | Auth |\n|------|---------|------|------|\n| `get_adcp_capabilities` | Discover agent features | ~1s | No |\n| `get_products` | Find inventory | ~60s | Optional |\n| `list_creative_formats` | View format specs | ~1s | No |\n| `create_media_buy` | Launch campaign | Min-Days | Yes |\n| `update_media_buy` | Modify campaign | Min-Days | Yes |\n| `sync_creatives` | Upload assets | Min-Days | Yes |\n| `list_creatives` | Query library | ~1s | Yes |\n| `get_media_buy_delivery` | Track performance | ~60s | Yes |\n\n## 🎯 Common Workflows\n\n### Launch Campaign\n```javascript\n1. getAdcpCapabilities()    // Check features\n2. getProducts()             // Find inventory\n3. listCreativeFormats()     // Check requirements\n4. createMediaBuy()          // Launch campaign\n5. syncCreatives()           // Upload assets\n6. getMediaBuyDelivery()     // Monitor\n```\n\n### Optimize Campaign\n```javascript\n1. getMediaBuyDelivery()     // Get performance\n2. Analyze metrics           // Find opportunities\n3. updateMediaBuy()          // Adjust budget/targeting\n4. syncCreatives()           // Swap creatives (optional)\n5. getMediaBuyDelivery()     // Verify improvements\n```\n\n## 🔑 Key Concepts\n\n### Status Values\n- `completed` - Operation finished\n- `pending` - Awaiting approval\n- `failed` - Operation failed (check error)\n\n### Brand Manifest\n```javascript\n// URL reference (recommended)\n{ brand_manifest: { url: 'https://brand.com' } }\n\n// Inline (full details)\n{\n  brand_manifest: {\n    name: 'Brand Name',\n    url: 'https://brand.com',\n    tagline: 'Brand tagline',\n    colors: { primary: '#FF0000' }\n  }\n}\n```\n\n### Format ID\n```javascript\n{\n  format_id: {\n    agent_url: 'https://creative.adcontextprotocol.org',\n    id: 'display_300x250'\n  }\n}\n```\n\n## 🎨 Creative Formats\n\n### Display\n- `display_300x250` - Medium Rectangle\n- `display_728x90` - Leaderboard\n- `display_160x600` - Wide Skyscraper\n- `display_300x600` - Half Page\n\n### Video\n- `video_standard_15s` - 15 second\n- `video_standard_30s` - 30 second\n- `video_standard_60s` - 60 second\n\n## 🎯 Targeting\n\n```javascript\ntargeting_overlay: {\n  geo: {\n    included: ['US-CA', 'US-NY'],\n    excluded: []\n  },\n  demographics: {\n    age_ranges: [{ min: 25, max: 44 }],\n    genders: ['M', 'F']\n  },\n  behavioral: {\n    interests: ['technology'],\n    purchase_intent: ['software']\n  },\n  contextual: {\n    keywords: ['innovation'],\n    categories: ['IAB19']\n  }\n}\n```\n\n## 📊 Performance Metrics\n\n```javascript\nconst delivery = await agent.getMediaBuyDelivery({\n  media_buy_id: 'mb_abc123',\n  granularity: 'daily',\n  dimensions: ['package', 'creative']\n});\n\nconsole.log(delivery.delivery.impressions);  // Total impressions\nconsole.log(delivery.delivery.clicks);       // Total clicks\nconsole.log(delivery.delivery.ctr);          // Click-through rate\nconsole.log(delivery.delivery.spend);        // Amount spent\nconsole.log(delivery.delivery.cpm);          // Cost per thousand\nconsole.log(delivery.pacing.spend_pacing);   // Budget pacing %\n```\n\n## 🛠️ Common Operations\n\n### Pause Campaign\n```javascript\nawait agent.updateMediaBuy({\n  media_buy_id: 'mb_abc123',\n  updates: { status: 'paused' }\n});\n```\n\n### Increase Budget\n```javascript\nawait agent.updateMediaBuy({\n  media_buy_id: 'mb_abc123',\n  updates: { budget_change: 5000 }\n});\n```\n\n### Swap Creatives\n```javascript\nawait agent.syncCreatives({\n  creatives: [],\n  assignments: {\n    'new_creative': ['pkg-001'],\n    'old_creative': []\n  }\n});\n```\n\n### Check Pacing\n```javascript\nconst delivery = await agent.getMediaBuyDelivery({\n  media_buy_id: 'mb_abc123'\n});\n\nconst pacing = delivery.pacing.spend_pacing;\nconst timeProgress = delivery.pacing.percent_complete;\n\nif (Math.abs(pacing - timeProgress) > 0.15) {\n  console.log('⚠️ Campaign pacing is off');\n}\n```\n\n## 🧪 Test Agent\n\n**Quick test without setup:**\n\n```javascript\nimport { testAgent } from '@adcp/client/testing';\n\nconst result = await testAgent.getProducts({\n  brief: 'Test campaign',\n  brand_manifest: { url: 'https://example.com' }\n});\n```\n\n**Credentials:**\n- URL: `https://test-agent.adcontextprotocol.org/mcp`\n- Token: `1v8tAhASaUYYp4odoQ1PnMpdqNaMiTrCRqYo9OJp6IQ`\n- Testing: [testing.adcontextprotocol.org](https://testing.adcontextprotocol.org)\n\n## ⚠️ Common Errors\n\n### 400 Bad Request\n```javascript\n// Missing required field\n{ error: { code: 'VALIDATION_ERROR', message: 'budget required' } }\n```\n\n### 401 Unauthorized\n```javascript\n// Invalid/missing auth token\n{ error: { code: 'UNAUTHORIZED', message: 'Invalid token' } }\n```\n\n### 404 Not Found\n```javascript\n// Invalid ID reference\n{ error: { code: 'NOT_FOUND', message: 'Product not found' } }\n```\n\n## 💡 Pro Tips\n\n1. **Always start with capabilities** - Know what the agent supports\n2. **Check status** - Handle `pending` operations properly\n3. **Write detailed briefs** - Better briefs = better product matches\n4. **Validate formats** - Check creative specs before upload\n5. **Monitor pacing** - Regular delivery checks prevent issues\n6. **Test creatives** - A/B test everything\n7. **Start broad** - Narrow targeting based on data\n\n## 📚 Documentation\n\n### Official AdCP Documentation\n- **Main Docs**: https://docs.adcontextprotocol.org\n- **Complete Index (AI agents)**: https://docs.adcontextprotocol.org/llms.txt\n- **Media Buy Protocol**: https://docs.adcontextprotocol.org/docs/media-buy/\n- **Task Reference**: https://docs.adcontextprotocol.org/docs/media-buy/task-reference/\n- **Quick Reference**: https://docs.adcontextprotocol.org/docs/media-buy/quick-reference\n\n### This Skill's Documentation\n- **Full Docs**: [SKILL.md](SKILL.md)\n- **API Reference**: [REFERENCE.md](REFERENCE.md)\n- **Examples**: [EXAMPLES.md](EXAMPLES.md)\n- **Protocols**: [PROTOCOLS.md](PROTOCOLS.md)\n- **Targeting**: [TARGETING.md](TARGETING.md)\n- **Creatives**: [CREATIVE.md](CREATIVE.md)\n\n## 🆘 Quick Help\n\n**Need help?**\n- **Official Docs**: https://docs.adcontextprotocol.org\n- **Interactive Testing**: https://testing.adcontextprotocol.org\n- **Complete API (AI agents)**: https://docs.adcontextprotocol.org/llms.txt\n\n---\n\n**Print this card** or keep it open in a tab for quick reference while working with AdCP!\n\nFile v1.0.0:REFERENCE.md\n\n# AdCP Task Reference\n\nComplete API reference for all AdCP Media Buy Protocol tasks.\n\n**Official AdCP Documentation**: https://docs.adcontextprotocol.org  \n**Media Buy Task Reference**: https://docs.adcontextprotocol.org/docs/media-buy/task-reference/  \n**Complete Documentation Index**: https://docs.adcontextprotocol.org/llms.txt\n\nThis document provides detailed reference for implementing AdCP tasks. For the official specification and latest updates, always refer to the [official AdCP documentation](https://docs.adcontextprotocol.org).\n\n## Table of Contents\n\n1. [get_adcp_capabilities](#get_adcp_capabilities)\n2. [get_products](#get_products)\n3. [list_creative_formats](#list_creative_formats)\n4. [create_media_buy](#create_media_buy)\n5. [update_media_buy](#update_media_buy)\n6. [sync_creatives](#sync_creatives)\n7. [list_creatives](#list_creatives)\n8. [get_media_buy_delivery](#get_media_buy_delivery)\n\n---\n\n## get_adcp_capabilities\n\n**Purpose**: Discover agent capabilities, portfolio, and supported features. **Always start here** when working with a new agent.\n\n**Response Time**: ~1 second\n\n**Authentication**: Not required (public endpoint)\n\n### Request Schema\n\n```typescript\n{} // No parameters required\n```\n\n### Response Schema\n\n```typescript\n{\n  adcp: {\n    major_versions: string[];           // Supported AdCP versions (e.g., [\"3\"])\n    implementation_version: string;     // Agent implementation version\n    agent_name: string;                 // Human-readable agent name\n    agent_url: string;                  // Agent base URL\n  };\n  \n  supported_protocols: string[];        // [\"media_buy\", \"signals\", \"governance\", etc.]\n  \n  media_buy?: {\n    portfolio: {\n      publishers: string[];             // Publisher domains (e.g., [\"nytimes.com\"])\n      primary_channels: string[];       // Main channels (e.g., [\"display\", \"video\"])\n      primary_countries: string[];      // Main markets (e.g., [\"US\", \"CA\"])\n    };\n    \n    execution: {\n      geo_targeting: {\n        supported_types: string[];      // [\"dma\", \"zip\", \"state\", \"country\"]\n        coverage: string[];             // Geographic coverage codes\n      };\n      \n      axe_integrations?: {              // Real-time execution capabilities\n        brand_safety: boolean;\n        frequency_capping: boolean;\n        dynamic_audience: boolean;\n      };\n    };\n    \n    supported_channels: string[];       // All supported channels\n    supported_format_types: string[];   // Creative format types\n    supports_guaranteed: boolean;       // Supports guaranteed inventory\n    supports_non_guaranteed: boolean;   // Supports programmatic inventory\n  };\n  \n  signals?: {\n    signal_types: string[];             // Supported signal types\n  };\n  \n  governance?: {\n    property_lists: boolean;            // Property list support\n    content_standards: boolean;         // Content standards support\n  };\n  \n  sponsored_intelligence?: {\n    offering_types: string[];           // SI offering types\n  };\n}\n```\n\n### Example Request\n\n```javascript\nconst capabilities = await agent.getAdcpCapabilities({});\n\nconsole.log(capabilities.media_buy.portfolio);\n// {\n//   publishers: [\"nytimes.com\", \"washingtonpost.com\"],\n//   primary_channels: [\"display\", \"video\", \"native\"],\n//   primary_countries: [\"US\", \"CA\", \"GB\"]\n// }\n\nconsole.log(capabilities.media_buy.execution.geo_targeting);\n// {\n//   supported_types: [\"dma\", \"state\", \"country\"],\n//   coverage: [\"US\", \"CA\"]\n// }\n```\n\n### Use Cases\n\n- **Initial discovery**: Understand agent capabilities before making requests\n- **Feature detection**: Check if specific features are supported\n- **Portfolio matching**: Verify agent covers your target markets\n- **Format validation**: Confirm creative format support\n\n---\n\n## get_products\n\n**Purpose**: Discover advertising inventory using natural language briefs.\n\n**Response Time**: ~60 seconds (involves AI/LLM processing)\n\n**Authentication**: Optional (limited results without auth, full catalog with auth)\n\n### Request Schema\n\n```typescript\n{\n  brief: string;                        // Natural language campaign description\n  \n  brand_manifest: {                     // Brand context\n    url?: string;                       // Brand URL (agent fetches info)\n    name?: string;                      // Brand name\n    tagline?: string;                   // Brand tagline\n    colors?: {                          // Brand colors\n      primary?: string;\n      secondary?: string;\n    };\n    logo?: {\n      url?: string;\n    };\n    // ... additional brand fields\n  };\n  \n  filters?: {\n    channels?: string[];                // Filter by channel (e.g., [\"display\", \"video\"])\n    budget_range?: {\n      min?: number;\n      max?: number;\n    };\n    delivery_type?: string;             // \"guaranteed\" | \"non-guaranteed\"\n    format_types?: string[];            // Filter by format type\n    start_date?: string;                // ISO 8601 date\n    end_date?: string;                  // ISO 8601 date\n  };\n}\n```\n\n### Response Schema\n\n```typescript\n{\n  products: Array<{\n    product_id: string;                 // Unique product identifier\n    name: string;                       // Human-readable product name\n    description: string;                // Product description\n    \n    channels: string[];                 // Supported channels\n    delivery_type: string;              // \"guaranteed\" | \"non-guaranteed\"\n    \n    pricing_options: Array<{\n      pricing_option_id: string;        // Use in create_media_buy\n      pricing_model: string;            // \"cpm\", \"cpm-auction\", \"flat-fee\", etc.\n      price?: number;                   // Base price (for fixed pricing)\n      floor?: number;                   // Minimum bid (for auction)\n      currency: string;                 // \"USD\", \"EUR\", etc.\n    }>;\n    \n    format_ids: Array<{                 // Supported creative formats\n      agent_url: string;\n      id: string;\n    }>;\n    \n    targeting?: {                       // Available targeting options\n      geo?: {\n        supported_types: string[];\n        available_codes: string[];\n      };\n      demographics?: {\n        age_ranges: boolean;\n        genders: boolean;\n        income_brackets: boolean;\n      };\n      behavioral?: {\n        interests: string[];\n        purchase_intent: string[];\n      };\n      contextual?: {\n        keywords: boolean;\n        categories: string[];\n      };\n    };\n    \n    inventory_estimate?: {              // Estimated reach\n      min_impressions?: number;\n      max_impressions?: number;\n      audience_size?: number;\n    };\n    \n    requirements?: {                    // Product requirements\n      min_budget?: number;\n      min_duration_days?: number;\n      creative_review_required?: boolean;\n      brand_safety_review?: boolean;\n    };\n  }>;\n  \n  total_count: number;                  // Total matching products\n  has_more: boolean;                    // More results available\n}\n```\n\n### Example Requests\n\n**Basic product discovery**:\n```javascript\nconst result = await agent.getProducts({\n  brief: 'Premium video inventory for luxury automotive brand',\n  brand_manifest: {\n    url: 'https://lexus.com'\n  }\n});\n\nresult.products.forEach(product => {\n  console.log(`${product.name}: ${product.description}`);\n  console.log(`Channels: ${product.channels.join(', ')}`);\n  console.log(`Pricing: ${JSON.stringify(product.pricing_options)}`);\n});\n```\n\n**Filtered discovery**:\n```javascript\nconst result = await agent.getProducts({\n  brief: 'Tech startup brand awareness campaign targeting developers',\n  brand_manifest: {\n    name: 'Acme Corp',\n    url: 'https://acme.com',\n    tagline: 'Building the future of cloud infrastructure'\n  },\n  filters: {\n    channels: ['display', 'video'],\n    budget_range: { min: 10000, max: 50000 },\n    delivery_type: 'guaranteed',\n    start_date: '2026-02-01',\n    end_date: '2026-03-31'\n  }\n});\n```\n\n### Brief Writing Best Practices\n\nWrite detailed, specific briefs for better matches:\n\n**Good briefs**:\n- \"Premium video inventory for luxury automotive brand targeting high-income professionals aged 35-54 in major metros. Focus on brand awareness with completion rates above 70%.\"\n- \"Display and native advertising for DTC fashion brand launching spring collection. Target women 25-40 interested in sustainable fashion. Need viewability above 80%.\"\n- \"Connected TV campaign for streaming service targeting cord-cutters and millennials. Geographic focus on top 20 DMAs. Minimum 30-second completion required.\"\n\n**Avoid vague briefs**:\n- \"video ads\"\n- \"need advertising\"\n- \"display campaign\"\n\nInclude in briefs:\n1. **Channel preferences** (display, video, CTV, audio, etc.)\n2. **Target audience** (demographics, interests, behaviors)\n3. **Campaign goals** (awareness, consideration, conversion)\n4. **Geographic focus** (markets, regions, DMAs)\n5. **Performance expectations** (completion rates, viewability, etc.)\n\n---\n\n## list_creative_formats\n\n**Purpose**: View supported creative format specifications.\n\n**Response Time**: ~1 second\n\n**Authentication**: Not required (public endpoint)\n\n### Request Schema\n\n```typescript\n{\n  format_types?: string[];              // Filter to specific types (e.g., [\"video\", \"display\"])\n  channels?: string[];                  // Filter by channel\n  limit?: number;                       // Max results to return\n}\n```\n\n### Response Schema\n\n```typescript\n{\n  formats: Array<{\n    format_id: {\n      agent_url: string;                // Creative agent URL\n      id: string;                       // Format identifier\n    };\n    \n    name: string;                       // Human-readable name\n    description?: string;               // Format description\n    \n    format_type: string;                // \"video\", \"display\", \"audio\", etc.\n    channels: string[];                 // Applicable channels\n    \n    specifications: {\n      // For display/image formats\n      width?: number;\n      height?: number;\n      max_file_size_kb?: number;\n      aspect_ratio?: string;\n      \n      // For video formats\n      duration_ms?: number;\n      min_duration_ms?: number;\n      max_duration_ms?: number;\n      video_codec?: string[];\n      audio_codec?: string[];\n      \n      // For audio formats\n      audio_duration_ms?: number;\n      audio_bitrate_kbps?: number;\n      \n      // Common specs\n      supported_mime_types?: string[];\n      max_bitrate_kbps?: number;\n    };\n    \n    asset_schema: {                     // Required assets structure\n      [key: string]: {\n        type: string;                   // \"video\", \"image\", \"html\", etc.\n        required: boolean;\n        description?: string;\n      };\n    };\n  }>;\n  \n  total_count: number;\n}\n```\n\n### Example Request\n\n```javascript\nconst formats = await agent.listCreativeFormats({\n  format_types: ['video', 'display']\n});\n\nformats.formats.forEach(format => {\n  console.log(`${format.name} (${format.format_id.id})`);\n  console.log(`Specs: ${JSON.stringify(format.specifications)}`);\n  console.log(`Assets: ${Object.keys(format.asset_schema).join(', ')}`);\n});\n```\n\n### Standard Format IDs\n\nCommon IAB standard formats from `https://creative.adcontextprotocol.org`:\n\n**Display**:\n- `display_300x250` - Medium Rectangle\n- `display_728x90` - Leaderboard\n- `display_160x600` - Wide Skyscraper\n- `display_300x600` - Half Page\n- `display_970x250` - Billboard\n\n**Video**:\n- `video_standard_15s` - 15 second pre-roll\n- `video_standard_30s` - 30 second pre-roll\n- `video_standard_60s` - 60 second mid-roll\n\n**Native**:\n- `native_standard` - Standard native ad unit\n\n---\n\n## create_media_buy\n\n**Purpose**: Create an advertising campaign from selected products.\n\n**Response Time**: Minutes to days (may require human approval)\n\n**Authentication**: Required\n\n### Request Schema\n\n```typescript\n{\n  buyer_ref: string;                    // Your unique campaign identifier\n  \n  brand_manifest: {                     // Brand context (URL or inline)\n    url?: string;\n    name?: string;\n    // ... full brand manifest fields\n  };\n  \n  packages: Array<{\n    buyer_ref: string;                  // Your unique package identifier\n    product_id: string;                 // From get_products response\n    pricing_option_id: string;          // From product's pricing_options\n    \n    budget: number;                     // Package budget in dollars\n    bid_price?: number;                 // Required for auction pricing\n    \n    targeting_overlay?: {               // Additional targeting constraints\n      geo?: {\n        included?: string[];            // DMA/region codes to include\n        excluded?: string[];            // DMA/region codes to exclude\n      };\n      demographics?: {\n        age_ranges?: Array<{\n          min?: number;\n          max?: number;\n        }>;\n        genders?: string[];             // [\"M\", \"F\", \"O\"]\n        income_brackets?: string[];\n      };\n      behavioral?: {\n        interests?: string[];\n        purchase_intent?: string[];\n      };\n      contextual?: {\n        keywords?: string[];\n        categories?: string[];          // IAB categories\n      };\n    };\n    \n    creative_ids?: string[];            // Assign existing creatives\n    creatives?: Array<{                 // Inline creative definitions\n      creative_id: string;\n      format_id: {\n        agent_url: string;\n        id: string;\n      };\n      assets: object;                   // Format-specific assets\n    }>;\n    \n    frequency_cap?: {\n      impressions: number;\n      time_unit: string;                // \"hour\", \"day\", \"week\"\n      time_count: number;\n    };\n  }>;\n  \n  start_time: {\n    type: \"asap\" | \"scheduled\";\n    datetime?: string;                  // ISO 8601 (if scheduled)\n  };\n  \n  end_time: string;                     // ISO 8601 datetime\n  \n  optimization_goal?: string;           // \"impressions\", \"clicks\", \"conversions\"\n  pacing?: string;                      // \"even\", \"asap\"\n}\n```\n\n### Response Schema\n\n```typescript\n{\n  media_buy_id: string;                 // Created campaign identifier\n  status: string;                       // \"pending\", \"active\", \"rejected\", etc.\n  \n  packages: Array<{\n    package_id: string;                 // Created package identifier\n    buyer_ref: string;                  // Your package reference\n    status: string;\n  }>;\n  \n  created_at: string;                   // ISO 8601 timestamp\n  \n  // If status is \"pending\"\n  task_id?: string;                     // For tracking approval status\n  approval_url?: string;                // Human approval URL (if required)\n  estimated_approval_time_hours?: number;\n  \n  // If status is \"rejected\"\n  rejection_reasons?: Array<{\n    field?: string;\n    message: string;\n    code: string;\n  }>;\n}\n```\n\n### Example Requests\n\n**Basic campaign creation**:\n```javascript\nconst campaign = await agent.createMediaBuy({\n  buyer_ref: 'campaign-2026-q1-tech-launch',\n  brand_manifest: {\n    url: 'https://startup.com'\n  },\n  packages: [\n    {\n      buyer_ref: 'pkg-display-001',\n      product_id: 'premium_display',\n      pricing_option_id: 'cpm-standard',\n      budget: 10000\n    }\n  ],\n  start_time: { type: 'asap' },\n  end_time: '2026-03-31T23:59:59Z'\n});\n\nconsole.log(`Campaign ID: ${campaign.media_buy_id}`);\nconsole.log(`Status: ${campaign.status}`);\n\nif (campaign.status === 'pending') {\n  console.log(`Approval required. Task ID: ${campaign.task_id}`);\n}\n```\n\n**Campaign with targeting and creatives**:\n```javascript\nconst campaign = await agent.createMediaBuy({\n  buyer_ref: 'campaign-luxury-auto-q1',\n  brand_manifest: {\n    url: 'https://lexus.com',\n    name: 'Lexus'\n  },\n  packages: [\n    {\n      buyer_ref: 'pkg-video-premium',\n      product_id: 'premium_video_30s',\n      pricing_option_id: 'cpm-auction',\n      budget: 50000,\n      bid_price: 25.00,\n      \n      targeting_overlay: {\n        geo: {\n          included: ['US-CA', 'US-NY', 'US-FL'],\n          excluded: []\n        },\n        demographics: {\n          age_ranges: [{ min: 35, max: 54 }],\n          genders: ['M', 'F'],\n          income_brackets: ['100k+']\n        },\n        behavioral: {\n          interests: ['luxury_automotive', 'technology'],\n          purchase_intent: ['automotive']\n        }\n      },\n      \n      creatives: [\n        {\n          creative_id: 'lexus_es_30s_v1',\n          format_id: {\n            agent_url: 'https://creative.adcontextprotocol.org',\n            id: 'video_standard_30s'\n          },\n          assets: {\n            video: {\n              url: 'https://cdn.lexus.com/ads/es_30s.mp4',\n              width: 1920,\n              height: 1080,\n              duration_ms: 30000\n            }\n          }\n        }\n      ],\n      \n      frequency_cap: {\n        impressions: 3,\n        time_unit: 'day',\n        time_count: 1\n      }\n    }\n  ],\n  start_time: {\n    type: 'scheduled',\n    datetime: '2026-02-01T00:00:00Z'\n  },\n  end_time: '2026-03-31T23:59:59Z',\n  optimization_goal: 'impressions',\n  pacing: 'even'\n});\n```\n\n### Important Notes\n\n1. **Status handling**: Always check `status` field. `pending` means awaiting approval.\n2. **Buyer references**: Use descriptive, unique values for tracking\n3. **Targeting is additive**: Your overlay + product targeting = final targeting\n4. **Creative validation**: Ensure creatives match format requirements\n5. **Budget minimums**: Check product `requirements.min_budget`\n6. **Auction pricing**: Must include `bid_price` for auction pricing models\n\n---\n\n## update_media_buy\n\n**Purpose**: Modify an existing campaign (budget, targeting, status, etc.).\n\n**Response Time**: Minutes to days (may require human approval)\n\n**Authentication**: Required\n\n### Request Schema\n\n```typescript\n{\n  media_buy_id: string;                 // Campaign to update\n  \n  updates: {\n    status?: string;                    // \"active\", \"paused\", \"cancelled\"\n    \n    budget_change?: number;             // Add/subtract from total budget\n    end_time?: string;                  // Extend/shorten campaign\n    \n    targeting?: {                       // Update targeting (replaces existing)\n      geo?: object;\n      demographics?: object;\n      behavioral?: object;\n      contextual?: object;\n    };\n    \n    optimization_goal?: string;         // Change optimization\n    pacing?: string;                    // Change pacing strategy\n    \n    package_updates?: Array<{\n      package_id: string;\n      budget_change?: number;\n      status?: string;\n      targeting_overlay?: object;\n      creative_ids?: string[];          // Reassign creatives\n    }>;\n  };\n}\n```\n\n### Response Schema\n\n```typescript\n{\n  media_buy_id: string;\n  status: string;                       // Current campaign status\n  \n  updated_at: string;                   // ISO 8601 timestamp\n  \n  // If update requires approval\n  task_id?: string;\n  approval_url?: string;\n  \n  // If update was rejected\n  rejection_reasons?: Array<{\n    field?: string;\n    message: string;\n    code: string;\n  }>;\n}\n```\n\n### Example Requests\n\n**Pause campaign**:\n```javascript\nawait agent.updateMediaBuy({\n  media_buy_id: 'mb_abc123',\n  updates: {\n    status: 'paused'\n  }\n});\n```\n\n**Increase budget**:\n```javascript\nawait agent.updateMediaBuy({\n  media_buy_id: 'mb_abc123',\n  updates: {\n    budget_change: 5000  // Add $5000 to campaign\n  }\n});\n```\n\n**Extend campaign and update targeting**:\n```javascript\nawait agent.updateMediaBuy({\n  media_buy_id: 'mb_abc123',\n  updates: {\n    end_time: '2026-04-30T23:59:59Z',\n    targeting: {\n      geo: {\n        included: ['US-CA', 'US-NY', 'US-TX']  // Add Texas\n      }\n    }\n  }\n});\n```\n\n**Update specific package**:\n```javascript\nawait agent.updateMediaBuy({\n  media_buy_id: 'mb_abc123',\n  updates: {\n    package_updates: [\n      {\n        package_id: 'pkg_xyz789',\n        budget_change: 2500,\n        creative_ids: ['creative_001', 'creative_002']  // Swap creatives\n      }\n    ]\n  }\n});\n```\n\n---\n\n## sync_creatives\n\n**Purpose**: Upload and synchronize creative assets with the agent.\n\n**Response Time**: Minutes to days (may require review/approval)\n\n**Authentication**: Required\n\n### Request Schema\n\n```typescript\n{\n  creatives: Array<{\n    creative_id: string;                // Your unique creative identifier\n    name: string;                       // Human-readable name\n    \n    format_id: {\n      agent_url: string;\n      id: string;\n    };\n    \n    assets: {                           // Format-specific asset structure\n      video?: {\n        url: string;\n        width: number;\n        height: number;\n        duration_ms: number;\n        mime_type?: string;\n      };\n      image?: {\n        url: string;\n        width: number;\n        height: number;\n        mime_type?: string;\n      };\n      html?: {\n        content: string;\n        width: number;\n        height: number;\n      };\n      // ... other asset types\n    };\n    \n    click_through_url?: string;\n    tracking_pixels?: string[];\n    \n    status?: string;                    // \"active\", \"archived\"\n  }>;\n  \n  assignments?: {                       // Map creative_id to package IDs\n    [creative_id: string]: string[];\n  };\n  \n  dry_run?: boolean;                    // Preview changes without applying\n  delete_missing?: boolean;             // Archive creatives not in this sync\n}\n```\n\n### Response Schema\n\n```typescript\n{\n  synced_creatives: Array<{\n    creative_id: string;\n    status: string;                     // \"synced\", \"pending_review\", \"rejected\"\n    \n    // If pending review\n    task_id?: string;\n    review_url?: string;\n    \n    // If rejected\n    rejection_reasons?: Array<{\n      field?: string;\n      message: string;\n      code: string;\n    }>;\n  }>;\n  \n  assignments_updated: boolean;\n  deleted_creatives?: string[];         // IDs of archived creatives\n}\n```\n\n### Example Requests\n\n**Upload video creative**:\n```javascript\nawait agent.syncCreatives({\n  creatives: [\n    {\n      creative_id: 'brand_hero_30s',\n      name: 'Brand Hero Video 30s',\n      format_id: {\n        agent_url: 'https://creative.adcontextprotocol.org',\n        id: 'video_standard_30s'\n      },\n      assets: {\n        video: {\n          url: 'https://cdn.brand.com/hero_30s.mp4',\n          width: 1920,\n          height: 1080,\n          duration_ms: 30000,\n          mime_type: 'video/mp4'\n        }\n      },\n      click_through_url: 'https://brand.com/products',\n      tracking_pixels: [\n        'https://analytics.brand.com/pixel?id=123'\n      ]\n    }\n  ]\n});\n```\n\n**Upload and assign to packages**:\n```javascript\nawait agent.syncCreatives({\n  creatives: [\n    {\n      creative_id: 'display_300x250_v1',\n      name: 'Display Banner 300x250',\n      format_id: {\n        agent_url: 'https://creative.adcontextprotocol.org',\n        id: 'display_300x250'\n      },\n      assets: {\n        image: {\n          url: 'https://cdn.brand.com/banner.jpg',\n          width: 300,\n          height: 250,\n          mime_type: 'image/jpeg'\n        }\n      }\n    },\n    {\n      creative_id: 'display_728x90_v1',\n      name: 'Display Leaderboard 728x90',\n      format_id: {\n        agent_url: 'https://creative.adcontextprotocol.org',\n        id: 'display_728x90'\n      },\n      assets: {\n        image: {\n          url: 'https://cdn.brand.com/leaderboard.jpg',\n          width: 728,\n          height: 90,\n          mime_type: 'image/jpeg'\n        }\n      }\n    }\n  ],\n  assignments: {\n    'display_300x250_v1': ['pkg-001', 'pkg-002'],\n    'display_728x90_v1': ['pkg-001']\n  }\n});\n```\n\n**Dry run to preview changes**:\n```javascript\nconst preview = await agent.syncCreatives({\n  creatives: [...],\n  assignments: {...},\n  dry_run: true  // Preview without applying\n});\n\nconsole.log(`Would sync ${preview.synced_creatives.length} creatives`);\n```\n\n---\n\n## list_creatives\n\n**Purpose**: Query the creative library with filtering and search.\n\n**Response Time**: ~1 second\n\n**Authentication**: Required\n\n### Request Schema\n\n```typescript\n{\n  filters?: {\n    status?: string[];                  // [\"active\", \"archived\"]\n    format_types?: string[];            // [\"video\", \"display\"]\n    creative_ids?: string[];            // Specific IDs to fetch\n    search?: string;                    // Text search in name/description\n  };\n  \n  sort_by?: string;                     // \"created_at\", \"name\", \"updated_at\"\n  sort_order?: string;                  // \"asc\", \"desc\"\n  \n  limit?: number;                       // Max results (default 50)\n  offset?: number;                      // Pagination offset\n}\n```\n\n### Response Schema\n\n```typescript\n{\n  creatives: Array<{\n    creative_id: string;\n    name: string;\n    status: string;\n    \n    format_id: {\n      agent_url: string;\n      id: string;\n    };\n    \n    format_type: string;                // \"video\", \"display\", etc.\n    \n    thumbnail_url?: string;             // Preview thumbnail\n    \n    created_at: string;                 // ISO 8601\n    updated_at: string;\n    \n    assigned_packages?: string[];       // Package IDs using this creative\n    \n    performance_summary?: {             // Aggregate performance\n      impressions: number;\n      clicks: number;\n      ctr: number;\n    };\n  }>;\n  \n  total_count: number;\n  has_more: boolean;\n}\n```\n\n### Example Requests\n\n**List all active video creatives**:\n```javascript\nconst result = await agent.listCreatives({\n  filters: {\n    status: ['active'],\n    format_types: ['video']\n  },\n  sort_by: 'created_at',\n  sort_order: 'desc',\n  limit: 20\n});\n\nresult.creatives.forEach(creative => {\n  console.log(`${creative.name} (${creative.creative_id})`);\n  console.log(`  Format: ${creative.format_id.id}`);\n  console.log(`  Packages: ${creative.assigned_packages?.length || 0}`);\n});\n```\n\n**Search by name**:\n```javascript\nconst result = await agent.listCreatives({\n  filters: {\n    search: 'holiday campaign'\n  }\n});\n```\n\n**Paginate through all creatives**:\n```javascript\nlet offset = 0;\nconst limit = 50;\nlet hasMore = true;\n\nwhile (hasMore) {\n  const result = await agent.listCreatives({\n    limit,\n    offset\n  });\n  \n  // Process result.creatives\n  \n  hasMore = result.has_more;\n  offset += limit;\n}\n```\n\n---\n\n## get_media_buy_delivery\n\n**Purpose**: Retrieve performance metrics and delivery data for a campaign.\n\n**Response Time**: ~60 seconds (data aggregation required)\n\n**Authentication**: Required\n\n### Request Schema\n\n```typescript\n{\n  media_buy_id: string;                 // Campaign to query\n  \n  granularity?: string;                 // \"hourly\", \"daily\", \"total\"\n  \n  date_range?: {\n    start: string;                      // YYYY-MM-DD\n    end: string;                        // YYYY-MM-DD\n  };\n  \n  dimensions?: string[];                // [\"package\", \"creative\", \"geo\", \"device\"]\n  \n  metrics?: string[];                   // Specific metrics to fetch\n}\n```\n\n### Response Schema\n\n```typescript\n{\n  media_buy_id: string;\n  status: string;                       // Campaign status\n  \n  delivery: {\n    impressions: number;\n    clicks?: number;\n    conversions?: number;\n    \n    spend: number;                      // Amount spent\n    budget: number;                     // Total budget\n    \n    cpm?: number;                       // Cost per thousand\n    cpc?: number;                       // Cost per click\n    ctr?: number;                       // Click-through rate\n    \n    completion_rate?: number;           // Video completion rate\n    viewability_rate?: number;          // Viewability percentage\n    \n    start_time: string;                 // ISO 8601\n    end_time: string;\n  };\n  \n  by_package?: Array<{\n    package_id: string;\n    buyer_ref: string;\n    impressions: number;\n    spend: number;\n    // ... other metrics\n  }>;\n  \n  by_creative?: Array<{\n    creative_id: string;\n    impressions: number;\n    clicks?: number;\n    ctr?: number;\n    // ... other metrics\n  }>;\n  \n  by_geo?: Array<{\n    geo_code: string;                   // DMA/region code\n    impressions: number;\n    spend: number;\n  }>;\n  \n  timeseries?: Array<{\n    timestamp: string;                  // ISO 8601\n    impressions: number;\n    spend: number;\n    // ... other metrics\n  }>;\n  \n  pacing: {\n    days_elapsed: number;\n    days_total: number;\n    percent_complete: number;\n    \n    spend_pacing: number;               // % of budget spent\n    impression_pacing: number;          // % of impressions delivered\n  };\n}\n```\n\n### Example Requests\n\n**Get overall campaign performance**:\n```javascript\nconst delivery = await agent.getMediaBuyDelivery({\n  media_buy_id: 'mb_abc123'\n});\n\nconsole.log(`Campaign Status: ${delivery.status}`);\nconsole.log(`Impressions: ${delivery.delivery.impressions.toLocaleString()}`);\nconsole.log(`Spend: $${delivery.delivery.spend.toLocaleString()}`);\nconsole.log(`CPM: $${delivery.delivery.cpm?.toFixed(2)}`);\nconsole.log(`Budget pacing: ${(delivery.pacing.spend_pacing * 100).toFixed(1)}%`);\n```\n\n**Get daily breakdown**:\n```javascript\nconst delivery = await agent.getMediaBuyDelivery({\n  media_buy_id: 'mb_abc123',\n  granularity: 'daily',\n  date_range: {\n    start: '2026-01-01',\n    end: '2026-01-31'\n  }\n});\n\ndelivery.timeseries?.forEach(day => {\n  console.log(`${day.timestamp}: ${day.impressions} imps, $${day.spend}`);\n});\n```\n\n**Get performance by package and creative**:\n```javascript\nconst delivery = await agent.getMediaBuyDelivery({\n  media_buy_id: 'mb_abc123',\n  dimensions: ['package', 'creative']\n});\n\nconsole.log('Performance by Package:');\ndelivery.by_package?.forEach(pkg => {\n  console.log(`  ${pkg.buyer_ref}: ${pkg.impressions} imps, $${pkg.spend}`);\n});\n\nconsole.log('\\nPerformance by Creative:');\ndelivery.by_creative?.forEach(creative => {\n  console.log(`  ${creative.creative_id}: CTR ${(creative.ctr * 100).toFixed(2)}%`);\n});\n```\n\n**Monitor campaign pacing**:\n```javascript\nconst delivery = await agent.getMediaBuyDelivery({\n  media_buy_id: 'mb_abc123'\n});\n\nconst pacing = delivery.pacing;\nconsole.log(`Days ${pacing.days_elapsed} of ${pacing.days_total}`);\nconsole.log(`Campaign ${(pacing.percent_complete * 100).toFixed(1)}% complete`);\nconsole.log(`Budget ${(pacing.spend_pacing * 100).toFixed(1)}% spent`);\nconsole.log(`Impressions ${(pacing.impression_pacing * 100).toFixed(1)}% delivered`);\n\n// Alert if underpacing\nif (pacing.spend_pacing < pacing.percent_complete - 0.1) {\n  console.warn('⚠️ Campaign is underpacing - consider budget increase');\n}\n```\n\n---\n\n## Common Patterns\n\n### Pattern 1: Campaign Health Check\n\n```javascript\nasync function checkCampaignHealth(mediaBuyId) {\n  const delivery = await agent.getMediaBuyDelivery({\n    media_buy_id: mediaBuyId\n  });\n  \n  const issues = [];\n  \n  // Check pacing\n  const pacingDiff = delivery.pacing.spend_pacing - delivery.pacing.percent_complete;\n  if (Math.abs(pacingDiff) > 0.15) {\n    issues.push({\n      type: 'pacing',\n      severity: 'warning',\n      message: `Campaign pacing off by ${(pacingDiff * 100).toFixed(1)}%`\n    });\n  }\n  \n  // Check performance\n  if (delivery.delivery.ctr && delivery.delivery.ctr < 0.001) {\n    issues.push({\n      type: 'performance',\n      severity: 'warning',\n      message: `Low CTR: ${(delivery.delivery.ctr * 100).toFixed(3)}%`\n    });\n  }\n  \n  // Check viewability\n  if (delivery.delivery.viewability_rate && delivery.delivery.viewability_rate < 0.7) {\n    issues.push({\n      type: 'quality',\n      severity: 'error',\n      message: `Low viewability: ${(delivery.delivery.viewability_rate * 100).toFixed(1)}%`\n    });\n  }\n  \n  return {\n    status: delivery.status,\n    health: issues.length === 0 ? 'healthy' : 'needs_attention',\n    issues\n  };\n}\n```\n\n### Pattern 2: Budget Optimization\n\n```javascript\nasync function optimizeBudgetAllocation(mediaBuyId) {\n  const delivery = await agent.getMediaBuyDelivery({\n    media_buy_id: mediaBuyId,\n    dimensions: ['package']\n  });\n  \n  // Rank packages by performance\n  const ranked = delivery.by_package\n    ?.map(pkg => ({\n      ...pkg,\n      efficiency: pkg.impressions / pkg.spend\n    }))\n    .sort((a, b) => b.efficiency - a.efficiency);\n  \n  console.log('Top performing packages:');\n  ranked?.slice(0, 3).forEach((pkg, i) => {\n    console.log(`${i + 1}. ${pkg.buyer_ref}: ${pkg.efficiency.toFixed(0)} imps/$`);\n  });\n  \n  // Suggest reallocation\n  const topPackage = ranked?.[0];\n  const bottomPackage = ranked?.[ranked.length - 1];\n  \n  if (topPackage && bottomPackage) {\n    const efficiencyDiff = topPackage.efficiency / bottomPackage.efficiency;\n    if (efficiencyDiff > 2) {\n      console.log(`\\n💡 Consider reallocating budget from ${bottomPackage.buyer_ref} to ${topPackage.buyer_ref}`);\n    }\n  }\n}\n```\n\n### Pattern 3: Creative A/B Testing\n\n```javascript\nasync function analyzeCreativePerformance(mediaBuyId) {\n  const delivery = await agent.getMediaBuyDelivery({\n    media_buy_id: mediaBuyId,\n    dimensions: ['creative']\n  });\n  \n  if (!delivery.by_creative || delivery.by_creative.length < 2) {\n    console.log('Need at least 2 creatives for comparison');\n    return;\n  }\n  \n  // Find winner\n  const winner = delivery.by_creative.reduce((best, current) => {\n    const currentScore = (current.ctr || 0) * (current.completion_rate || 1);\n    const bestScore = (best.ctr || 0) * (best.completion_rate || 1);\n    return currentScore > bestScore ? current : best;\n  });\n  \n  console.log(`🏆 Winner: ${winner.creative_id}`);\n  console.log(`   CTR: ${(winner.ctr * 100).toFixed(2)}%`);\n  console.log(`   Completion: ${(winner.completion_rate * 100).toFixed(1)}%`);\n  \n  // Show all results\n  console.log('\\nAll creatives:');\n  delivery.by_creative\n    .sort((a, b) => (b.ctr || 0) - (a.ctr || 0))\n    .forEach(creative => {\n      const isWinner = creative.creative_id === winner.creative_id;\n      console.log(`${isWinner ? '  🏆' : '    '} ${creative.creative_id}: CTR ${(creative.ctr * 100).toFixed(2)}%`);\n    });\n}\n```\n\n---\n\n## Response Time Summary\n\n| Task | Response Time | Reason |\n| ------------------------ | --------------- | ----------------------------------------- |\n| `get_adcp_capabilities` | ~1s | Simple database lookup |\n| `list_creative_formats` | ~1s | Simple database lookup |\n| `list_creatives` | ~1s | Simple database query |\n| `get_products` | ~60s | AI/LLM processing for brief matching |\n| `get_media_buy_delivery` | ~60s | Data aggregation and metric calculation |\n| `create_media_buy` | Minutes-Days | May require human approval |\n| `update_media_buy` | Minutes-Days | May require human approval |\n| `sync_creatives` | Minutes-Days | Creative review and validation |\n\nAlways design for asynchronous operations and provide appropriate user feedback during processing.\n\nFile v1.0.0:skill-card.md\n\n## Description:\n\nAdCP Advertising helps agents discover ad inventory, create and update media buys, manage creatives, target audiences, and monitor campaign performance through natural-language advertising workflows.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dujch](https://clawhub.ai/user/dujch)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nMarketing teams, agencies, media buyers, e-commerce brands, startups, and developers use this skill to plan, launch, adjust, and measure advertising campaigns across display, video, CTV, audio, native, and other channels. It supports AdCP workflows for campaign discovery, media buying, creative management, targeting, delivery reporting, and budget optimization.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Campaign launches, budget changes, pause/resume actions, and creative reassignment can affect real ad spend or delivery.\n\nMitigation: Use the test agent or a sandbox first, and require explicit human confirmation for every campaign launch, budget change, pause/resume action, and creative reassignment.\n\nRisk: The shared test token is public and unsuitable for production advertising accounts.\n\nMitigation: Do not reuse the shared test token for real accounts; configure production credentials issued by each sales agent.\n\nRisk: Creative uploads, targeting overlays, and budget settings can fail validation or create unintended audience reach.\n\nMitigation: Validate creative formats, targeting fields, budget minimums, and pending approval status before execution, then monitor delivery after changes.\n\n## Reference(s):\n\n- [AdCP Documentation](https://docs.adcontextprotocol.org)\n- [AdCP Documentation Index](https://docs.adcontextprotocol.org/llms.txt)\n- [AdCP Media Buy Protocol](https://docs.adcontextprotocol.org/docs/media-buy/)\n- [AdCP Task Reference](https://docs.adcontextprotocol.org/docs/media-buy/task-reference/)\n- [AdCP Quick Reference](https://docs.adcontextprotocol.org/docs/media-buy/quick-reference)\n- [AdCP Creative Protocol](https://docs.adcontextprotocol.org/docs/creative/)\n- [AdCP Targeting Documentation](https://docs.adcontextprotocol.org/docs/media-buy/advanced-topics/targeting)\n- [ClawHub Skill Page](https://clawhub.ai/dujch/skills/adcp-advertising-1-0-1)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Markdown, Code, Shell commands, Configuration]\n\n**Output Format:** [Markdown guidance with JavaScript examples, shell commands, and JSON configuration snippets]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include AdCP task names, endpoint URLs, campaign IDs, budgets, targeting fields, and creative metadata supplied by the user or agent.]\n\n## Skill Version(s):\n\n1.0.0 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.0:TARGETING.md\n\n# Advanced Targeting Strategies\n\nComprehensive guide to audience targeting with AdCP.\n\n**Official AdCP Documentation**: https://docs.adcontextprotocol.org  \n**Targeting Documentation**: https://docs.adcontextprotocol.org/docs/media-buy/advanced-topics/targeting\n\nThis guide provides practical targeting strategies for AdCP campaigns. For the complete targeting specification, see the [official AdCP targeting documentation](https://docs.adcontextprotocol.org/docs/media-buy/advanced-topics/targeting).\n\n## Overview\n\nAdCP supports four targeting dimensions:\n1. **Geographic** - Location-based targeting\n2. **Demographic** - Age, gender, income\n3. **Behavioral** - Interests, purchase intent, browsing history\n4. **Contextual** - Keywords, content categories, topics\n\nTargeting is **additive**: Product targeting + Your overlay = Final targeting\n\n## Geographic Targeting\n\n### Supported Types\n\n```typescript\ngeo: {\n  included?: string[];   // Locations to target\n  excluded?: string[];   // Locations to exclude\n}\n```\n\n### DMA Codes (Designated Market Areas)\n\nTarget specific US media markets:\n\n```javascript\ntargeting_overlay: {\n  geo: {\n    included: [\n      'US-NY',    // New York\n      'US-LA',    // Los Angeles\n      'US-CHI',   // Chicago\n      'US-PHI',   // Philadelphia\n      'US-DAL',   // Dallas-Fort Worth\n      'US-SF',    // San Francisco-Oakland-San Jose\n      'US-ATL',   // Atlanta\n      'US-BOS',   // Boston\n      'US-DC',    // Washington DC\n      'US-HOU'    // Houston\n    ]\n  }\n}\n```\n\n### State Targeting\n\nTarget entire US states:\n\n```javascript\ntargeting_overlay: {\n  geo: {\n    included: ['US-CA', 'US-NY', 'US-TX', 'US-FL']\n  }\n}\n```\n\n### ZIP Code Targeting\n\nPrecise location targeting:\n\n```javascript\ntargeting_overlay: {\n  geo: {\n    included: [\n      'US-10001',  // Manhattan\n      'US-10002',  // Manhattan\n      'US-90210',  // Beverly Hills\n      'US-94102'   // San Francisco\n    ]\n  }\n}\n```\n\n### Country Targeting\n\nInternational campaigns:\n\n```javascript\ntargeting_overlay: {\n  geo: {\n    included: ['US', 'CA', 'GB', 'AU'],  // Multiple countries\n    excluded: []\n  }\n}\n```\n\n### Geo Exclusions\n\nExclude specific locations:\n\n```javascript\ntargeting_overlay: {\n  geo: {\n    included: ['US'],           // All US\n    excluded: ['US-AK', 'US-HI'] // Exclude Alaska and Hawaii\n  }\n}\n```\n\n### Radius Targeting\n\nTarget around specific points (if supported by agent):\n\n```javascript\ntargeting_overlay: {\n  geo: {\n    radius: {\n      lat: 37.7749,\n      lng: -122.4194,\n      radius_km: 10,\n      type: 'center'\n    }\n  }\n}\n```\n\n## Demographic Targeting\n\n### Age Ranges\n\nTarget specific age groups:\n\n```javascript\ntargeting_overlay: {\n  demographics: {\n    age_ranges: [\n      { min: 18, max: 24 },  // Gen Z\n      { min: 25, max: 34 }   // Millennials\n    ]\n  }\n}\n```\n\n**Common Age Segments**:\n- 18-24: Gen Z\n- 25-34: Millennials (younger)\n- 35-44: Millennials (older)\n- 45-54: Gen X\n- 55-64: Baby Boomers (younger)\n- 65+: Baby Boomers (older) / Silent Generation\n\n### Gender Targeting\n\n```javascript\ntargeting_overlay: {\n  demographics: {\n    genders: ['M', 'F', 'O']  // Male, Female, Other\n  }\n}\n```\n\n### Income Brackets\n\nTarget by household income:\n\n```javascript\ntargeting_overlay: {\n  demographics: {\n    income_brackets: [\n      '50k-75k',\n      '75k-100k',\n      '100k+'\n    ]\n  }\n}\n```\n\n**Standard Income Brackets**:\n- '0-25k': Low income\n- '25k-50k': Lower-middle income\n- '50k-75k': Middle income\n- '75k-100k': Upper-middle income\n- '100k+': High income\n- '150k+': Very high income\n\n### Household Composition\n\nTarget by family structure (if supported):\n\n```javascript\ntargeting_overlay: {\n  demographics: {\n    household: {\n      has_children: true,\n      household_size: [3, 4, 5]\n    }\n  }\n}\n```\n\n## Behavioral Targeting\n\n### Interests\n\nTarget users based on interests:\n\n```javascript\ntargeting_overlay: {\n  behavioral: {\n    interests: [\n      'technology',\n      'gaming',\n      'travel',\n      'fitness',\n      'cooking',\n      'fashion',\n      'automotive',\n      'real_estate'\n    ]\n  }\n}\n```\n\n**Common Interest Categories**:\n- **Technology**: tech_enthusiast, early_adopter, software, hardware\n- **Lifestyle**: fitness, wellness, outdoor, travel, luxury\n- **Entertainment**: gaming, movies, music, sports\n- **Shopping**: fashion, beauty, home_decor, consumer_electronics\n- **Finance**: investing, banking, cryptocurrency\n- **Business**: entrepreneurship, b2b, professional_services\n\n### Purchase Intent\n\nTarget users actively researching products:\n\n```javascript\ntargeting_overlay: {\n  behavioral: {\n    purchase_intent: [\n      'automotive',\n      'consumer_electronics',\n      'home_appliances',\n      'travel_services',\n      'financial_services'\n    ]\n  }\n}\n```\n\n**High-Intent Categories**:\n- Automotive (car shopping)\n- Real estate (home buying)\n- Consumer electronics\n- Travel services\n- Financial products\n- Education/courses\n- B2B software\n\n### Life Events\n\nTarget users experiencing major life changes:\n\n```javascript\ntargeting_overlay: {\n  behavioral: {\n    life_events: [\n      'new_parent',\n      'recently_moved',\n      'job_change',\n      'wedding',\n      'graduation'\n    ]\n  }\n}\n```\n\n### Website Visitors\n\nRetarget your website visitors (requires pixel):\n\n```javascript\ntargeting_overlay: {\n  behavioral: {\n    retargeting: {\n      pixel_id: 'your-pixel-id',\n      lookback_days: 30,\n      pages_visited: ['/product/*', '/pricing']\n    }\n  }\n}\n```\n\n## Contextual Targeting\n\n### Keywords\n\nTarget based on page content:\n\n```javascript\ntargeting_overlay: {\n  contextual: {\n    keywords: [\n      'innovation',\n      'technology',\n      'artificial intelligence',\n      'machine learning',\n      'cloud computing'\n    ]\n  }\n}\n```\n\n### IAB Categories\n\nTarget by standardized content categories:\n\n```javascript\ntargeting_overlay: {\n  contextual: {\n    categories: [\n      'IAB19',    // Technology & Computing\n      'IAB13',    // Personal Finance\n      'IAB3',     // Business\n      'IAB20',    // Travel\n      'IAB1'      // Arts & Entertainment\n    ]\n  }\n}\n```\n\n**Common IAB Categories**:\n- IAB1: Arts & Entertainment\n- IAB2: Automotive\n- IAB3: Business\n- IAB4: Careers\n- IAB5: Education\n- IAB6: Family & Parenting\n- IAB7: Health & Fitness\n- IAB8: Food & Drink\n- IAB9: Hobbies & Interests\n- IAB10: Home & Garden\n- IAB11: Law, Government & Politics\n- IAB12: News\n- IAB13: Personal Finance\n- IAB14: Society\n- IAB15: Science\n- IAB16: Pets\n- IAB17: Sports\n- IAB18: Style & Fashion\n- IAB19: Technology & Computing\n- IAB20: Travel\n- IAB21: Real Estate\n- IAB22: Shopping\n- IAB23: Religion & Spirituality\n- IAB24: Uncategorized\n- IAB25: Non-Standard Content\n- IAB26: Illegal Content\n\n### Content Safety\n\nExclude sensitive content:\n\n```javascript\ntargeting_overlay: {\n  contextual: {\n    exclude_categories: [\n      'IAB25-1',  // Profanity\n      'IAB25-2',  // Hate Speech\n      'IAB25-3',  // Violence\n      'IAB25-4',  // Adult Content\n      'IAB26'     // Illegal Content\n    ]\n  }\n}\n```\n\n### Topic Targeting\n\nTarget specific topics or themes:\n\n```javascript\ntargeting_overlay: {\n  contextua","readmeExcerpt":"Skill: Adcp Advertising 1.0.1 Owner: dujch Summary: Automate advertising campaigns with AI. Create ads, buy media, manage ad budgets, discover ad inventory, run display ads, video ads, CTV campaigns, and optim... Tags: latest:1.0.0 Version history: v1.0.0 | 2026-03-20T14:35:50.544Z | auto Initial release of AdCP Advertising skill. - Automate ad campaigns with AI using natural language commands. - Launch and manage di","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"\"Show me advertising capabilities\""},{"language":"text","snippet":"\"Find display ads for a tech startup, budget $5000\""},{"language":"text","snippet":"\"Create campaign with Product prod_123, $5000 budget, targeting California tech professionals\""},{"language":"text","snippet":"\"Upload these banner images as creatives\""},{"language":"text","snippet":"\"Show campaign metrics and ROI\""},{"language":"text","snippet":"User: \"I need to run display ads for my SaaS product\"\nAgent: [Discovers products] \"Found 5 display packages. Want details?\"\nUser: \"Create campaign with Product 1, $10k budget, target CTOs\"\nAgent: [Creates campaign] \"Campaign live! ID: mb_abc123\""}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: adcp-advertising\ndisplayName: AdCP Advertising\ndescription: Automate advertising campaigns with AI. Create ads, buy media, manage ad budgets, discover ad inventory, run display ads, video ads, CTV campaigns, and optimize ad performance. Perfect for marketing automation, programmatic advertising, media buying, ad management, campaign optimization, creative management, and performance tracking. Launch Facebook ads, Google ads, display advertising, video marketing, and multi-channel campaigns using natural language. Supports ad targeting, audience segmentation, ROI tracking, and automated bidding.\nauthor: AdCP Community\nlicense: MIT\nhomepage: https://docs.adcontextprotocol.org\nrepository: https://github.com/edyyy62/openclaw-adcp\ncategory: advertising\nsubcategory: marketing-automation\ntype: agent\nkeywords:\n  - advertising\n  - ads\n  - marketing\n  - campaigns\n  - adcp\n  - programmatic\n  - media-buying\n  - display-ads\n  - video-ads\n  - facebook-ads\n  - google-ads\n  - ctv\n  - connected-tv\n  - marketing-automation\n  - ad-management\n  - campaign-optimization\n  - targeting\n  - roi-tracking\n  - performance-marketing\n  - retargeting\n---\n\n# Ad Context Protocol (AdCP) Advertising Skill\n\n## Overview\n\n**Automate your advertising campaigns with AI.** This skill enables OpenClaw agents to discover ad inventory, launch campaigns, manage creatives, and optimize performance across display, video, CTV, audio, and more - all through natural language commands.\n\nNo dashboards. No forms. No ad platform expertise required.\n\n### What You Can Do\n\n- 🎯 **Launch campaigns in minutes** - \"Create a $10k display campaign targeting tech professionals in California\"\n- 🔍 **Discover ad inventory instantly** - \"Find premium video placements for luxury brands\"\n- 🎨 **Upload ads with ease** - \"Upload these banner images as creatives\"\n- 📊 **Track ROI in real-time** - \"Show me campaign performance and CTR by creative\"\n- 🎛️ **Auto-optimize spend** - \"Reallocate budget to top-performing packages\"\n- 🌐 **Target precisely** - Demographics, behaviors, interests, locations, devices, times\n\n### Perfect For\n\n**Marketing teams** running Facebook ads, Google ads, and multi-channel campaigns  \n**Media buyers** managing programmatic ad spend across publishers  \n**Agencies** automating client campaign management and reporting  \n**E-commerce brands** launching product ads and retargeting campaigns  \n**Startups** running lean marketing with AI-powered automation\n\n### Why Choose This Skill?\n\n**Skip the learning curve** - No need to master complex ad platforms  \n**Save time** - Launch in 5 minutes vs. hours of manual setup  \n**Spend smarter** - AI automatically optimizes budgets to top performers  \n**Scale faster** - Manage unlimited campaigns through simple commands  \n**Test risk-free** - Public test agent included, no setup required\n\n**Official AdCP Repository**: https://github.com/adcontextprotocol/adcp  \n**Official AdCP Documentation**: https://docs.adcontextprotocol.org  \n**Complete Docum"},{"path":"README.md","content":"# Ad Context Protocol (AdCP) Advertising Skill for OpenClaw\n\n**Launch and optimize advertising campaigns using AI.** Automate media buying, ad creation, campaign management, and performance tracking across display, video, CTV, audio, and more.\n\n**Official AdCP Repository**: [github.com/adcontextprotocol/adcp](https://github.com/adcontextprotocol/adcp)  \n**Official AdCP Documentation**: https://docs.adcontextprotocol.org  \n**Complete Documentation Index**: https://docs.adcontextprotocol.org/llms.txt\n\n## Overview\n\nTransform how you run advertising campaigns. This skill provides OpenClaw agents with AI-powered advertising automation:\n\n- 🔍 **Discover ad inventory** - Find display ads, video placements, CTV spots using natural language\n- 🎯 **Launch campaigns instantly** - Create multi-channel campaigns across display, video, CTV, audio, native, DOOH\n- 🎨 **Manage ad creatives** - Upload banners, videos, HTML5 ads and track performance by creative\n- 📊 **Monitor ROI in real-time** - Get impressions, clicks, conversions, CPM, CTR, and spend data instantly\n- 🎛️ **Auto-optimize performance** - Reallocate budgets, pause underperformers, scale winners automatically\n- 🌐 **Target precisely** - Demographics, behaviors, interests, locations, devices, times, and contexts\n\n### Perfect For\n\n**Marketing teams** running Facebook ads, Google ads, programmatic campaigns  \n**Media buyers** managing multi-channel ad spend and inventory  \n**Agencies** automating client campaign management and reporting  \n**E-commerce** launching product ads and retargeting campaigns  \n**Startups** running lean marketing with AI-powered ad automation\n\n## Quick Start\n\n### Installation\n\nFor ClawHub users:\n```bash\n# Install via ClawHub\nopenclaw skills install adcp-advertising\n```\n\nFor local development:\n```bash\n# Clone or download this skill to your workspace\ncd ~/.openclaw/workspace/skills/\ngit clone <this-repo> adcp-advertising\n```\n\n### Launch Your First Ad Campaign in 5 Minutes\n\nGo from zero to live campaign using just natural language. No forms, no dashboards, no ad platform expertise needed.\n\n**Step 1: Discover what's available** (No login required)\n```\n\"Show me advertising options for my business\"\n```\nBrowse inventory across publishers without authentication.\n\n**Step 2: Find your perfect ad placement**\n```\n\"Find display ads for a tech startup, $5000 budget\"\n```\nAI searches inventory and shows matching products with pricing.\n\n**Step 3: Launch your campaign**\n```\n\"Create campaign with Product ID prod_abc123, $5000 budget, \ntargeting tech professionals in California\"\n```\nCampaign goes live instantly using the test environment.\n\n**Step 4: Upload your ads**\n```\n\"Upload this banner as a creative\"\n```\nDrop your image, video, or HTML5 ad. Done.\n\n**Step 5: Track performance**\n```\n\"Show campaign performance\"\n```\nGet impressions, clicks, CTR, spend, and pacing in real-time.\n\n**That's it!** Your first campaign is live in the test environment. When ready, switch to production for real ad delive"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7bt5g276gmskrngqwj35mbnh835e53\",\n  \"slug\": \"adcp-advertising-1-0-1\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1774017350544\n}"},{"path":"CREATIVE.md","content":"# Creative Asset Management Guide\n\nComplete guide to managing advertising creatives with AdCP.\n\n**Official AdCP Documentation**: https://docs.adcontextprotocol.org  \n**Creative Protocol**: https://docs.adcontextprotocol.org/docs/creative/  \n**Creative Formats**: https://docs.adcontextprotocol.org/docs/creative/formats\n\nThis guide covers creative asset management with AdCP. For the complete creative specification and format details, see the [official AdCP creative documentation](https://docs.adcontextprotocol.org/docs/creative/).\n\n## Overview\n\nAdCP provides a comprehensive creative management system:\n- **Format Discovery** - Understand creative requirements\n- **Asset Upload** - Sync creatives across platforms\n- **Library Management** - Query and organize assets\n- **Creative Assignment** - Link creatives to campaigns\n- **Performance Tracking** - Monitor creative effectiveness\n\n## Creative Lifecycle\n\n```\n1. Discover Formats\n   ↓\n2. Build/Prepare Assets\n   ↓\n3. Validate Requirements\n   ↓\n4. Upload to Agent\n   ↓\n5. Assign to Campaigns\n   ↓\n6. Monitor Performance\n   ↓\n7. Optimize/Replace\n```\n\n## Creative Formats\n\n### Standard IAB Formats\n\nAdCP supports standard IAB creative formats via the Standard Creative Agent at `https://creative.adcontextprotocol.org`.\n\n#### Display Formats\n\n| Format ID | Name | Dimensions | Use Case |\n|-----------|------|------------|----------|\n| `display_300x250` | Medium Rectangle | 300x250 | Most versatile display format |\n| `display_728x90` | Leaderboard | 728x90 | Top of page banner |\n| `display_160x600` | Wide Skyscraper | 160x600 | Sidebar placement |\n| `display_300x600` | Half Page | 300x600 | Premium sidebar |\n| `display_970x250` | Billboard | 970x250 | Above-the-fold large format |\n| `display_320x50` | Mobile Banner | 320x50 | Mobile web |\n| `display_300x50` | Mobile Banner Small | 300x50 | Mobile web |\n\n#### Video Formats\n\n| Format ID | Name | Duration | Use Case |\n|-----------|------|----------|----------|\n| `video_standard_15s` | Pre-roll 15s | 15 seconds | Short-form video |\n| `video_standard_30s` | Pre-roll 30s | 30 seconds | Standard video ad |\n| `video_standard_60s` | Mid-roll 60s | 60 seconds | Long-form content |\n| `video_outstream_15s` | Outstream 15s | 15 seconds | In-feed video |\n\n#### Native Formats\n\n| Format ID | Name | Use Case |\n|-----------|------|----------|\n| `native_standard` | Standard Native | Content-style ads |\n| `native_in_feed` | In-Feed Native | Social feed ads |\n\n### Discovering Formats\n\n```javascript\n// Get all available formats\nconst formats = await agent.listCreativeFormats({});\n\n// Filter by type\nconst videoFormats = await agent.listCreativeFormats({\n  format_types: ['video']\n});\n\n// Filter by channel\nconst ctvFormats = await agent.listCreativeFormats({\n  channels: ['ctv']\n});\n\n// Examine format details\nvideoFormats.formats.forEach(format => {\n  console.log(`${format.name}:`);\n  console.log(`  Format ID: ${format.format_id.id}`);\n  console.log(`  Dimensions: ${format.specifications.width"},{"path":"EXAMPLES.md","content":"# AdCP Real-World Examples\n\nComplete, working examples for common advertising scenarios using AdCP.\n\n**Official AdCP Documentation**: https://docs.adcontextprotocol.org  \n**Media Buy Protocol**: https://docs.adcontextprotocol.org/docs/media-buy/  \n**Task Reference**: https://docs.adcontextprotocol.org/docs/media-buy/task-reference/\n\nThese examples demonstrate practical implementations of the Ad Context Protocol. For the complete specification and additional examples, see the [official AdCP documentation](https://docs.adcontextprotocol.org).\n\n## Table of Contents\n\n1. [Quick Start Examples](#quick-start-examples)\n2. [Display Advertising Campaigns](#display-advertising-campaigns)\n3. [Video Advertising Campaigns](#video-advertising-campaigns)\n4. [Multi-Channel Campaigns](#multi-channel-campaigns)\n5. [Campaign Optimization](#campaign-optimization)\n6. [Creative Management](#creative-management)\n7. [Advanced Targeting](#advanced-targeting)\n8. [Performance Monitoring](#performance-monitoring)\n\n---\n\n## Quick Start Examples\n\n### Example 1: Minimal Campaign\n\nThe simplest possible campaign - discover products and launch immediately.\n\n```javascript\nimport { testAgent } from '@adcp/client/testing';\n\nasync function launchQuickCampaign() {\n  // 1. Discover products\n  const products = await testAgent.getProducts({\n    brief: 'Display advertising for tech startup',\n    brand_manifest: { url: 'https://startup.com' }\n  });\n  \n  const firstProduct = products.products[0];\n  \n  // 2. Create campaign\n  const campaign = await testAgent.createMediaBuy({\n    buyer_ref: 'quick-campaign-001',\n    brand_manifest: { url: 'https://startup.com' },\n    packages: [{\n      buyer_ref: 'pkg-001',\n      product_id: firstProduct.product_id,\n      pricing_option_id: firstProduct.pricing_options[0].pricing_option_id,\n      budget: 5000\n    }],\n    start_time: { type: 'asap' },\n    end_time: '2026-12-31T23:59:59Z'\n  });\n  \n  console.log(`✅ Campaign created: ${campaign.media_buy_id}`);\n}\n```\n\n### Example 2: Discover and Review\n\nExplore available products before committing.\n\n```javascript\nasync function exploreInventory() {\n  // Discover products\n  const result = await testAgent.getProducts({\n    brief: 'Premium video inventory for luxury brand',\n    brand_manifest: {\n      name: 'Luxury Auto Corp',\n      url: 'https://luxuryauto.com'\n    },\n    filters: {\n      channels: ['video', 'ctv'],\n      budget_range: { min: 20000, max: 100000 }\n    }\n  });\n  \n  console.log(`Found ${result.products.length} matching products:\\n`);\n  \n  result.products.forEach((product, index) => {\n    console.log(`${index + 1}. ${product.name}`);\n    console.log(`   ${product.description}`);\n    console.log(`   Channels: ${product.channels.join(', ')}`);\n    console.log(`   Pricing: ${JSON.stringify(product.pricing_options[0])}`);\n    \n    if (product.inventory_estimate) {\n      console.log(`   Estimated reach: ${product.inventory_estimate.min_impressions?.toLocaleString()} - ${product.inventory_estimate.max_impressi"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1571,"uniquenessScore":41,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T09:45:49.017Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T09:45:49.017Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T14:16:59.723Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}