Skip to content

Agentic Audiences RTD Module: initial release#14626

Merged
patmmccann merged 12 commits into
prebid:masterfrom
InteractiveAdvertisingBureau:feature/adds-agentic-audiences
Apr 14, 2026
Merged

Agentic Audiences RTD Module: initial release#14626
patmmccann merged 12 commits into
prebid:masterfrom
InteractiveAdvertisingBureau:feature/adds-agentic-audiences

Conversation

@therevoltingx
Copy link
Copy Markdown
Contributor

@therevoltingx therevoltingx commented Mar 22, 2026

PR: Agentic Audiences RTD submodule (agenticAudienceAdapter)

Use this document as the pull request description (copy into GitHub). Adjust maintainer links and test results before opening the PR.

Summary

Adds agenticAudienceAdapter, a Real-Time Data (RTD) submodule that reads Agentic Audiences embedding payloads from browser storage (localStorage, with cookie fallback) and merges them into the auction’s global ORTB2 fragment as user.data, following the normative OpenRTB community extension: Agentic Audiences in OpenRTB (extensions/community_extensions/agentic-audiences.md in InteractiveAdvertisingBureau/openrtb).

Motivation

Publishers and data partners that store Agentic Audiences vectors on the page need a standard way to attach those signals to Prebid.js bid requests so adapters and Prebid Server receive BidRequest.user.data in the interoperable shape defined by IAB.

Specification

Wire format aligns with the community extension Agentic Audiences in OpenRTB:

Related context:

Behavior

  • Submodule name: agenticAudience (registered on realTimeData).
  • ORTB2: Deep-merges into reqBidsConfigObj.ortb2Fragments.global:
    • user.data: a single-element array containing one OpenRTB Data object:
      • name: always agenticAudience (submodule identifier).
      • segment: array of segments built from the configured storage key.
    • Each segment includes optional id / name and ext.aa with:
      • ver, vector, dimension, model, type
  • Storage: Reads one string from params.storageKey if it is a non-empty string; otherwise uses the default key _agentic_audience_ (exported as DEFAULT_STORAGE_KEY from the module).
    • Value must be Base64-encoded JSON that parses to an object with an entries array.
    • Each element of entries is mapped to a segment.
  • Consent / GVLID: The submodule does not set a built-in gvlid on the RTD spec. For TCF purpose and vendor checks, publishers can supply a Global Vendor List ID via gvlMapping, keyed by the RTD submodule name agenticAudience (see below). Storage access uses the RTD module’s storage manager with module type RTD and name agenticAudience.

Build

Include the RTD host module and this submodule in the bundle:

gulp build --modules=rtdModule,agenticAudienceAdapter,<otherModules>...

Configuration

Minimal (default storage key):

pbjs.setConfig({
  realTimeData: {
    dataProviders: [
      {
        name: 'agenticAudience',
        params: {},
      },
    ],
  },
});

Custom storage key:

pbjs.setConfig({
  realTimeData: {
    dataProviders: [
      {
        name: 'agenticAudience',
        params: {
          storageKey: '_my_vendor_agentic_audience_',
        },
      },
    ],
  },
});

Parameters

Path Type Description
params.storageKey String Optional. Non-empty string selects the localStorage / cookie key. If omitted or empty, _agentic_audience_ is used.

init always succeeds when the submodule is included in the build.

TCF: gvlMapping (optional)

To associate this RTD submodule with a TCF vendor for consent / activity controls, set gvlMapping.agenticAudience to that vendor’s numeric GVL ID (replace XXX with the real ID from the GVL):

pbjs.setConfig({
  gvlMapping: {
    agenticAudience: XXX,
  },
});

Substitute a numeric literal for XXX (for example 1126); it must not be a string.

You can combine this with realTimeData and other config in one or more setConfig calls. Example:

pbjs.setConfig({
  gvlMapping: {
    agenticAudience: 123, // example only — use your vendor’s GVL ID
  },
  realTimeData: {
    dataProviders: [{ name: 'agenticAudience', params: {} }],
  },
});

The key agenticAudience must match the RTD data provider / submodule name.

Storage payload shape (producer responsibility)

The string at the storage key should be btoa(JSON.stringify(payload)) (or equivalent), where payload includes:

{
  "entries": [
    {
      "id": "optional-segment-id",
      "name": "optional-segment-name",
      "ver": "1.0.0",
      "vector": "<Base64 Float32 little-endian payload per spec>",
      "dimension": 10,
      "model": "sbert-mini-ctx-001",
      "type": [1, 2]
    }
  ]
}

The submodule does not validate Base64 length vs dimension or normalize type to an array; it passes stored values through into ext.aa except for the structural mapping above.

Example ORTB2 fragment (conceptual)

After merge:

{
  "user": {
    "data": [
      {
        "name": "agenticAudience",
        "segment": [
          {
            "id": "seg-1",
            "name": "identity-contextual",
            "ext": {
              "aa": {
                "ver": "1.0.0",
                "vector": "",
                "dimension": 10,
                "model": "sbert-mini-ctx-001",
                "type": [1, 2]
              }
            }
          }
        ]
      }
    ]
  }
}

Files

File Role
modules/agenticAudienceAdapter.js RTD submodule implementation
test/spec/modules/agenticAudienceAdapter_spec.js Unit tests
modules/.submodules.json Registers agenticAudienceAdapter in the build

@github-actions
Copy link
Copy Markdown

Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!

  • modules/agenticAudienceAdapter.js

Tread carefully! This PR adds 1 linter warning (possibly disabled through directives):

  • modules/agenticAudienceAdapter.js (+1 warning)

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 01b523c7e3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread modules/agenticAudienceAdapter.js
Comment thread modules/agenticAudienceAdapter.js
Comment thread modules/agenticAudienceAdapter.md Outdated
Comment thread modules/agenticAudienceAdapter.md Outdated
## References

- [IABTechLab Agentic Audiences](https://github.com/IABTechLab/agentic-audiences)
- [Agentic Audiences in OpenRTB](https://github.com/IABTechLab/agentic-audiences) (Segment extension proposal)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not appear to be the correct reference

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the correct place is actually

InteractiveAdvertisingBureau/openrtb#210

@patmmccann patmmccann changed the title Agentic Audiences: Adds New Module for Agentic Audiences by Tech Lab Agentic Audiences rtd: initial commit Mar 22, 2026
Comment thread modules/agenticAudienceAdapter.md Outdated
"model": "sbert-mini-ctx-001",
"dimension": 3,
"type": [1, 2]
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread modules/agenticAudienceAdapter.js Outdated
const REAL_TIME_MODULE = 'realTimeData';
const MODULE_NAME = 'agenticAudience';

export const DEFAULT_PROVIDERS = {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove references to specific vendors in the code and just move this into the documentation so the publisher chooses it with config

Comment thread modules/agenticAudienceAdapter.md Outdated

This RTD module injects Agentic Audiences (vector-based) signals into the OpenRTB bid request. Agentic Audiences is an open standard by [IABTechLab](https://github.com/IABTechLab/agentic-audiences) for exchanging semantic embeddings—identity, contextual, and reinforcement signals—in a privacy-preserving, interoperable format.

The module reads agentic audience data from browser storage (localStorage or cookie) and adds it to `user.data` as segment extensions for downstream bidders.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This generally feels unnecessary, is this intended as an example? Liveramp and optable are both rather capable of maintaining their own modules. This would allow them to communicate with their endpoints rather than relying on data being in storage, which seems like a bad place for it given the alternatives

user: {
data: [
{
name: 'live_ramp',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you breaking up liveramps name

data: [
{
name: 'live_ramp',
segment: [
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again this looks rather incomplete and is not in the segment object spec

Comment thread modules/agenticAudienceAdapter.md Outdated
gulp build --modules="rtdModule,agenticAudienceAdapter,..."
```

> Note that the global RTD module, `rtdModule`, is a prerequisite.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to commit to submodules.json in that case

Comment thread modules/agenticAudienceAdapter.md Outdated
name: 'agenticAudience',
waitForIt: true,
params: {
providers: {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please define types for this entire interface

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi i added a proper type table below. let me know if that's what you meant

Comment thread modules/agenticAudienceAdapter.md Outdated
| dimension | number | Vector dimension |
| type | number[] | Embedding type(s): identity, contextual, reinforcement |

These fields align with the [Agentic Audiences OpenRTB Segment extension](https://github.com/IABTechLab/agentic-audiences).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This extension does not appear to be at this link and youre not using extension fields

@patmmccann patmmccann self-assigned this Mar 22, 2026
@patmmccann
Copy link
Copy Markdown
Collaborator

Generally what's your goal here? Optable and liveramp both already have modules they could pr to inject their embeddings. It's unclear what utility this has

@github-actions
Copy link
Copy Markdown

Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!

  • modules/agenticAudienceAdapter.js

@therevoltingx therevoltingx marked this pull request as draft March 22, 2026 01:06
@therevoltingx
Copy link
Copy Markdown
Contributor Author

@patmmccann thanks for the review comments. just realized that i actually have to get this: InteractiveAdvertisingBureau/openrtb#210 merged before even tackling this.

let me get that PR merged first before circling back to this PR. i will also ask liveramp and internally if we can just ask vendors to update their own prebid modules.

@patmmccann
Copy link
Copy Markdown
Collaborator

@patmmccann thanks for the review comments. just realized that i actually have to get this: InteractiveAdvertisingBureau/openrtb#210 merged before even tackling this.

let me get that PR merged first before circling back to this PR. i will also ask liveramp and internally if we can just ask vendors to update their own prebid modules.

Great! We're really looking forward to transacting on this, thanks for pushing it forward

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!

  • modules/agenticAudienceAdapter.js

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!

  • modules/agenticAudienceAdapter.js

@therevoltingx therevoltingx force-pushed the feature/adds-agentic-audiences branch from fae6daf to 21ebd4d Compare April 6, 2026 19:10
@therevoltingx therevoltingx marked this pull request as ready for review April 6, 2026 19:12
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!

  • modules/agenticAudienceAdapter.js

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!

  • modules/agenticAudienceAdapter.js

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 6, 2026

Coverage Report for CI Build 24425438433

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+0.001%) to 96.343%

Details

  • Coverage increased (+0.001%) from the base build.
  • Patch coverage: 3 uncovered changes across 1 file (149 of 152 lines covered, 98.03%).
  • 3 coverage regressions across 2 files.

Uncovered Changes

File Changed Covered %
modules/agenticAudienceAdapter.js 34 31 91.18%

Coverage Regressions

3 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
modules/widespaceBidAdapter.js 2 83.67%
modules/browsiAnalyticsAdapter.js 1 92.31%

Coverage Stats

Coverage Status
Relevant Lines: 225098
Covered Lines: 216866
Line Coverage: 96.34%
Relevant Branches: 52500
Covered Branches: 42636
Branch Coverage: 81.21%
Branches in Coverage %: No
Coverage Strength: 72.95 hits per line

💛 - Coveralls

@therevoltingx
Copy link
Copy Markdown
Contributor Author

@patmmccann
ok we are now ready to resume attempting to release this module.

we discussed with liveramp and internally and the main idea here is to have one universal module for agentic audiences. this is the same approach we took for PAIR btw.

but basically providers don't have to go through the whole PR->merge process and simply document their configuration for this module.

hope that explanation makes sense and let me know if i missed anything with the PR.
i also added a PR for its documentation here: prebid/prebid.github.io#6518

@therevoltingx therevoltingx changed the title Agentic Audiences rtd: initial commit Adds Tech Lab Agentic Audiences Apr 7, 2026
@patmmccann
Copy link
Copy Markdown
Collaborator

@codex review

@patmmccann patmmccann changed the title Adds Tech Lab Agentic Audiences Agentic Audiences RTD Module: initial release Apr 13, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 21ebd4dfc0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread modules/agenticAudienceAdapter.js
Comment thread modules/agenticAudienceAdapter.js Outdated

function init(config, userConsent) {
const providers = config?.params?.providers;
if (!providers || typeof providers !== 'object' || Object.keys(providers).length === 0) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Reject array-valued providers configs

The init guard treats any object as valid, but arrays also satisfy typeof providers === 'object'. A misconfigured providers array will pass initialization and later emit numeric provider names ("0", "1") in user.data[].name, producing unexpected OpenRTB payloads instead of failing fast. Restrict this check to plain objects (and not arrays).

Useful? React with 👍 / 👎.

@patmmccann patmmccann requested a review from dgirardi April 13, 2026 16:58
Comment thread modules/agenticAudienceAdapter.js
Comment thread modules/agenticAudienceAdapter.js Outdated
for (let i = 0; i < providerKeys.length; i++) {
const provider = providerKeys[i];
const providerParams = providers[provider];
const storageKey = providerParams && providerParams.storageKey;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please type your public interface

Comment thread modules/agenticAudienceAdapter.js Outdated
* @param {Object} userConsent
*/
function getBidRequestData(reqBidsConfigObj, callback, config, userConsent) {
const providers = config?.params?.providers;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please type your public interface

Comment thread modules/agenticAudienceAdapter.js
@github-actions
Copy link
Copy Markdown

Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!

  • modules/agenticAudienceAdapter.js

@therevoltingx
Copy link
Copy Markdown
Contributor Author

@patmmccann moving to typescript proved to be a way bigger change. can we move forward with just JS?
i removed multiple providers and gvlid and documented how to use gvlmapping.

@patmmccann patmmccann merged commit 53e6687 into prebid:master Apr 14, 2026
102 checks passed
mike-lei pushed a commit to wishabi/Prebid.js that referenced this pull request Apr 21, 2026
* adds agentic audiences

* fixes typo and updates docs

* fixes data object

* adds example

* uses multiple data entries

* adds agentic audiences spec

* uses snakecase

* cleans up implementation

* updates to latest extension

* adds vendorless id

* adds to submodules.json

* remove gvlid and multiple providers

---------

Co-authored-by: Miguel Morales <miguel@iabtechlab.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants