AdCP (Ad Context Protocol) Overview
Introduction
AdCP (Ad Context Protocol) is Affinity AI's extension to OpenRTB 2.6 that enables dynamic creative assembly and advanced ad formats. Instead of sending pre-assembled ad markup, bidders provide structured creative manifests that publishers use to assemble and render ads optimized for their platform.
Why AdCP?
Dynamic Creative Assembly
- Flexible Rendering: Publishers control how ads are displayed
- Platform Optimization: Ads adapt to each platform's design
- Format Variety: Support multiple ad formats from one manifest
- Quality Control: Publishers validate creatives before display
Standardized Structure
- Format Definitions: Clear specifications for each ad format
- Asset Types: Standardized image, text, and URL assets
- Universal Macros: Consistent tracking across all publishers
- Validation: Built-in quality assurance
AI-Native Formats
- Contextual Weaving: Integrate ads into LLM responses
- Conversational Ads: Native to chat interfaces
- Dynamic Assembly: Real-time creative optimization
- Non-Disruptive: Seamless user experience
Core Concepts
1. Format Definitions
Specifications that define how ads should be assembled:
{
"format_id": {
"agent_url": "https://creative.adcontextprotocol.org",
"id": "display_300x250"
},
"name": "Standard 300x250 Display Banner",
"type": "display",
"assets_required": [
{
"asset_id": "banner_image",
"asset_type": "image",
"required": true
}
]
}
Learn More: Format Support
2. Creative Manifests
Structured asset delivery from bidders:
{
"format_id": {
"agent_url": "https://creative.adcontextprotocol.org",
"id": "display_300x250"
},
"promoted_offering": "Product Name",
"assets": {
"banner_image": {
"url": "https://cdn.brand.com/banner.jpg",
"width": 300,
"height": 250
},
"clickthrough_url": {
"url": "https://brand.com/product"
}
}
}
Learn More: Creative Manifests
3. Tracking Framework
Comprehensive event tracking:
- Impression tracking
- Click tracking
- Viewability tracking
- Custom event tracking
Learn More: Tracking
How It Works
Supported Formats
Display Formats
Standard banner and display ads:
- IAB Standard Sizes: 300x250, 728x90, 160x600, etc.
- Responsive: Adapt to container size
- Rich Media: Interactive elements
- Animated: GIF support
Native Formats
Native ad placements:
- Article Style: In-feed native ads
- Product Cards: E-commerce placements
- Sponsored Content: Editorial-style ads
- Custom Layouts: Platform-specific designs
Contextual Weaving
AI-native format for LLM integration:
- Brand Context: Structured brand information
- Key Messages: Selling points to emphasize
- Weaving Hints: Terms to include/avoid
- Natural Integration: Seamless LLM weaving
Learn More: Contextual Weaving Format
Integration Flow
Publisher Integration
1. Initialize (One-Time)
// Fetch and cache format definitions
async function initializeAdCP() {
const formats = [
{
agent_url: 'https://creative.adcontextprotocol.org',
id: 'display_300x250',
},
{
agent_url: 'https://creative.adcontextprotocol.org',
id: 'contextual_weaving',
},
]
for (const format of formats) {
const definition = await fetchFormatDefinition(format.agent_url, format.id)
formatCache.set(format.id, definition)
}
}
2. Declare Support (Per Request)
{
"imp": [
{
"id": "imp-1",
"native": {
"request": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":80}}]}}"
},
"ext": {
"aura": {
"adcpFormats": [
{
"agent_url": "https://creative.adcontextprotocol.org",
"id": "display_300x250"
}
]
}
}
}
]
}
3. Receive & Validate
function validateManifest(manifest, formatDefinition) {
// Check format ID matches
validateFormatId(manifest, formatDefinition)
// Check required assets present
validateRequiredAssets(manifest, formatDefinition)
// Validate asset types and constraints
validateAssetTypes(manifest, formatDefinition)
return true
}
4. Assemble & Render
function renderCreative(manifest, formatDefinition) {
// Extract assets
const assets = manifest.assets
// Assemble according to format
const creative = assembleCreative(assets, formatDefinition)
// Fire impression tracker
fireTracking(assets.impression_tracker.url)
// Display creative
displayCreative(creative)
}
Bidder Integration
1. Match Formats
function matchFormats(bidRequest, campaigns) {
const supportedFormats = bidRequest.imp[0].ext?.aura?.adcpFormats || []
return campaigns.filter(campaign =>
supportedFormats.some(format => campaign.formats.includes(format.id))
)
}
2. Build Manifest
function buildManifest(campaign, format) {
return {
format_id: format,
promoted_offering: campaign.productName,
assets: {
banner_image: {
url: campaign.imageUrl,
width: 300,
height: 250,
format: 'jpg',
},
headline: {
content: campaign.headline,
},
clickthrough_url: {
url: `${campaign.landingUrl}?campaign={MEDIA_BUY_ID}`,
},
impression_tracker: {
url: `${campaign.trackingUrl}/imp?buy={MEDIA_BUY_ID}&cb={CACHEBUSTER}`,
},
},
}
}
3. Send Response
{
"bid": {
"id": "bid-001",
"price": 2.5,
"adm": "<a href='...'><img src='...'/></a>",
"ext": {
"aura": {
"adcpFormat": {
"formatId": {
"agent_url": "https://creative.adcontextprotocol.org",
"id": "display_300x250"
},
"creativeManifest": {
/* manifest here */
}
}
}
}
}
}
Key Benefits
For Publishers
Revenue:
- Higher CPMs through better ad quality
- Premium inventory for AI contexts
- Increased fill rates
Control:
- Validate creatives before display
- Customize rendering per platform
- Maintain brand safety
User Experience:
- Ads match platform design
- Non-disruptive formats
- Better engagement
For Advertisers
Performance:
- Dynamic creative optimization
- Platform-specific rendering
- Better targeting
Efficiency:
- One manifest, multiple platforms
- Standardized asset delivery
- Reduced creative production
Insights:
- Consistent tracking
- Cross-platform analytics
- Performance optimization
For Users
Relevance:
- Ads match platform experience
- Contextually appropriate
- Non-intrusive
Quality:
- Validated creatives
- Proper formatting
- Fast loading
Best Practices
For Publishers
1. Cache Format Definitions
Always cache during initialization:
// ✅ Good: Cache at startup
await initializeFormats()
// ❌ Bad: Fetch during ad serving
const format = await fetchFormat(id) // Too slow!
2. Validate Manifests
Always validate before rendering:
if (!validateManifest(manifest, formatDefinition)) {
// Fall back to adm field
return renderFallback(bid.adm)
}
3. Provide Fallback
Always include standard adm field:
{
"bid": {
"adm": "<a href='...'><img src='...'/></a>",
"ext": {
"aura": {
"adcpFormat": {
/* manifest */
}
}
}
}
}
For Bidders
1. Match Format Requirements
Ensure assets meet format specifications:
function validateAssets(assets, formatDef) {
for (const req of formatDef.assets_required) {
if (req.required && !assets[req.asset_id]) {
return false
}
}
return true
}
2. Test Across Publishers
Test manifests with multiple publishers:
// Test with different format definitions
for (const publisher of testPublishers) {
const result = publisher.validateManifest(manifest)
assert(result.valid, result.errors)
}
Format Types
Standard Formats
Pre-defined formats for common use cases:
display_300x250- Standard medium rectangledisplay_728x90- Standard leaderboardnative_article- Article-style native ad
Custom Formats
Publishers can define custom formats:
- Platform-specific layouts
- Branded ad units
- Special placements
- Experimental formats
AI-Native Formats
Formats designed for AI platforms:
contextual_weaving- LLM integrationconversational_ad- Chat interface adsai_search_sponsored- AI search monetization
Documentation
Core Components
- Format Support - Declaring format support
- Creative Manifests - Manifest structure
- Tracking - Event tracking
Format Specifications
- Contextual Weaving - AI-native format
Related Documentation
- Affinity AI Extensions Overview - All Affinity AI extensions
- Context Enhancement - Rich context signals
- OpenRTB 2.6 - Base protocol
Use Cases
Use Cases
Performance
Latency
AdCP adds minimal overhead:
- Format Fetch: 0ms (cached at startup)
- Validation: less than 5ms per manifest
- Assembly: less than 10ms per creative
- Total Overhead: less than 15ms
Scalability
Designed for high-volume traffic:
- Throughput: 100,000+ requests/second
- Format Cache: In-memory, fast access
- Validation: Optimized algorithms
- Rendering: Parallel processing
Reliability
Built for production:
- Fallback: Always use
admfield as backup - Validation: Catch errors before display
- Monitoring: Track success rates
- Graceful Degradation: Handle failures smoothly
Privacy & Compliance
No PII in Manifests
Creative manifests never include:
- User identifiers
- Personal information
- Browsing history
- Location data
GDPR/CCPA Compliant
- Contextual targeting only
- No user tracking in manifests
- Privacy strings in tracking URLs
- Opt-out mechanisms supported
Brand Safety
- Format validation prevents malicious content
- Asset requirements ensure quality
- Publisher control over rendering
- Audit trail for compliance
Next Steps
1. Understand Formats: Review Format Support 2. Learn Manifests: Study Creative Manifests 3. Implement Tracking: Set up Tracking 4. Explore Formats: Check Contextual Weaving 5. Explore Use Cases: See Use Cases
Support
Questions?
- Check Use Cases
- Contact support
Feedback
- Submit via GitHub issues
- Join community discussions
- Participate in working groups