Skip to content

Commit 57b60f1

Browse files
authored
Merge branch 'release_0.35' into AGT-809-module-documentation
2 parents c95e65a + 82a83f3 commit 57b60f1

41 files changed

Lines changed: 1966 additions & 332 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

_data/sidebar.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2042,3 +2042,32 @@
20422042
isSectionHeader: 0
20432043
sectionTitle:
20442044
subgroup: 0
2045+
2046+
#-------------- Prebid Agents --------------|
2047+
2048+
- sbSecId: 10
2049+
title:
2050+
link:
2051+
isHeader: 0
2052+
isSectionHeader: 1
2053+
sectionTitle: Prebid Agents
2054+
sectionId: prebid-agents
2055+
subgroup: 1000
2056+
sbCollapseId: prebid-agents
2057+
2058+
- sbSecId: 10
2059+
title: General
2060+
link:
2061+
isHeader: 1
2062+
headerId: agents-general
2063+
isSectionHeader: 0
2064+
sectionTitle:
2065+
subgroup: 0
2066+
2067+
- sbSecId: 10
2068+
title: Salesagent
2069+
link: /agents/salesagent.html
2070+
isHeader: 0
2071+
isSectionHeader: 0
2072+
sectionTitle:
2073+
subgroup: 0

agents/salesagent.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
layout: page_v2
3+
title: Salesagent
4+
description: A media sales agent that implements the AdCP Media Buy protocol
5+
sidebarType: 10
6+
---
7+
8+
# Prebid Sales Agent
9+
10+
The Prebid Sales Agent is a server that exposes advertising inventory to AI agents via the Model Context Protocol (MCP) and Agent-to-Agent (A2A) protocol. It is designed to integrate with ad servers like Google Ad Manager and provides tools for managing inventory and campaigns throughout their lifecycle.
11+
12+
<div class="alert alert-info" role="alert">
13+
For the full source code and latest updates, visit the <a href="https://github.com/prebid/salesagent">prebid/salesagent repository</a>.
14+
</div>
15+
16+
## Key Features
17+
18+
### For AI Agents
19+
20+
- **Product Discovery**: Natural language search for advertising products.
21+
- **Campaign Creation**: Automated media buying with targeting capabilities.
22+
- **Creative Management**: Streamlined upload and approval workflows.
23+
- **Performance Monitoring**: Real-time access to campaign metrics.
24+
25+
### For Publishers
26+
27+
- **Multi-Tenant System**: Isolates data per publisher for security and organization.
28+
- **Adapter Pattern**: Supports multiple ad servers (e.g., Google Ad Manager).
29+
- **Real-time Dashboard**: Live activity feed powered by Server-Sent Events (SSE).
30+
- **Workflow Management**: Unified system for human-in-the-loop approvals.
31+
- **Admin Interface**: Web UI with Google OAuth for easy management.
32+
33+
### For Developers
34+
35+
- **MCP Protocol**: Standard interface for AI agents.
36+
- **A2A Protocol**: Agent-to-Agent communication via JSON-RPC 2.0.
37+
- **REST API**: Programmatic tenant management.
38+
- **Docker Deployment**: Easy setup for both local and production environments.
39+
40+
## Getting Started
41+
42+
### Quick Start (Evaluation)
43+
44+
You can try the sales agent locally using Docker:
45+
46+
```bash
47+
# Clone and start
48+
git clone https://github.com/prebid/salesagent.git
49+
cd salesagent
50+
docker compose up -d
51+
52+
# Test the MCP interface
53+
uvx adcp http://localhost:8000/mcp/ --auth test-token list_tools
54+
```
55+
56+
Access services at [http://localhost:8000](http://localhost:8000):
57+
58+
- **Admin UI**: `/admin` (Test credentials: `test123`)
59+
- **MCP Server**: `/mcp/`
60+
- **A2A Server**: `/a2a`
61+
62+
### Production Deployment
63+
64+
For production, publishers can deploy their own sales agent instance. The repository provides guides for various deployment methods, including Docker and cloud platforms.
65+
66+
## The AdContext Protocol (AdCP)
67+
68+
The Sales Agent is built on the **AdContext Protocol (AdCP)**, an open standard designed to standardize how AI agents interact with advertising platforms.
69+
70+
<div class="alert alert-info" role="alert">
71+
For comprehensive documentation, visit <a href="https://docs.adcontextprotocol.org/docs/intro">docs.adcontextprotocol.org</a>.
72+
</div>
73+
74+
### Protocol Architecture
75+
76+
AdCP operates as a layer on top of standard AI interaction protocols:
77+
78+
- **MCP (Model Context Protocol)**: Facilitates direct integration with AI assistants (e.g., Claude Desktop).
79+
- **A2A (Agent-to-Agent Protocol)**: Enables complex, autonomous workflows and collaboration between agents using JSON-RPC 2.0.
80+
81+
### Core Concepts
82+
83+
AdCP abstracts complex advertising operations into standardized domains:
84+
85+
1. **Inventory Discovery** (`get_products`): Agents can search for ad products using natural language criteria (e.g., "video ads in North America") rather than specific line item IDs.
86+
2. **Media Buying** (`create_media_buy`): A normalized workflow for proposal, negotiation, and booking that works consistently across different ad servers.
87+
3. **Creative Management** (`build_creative`): Standardized handling of creative assets, allowing agents to generate or upload assets that match publisher specifications.
88+
4. **Signal Activation** (`get_signals`, `activate_signal`): Mechanisms for passing context and identity signals to improve targeting and campaign performance.
89+
90+
### Workflow Example
91+
92+
A typical AI-driven campaign flow using AdCP might look like this:
93+
94+
1. **Discovery**: Expected outcome is a list of available "Products" matching the agent's intent.
95+
2. **Planning**: The agent uses `create_media_buy` to submit a proposal.
96+
3. **Review**: The Sales Agent (and potentially a human publisher) reviews the proposal.
97+
4. **Execution**: Once approved, the Sales Agent pushes the orders to the underlying ad server (e.g., GAM).
98+
99+
## Architecture
100+
101+
The project follows a clean structure isolating core MCP components, business logic services, and ad server adapters.
102+
103+
```text
104+
salesagent/
105+
├── src/
106+
│ ├── core/ # Core MCP server components
107+
│ ├── services/ # Business logic services
108+
│ ├── adapters/ # Ad server integrations (e.g., GAM)
109+
│ └── admin/ # Admin UI (Flask)
110+
├── scripts/ # Utility and deployment scripts
111+
└── tests/ # Comprehensive test suite
112+
```
113+
114+
## Contributing
115+
116+
Contributions are welcome! Please refer to the [Development Guide](https://github.com/prebid/salesagent/blob/main/docs/development/README.md) in the repository for details on setting up your environment and creating pull requests.

dev-docs/analytics/intentiq.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ No registration for this module is required.
3535
| options.browserBlackList | Optional | String | This is the name of a browser that can be added to a blacklist.| `"chrome"`|
3636
| options.domainName | Optional | String | Specifies the domain of the page in which the IntentIQ object is currently running and serving the impression. This domain will be used later in the revenue reporting breakdown by domain. For example, cnn.com. It identifies the primary source of requests to the IntentIQ servers, even within nested web pages.| `"currentDomain.com"`|
3737
| options. additionalParams | Optional | Array | This parameter allows sending additional custom key-value parameters with specific destination logic (sync, VR, winreport). Each custom parameter is defined as an object in the array. | `[ { parameterName: “abc”, parameterValue: 123, destination: [1,1,0] } ]` |
38-
| options. additionalParams[0].parameterName | Required | String | Name of the custom parameter. This will be sent as a query parameter. | `"abc"` |
39-
| options. additionalParams[0].parameterValue | Required | String / Number | Value to assign to the parameter. | `123` |
40-
| options. additionalParams[0].destination | Required | Array | Array of numbers either `1` or `0`. Controls where this parameter is sent `[sendWithSync, sendWithVr, winreport]`. | `[1, 0, 0]` |
38+
| options. additionalParams[0].parameterName | Optional | String | Name of the custom parameter. This will be sent as a query parameter. | `"abc"` |
39+
| options. additionalParams[0].parameterValue | Optional | String / Number | Value to assign to the parameter. | `123` |
40+
| options. additionalParams[0].destination | Optional | Array | Array of numbers either `1` or `0`. Controls where this parameter is sent `[sendWithSync, sendWithVr, winreport]`. | `[1, 0, 0]` |
4141

4242
#### Example Configuration
4343

@@ -46,11 +46,8 @@ pbjs.enableAnalytics({
4646
provider: 'iiqAnalytics',
4747
options: {
4848
partner: 1177538,
49-
manualWinReportEnabled: false,
50-
reportMethod: "GET",
51-
adUnitConfig: 1,
49+
ABTestingConfigurationSource: 'IIQServer',
5250
domainName: "currentDomain.com",
53-
gamPredictReporting: false
5451
}
5552
});
5653
```
@@ -91,24 +88,28 @@ originalCpm: 1.5, // Original CPM value.
9188
originalCurrency: 'USD', // Original currency.
9289
status: 'rendered', // Auction status, e.g., 'rendered'.
9390
placementId: 'div-1' // ID of the ad placement.
94-
adType: 'banner' // Specifies the type of ad served
91+
adType: 'banner', // Specifies the type of ad served
92+
size: '320x250', // Size of adUnit item,
93+
pos: 0 // The following values are defined in the ORTB 2.5 spec
9594
}
9695
```
9796

9897
{: .table .table-bordered .table-striped }
9998
| Field | Data Type | Description | Example | Mandatory |
10099
|--------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------|-----------|
101-
| biddingPlatformId | Integer | Specify the platform in which this ad impression was rendered – 1 – Prebid, 2 – Amazon, 3 – Google, 4 – Open RTB (including your local Prebid server) | 1 | Yes |
102-
| partnerAuctionId | String | Use this when you are running multiple auction solutions across your assets and have a unified identifier for auctions | 3d44542d-xx-4662-xxxx-4xxxx3d8e | No |
103-
| bidderCode | String | Specifies the name of the bidder that won the auction as reported by Prebid and all other bidding platforms | newAppnexus | Yes |
104-
| prebidAuctionId | String | Specifies the identifier of the Prebid auction. Leave empty or undefined if Prebid is not the bidding platform | 3513ce01-de02-490b-9d87-bfc137697f82 | No |
105-
| cpm | Decimal | Cost per mille of the impression as received from the demand-side auction (without modifications or reductions) | 5.62 | Yes |
106-
| currency | String | Currency of the auction | USD | Yes |
107-
| originalCpm | Decimal | Leave empty or undefined if Prebid is not the bidding platform | 5.5 | No |
108-
| originalCurrency | String | Currency of the original auction | USD | No |
109-
| status | String | Status of the impression. Leave empty or undefined if Prebid is not the bidding platform | rendered | No |
110-
| placementId | String | Unique identifier of the ad unit on the webpage that showed this ad | div-1 | No |
111-
| adType | String | Specifies the type of ad served. Possible values: “banner“, “video“, “native“, “audio“. | banner | No |
100+
| biddingPlatformId | Integer | Specify the platform in which this ad impression was rendered – 1 – Prebid, 2 – Amazon, 3 – Google, 4 – Open RTB (including your local Prebid server) | 1 | Yes |
101+
| partnerAuctionId | String | Use this when you are running multiple auction solutions across your assets and have a unified identifier for auctions | 3d44542d-xx-4662-xxxx-4xxxx3d8e | No |
102+
| bidderCode | String | Specifies the name of the bidder that won the auction as reported by Prebid and all other bidding platforms | newAppnexus | Yes |
103+
| prebidAuctionId | String | Specifies the identifier of the Prebid auction. Leave empty or undefined if Prebid is not the bidding platform | | |
104+
| cpm | Decimal | Cost per mille of the impression as received from the demand-side auction (without modifications or reductions) | 5.62 | Yes |
105+
| currency | String | Currency of the auction | USD | Yes |
106+
| originalCpm | Decimal | Leave empty or undefined if Prebid is not the bidding platform | 5.5 | No |
107+
| originalCurrency | String | Currency of the original auction | USD | No |
108+
| status | String | Status of the impression. Leave empty or undefined if Prebid is not the bidding platform | rendered | No |
109+
| placementId | String | Unique identifier of the ad unit on the webpage that showed this ad | div-1 | No |
110+
| adType | String | Specifies the type of ad served. Possible values: “banner“, “video“, “native“, “audio“. | banner | No |
111+
| size | String | Size of adUnit item | 320x250 | No |
112+
| pos | number | The pos field specifies the position of the adUnit on the page according to the OpenRTB 2.5 specification | 0 | No |
112113

113114
To report the auction win, call the function as follows:
114115

dev-docs/aps.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
layout: bidder
3+
title: APS
4+
description: Prebid APS Bidder Adapter
5+
biddercode: aps
6+
tcfeu_supported: true
7+
dsa_supported: false
8+
gvl_id: 793
9+
usp_supported: true
10+
coppa_supported: true
11+
schain_supported: true
12+
media_types: display, video
13+
deals_supported: true
14+
floors_supported: true
15+
fpd_supported: true
16+
ortb_blocking_supported: true
17+
pbjs: true
18+
pbs: false
19+
prebid_member: true
20+
multiformat_supported: will-bid-on-any
21+
sidebarType: 1
22+
---
23+
24+
### Bidder Config Params
25+
26+
{: .table .table-bordered .table-striped }
27+
28+
| Name | Scope | Description | Example | Type |
29+
| ------------------ | -------- | ---------------------------------------- | --------------------------------- | --------- |
30+
| `aps.accountID` | required | APS-provided ID | `1234` | `string` |
31+
| `aps.debugURL` | optional | Bid endpoint | `https://example.com/bid` | `string` |
32+
| `aps.debug` | optional | Toggle to enable / disable debug mode | `true` | `boolean` |
33+
| `aps.renderMethod` | optional | Debug mode render method | `fif` | `string` |
34+
| `aps.creativeURL` | optional | Creative rendering URL | `https://example.com/creative.js` | `string` |
35+
| `aps.telemetry` | optional | Toggle to enable / disable APS telemetry | `true` | `boolean` |
36+
37+
### Bid Params
38+
39+
None.
40+
41+
## User Syncs
42+
43+
If you'd like to activate user syncs through APS, you must activate iframe syncing.
44+
45+
```javascript
46+
window.pbjs.que.push(function () {
47+
window.pbjs.setConfig({
48+
userSync: {
49+
filterSettings: {
50+
iframe: {
51+
bidders: ['aps'],
52+
filter: 'include',
53+
},
54+
},
55+
},
56+
});
57+
});
58+
```

dev-docs/bidder-adaptor.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ export const spec = {
238238
onSetTargeting: function(bid) {},
239239
onBidderError: function({ error, bidderRequest }) {},
240240
onAdRenderSucceeded: function(bid) {},
241-
supportedMediaTypes: [BANNER, VIDEO, NATIVE, AUDIO]
241+
supportedMediaTypes: [BANNER, VIDEO, NATIVE, AUDIO],
242+
alwaysHasCapacity: true // When true, this bidder will be omitted in checking if origin has http capacity
242243
}
243244
registerBidder(spec);
244245

@@ -1190,6 +1191,7 @@ export const spec = {
11901191
code: BIDDER_CODE,
11911192
gvlid: 0000000000,
11921193
supportedMediaTypes: [BANNER, VIDEO, NATIVE],
1194+
alwaysHasCapacity: true,
11931195
aliases: [{code: "myAlias", gvlid: 99999999999} ],
11941196
/**
11951197
* Determines whether or not the given bid request is valid.

0 commit comments

Comments
 (0)