Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
cbd3b73
RM-1476 : Prebid adapter for adsmartx
pritishmd-talentica Jan 13, 2026
2088c35
Merge pull request #2 from prebid/master
sushant-dey-talentica Jan 16, 2026
f184a06
RM-1476 : Improved unit test coverage
pritishmd-talentica Jan 21, 2026
9723093
RM-1476 : Updated bidder documentation description
pritishmd-talentica Jan 22, 2026
9c9b88f
RM-1476 : Review comments handled
pritishmd-talentica Feb 25, 2026
595a234
RM-1476 : Minor changes
pritishmd-talentica Feb 25, 2026
d894733
RM-1476 : Dedupe code for adapter risemediatech
pritishmd-talentica Feb 25, 2026
a80a4eb
Added only ssp_id for user sync flow
pritishmd-talentica Mar 4, 2026
f228d14
Fixed bugs
pritishmd-talentica Mar 4, 2026
0b044a5
RM-1476 : handled all copilot review comments
pritishmd-talentica Mar 6, 2026
a81a61a
RM-1476 : Handled copilot review comments
pritishmd-talentica Mar 6, 2026
c4fe9ea
Merge pull request #4 from smart-exchange-ai-digital/RM-1476-prebid-j…
pritishmd-talentica Mar 6, 2026
81a2480
RM-1476 : Handled prebid js PR review comments
pritishmd-talentica Mar 10, 2026
550551c
Merge remote-tracking branch 'upstream/master' into RM-1476-prebid-js…
pritishmd-talentica Mar 17, 2026
6a92720
Merge branch 'master' into RM-1476-prebid-js-adapter-smart-exchange
pritishmd-talentica Mar 17, 2026
0ed1c9a
Merge pull request #5 from smart-exchange-ai-digital/RM-1476-prebid-j…
pritishmd-talentica Mar 17, 2026
dbdb1f2
Merge pull request #6 from prebid/master
pritishmd-talentica Apr 14, 2026
089ee2a
RM-1476 : Handled review comment to log a warning that risemediatech …
pritishmd-talentica Apr 14, 2026
34fc43a
RM-1476: Added a function to disable the adapter.
pritishmd-talentica Apr 14, 2026
c5cb672
Merge pull request #7 from smart-exchange-ai-digital/RM-1476-prebid-j…
pritishmd-talentica Apr 14, 2026
7844adc
RM-1476 : Updated unit tests
pritishmd-talentica Apr 14, 2026
f3b8946
Merge pull request #8 from smart-exchange-ai-digital/RM-1476-prebid-j…
pritishmd-talentica Apr 14, 2026
844ccc7
RM-1891 : Rebranded AdSmartX Prebid adapter to AgenticX
pritishmd-talentica Jun 29, 2026
62cddb4
Merge pull request #9 from prebid/master
sushant-dey-talentica Jun 29, 2026
d379b66
Merge pull request #10 from smart-exchange-ai-digital/RM-1891-Rebrand…
sushant-dey-talentica Jun 29, 2026
140525c
Merge branch 'master' into master
sushant-dey-talentica Jul 2, 2026
68d4f8a
RM-1891 : Fixed linter issues
pritishmd-talentica Jul 13, 2026
823e04b
Merge pull request #11 from smart-exchange-ai-digital/RM-1891-Rebrand…
sushant-dey-talentica Jul 13, 2026
40bd422
RM-1891: Updated tests
pritishmd-talentica Jul 23, 2026
cbcc787
Merge pull request #12 from smart-exchange-ai-digital/RM-1891-Rebrand…
sushant-dey-talentica Jul 23, 2026
1d5a929
Merge branch 'master' into master
sushant-dey-talentica Jul 23, 2026
b6fa389
RM-1891: Add unit tests for AgenticX bidderUtils with support for aud…
pritishmd-talentica Jul 23, 2026
9f32f36
Merge pull request #13 from smart-exchange-ai-digital/RM-1891-Rebrand…
sushant-dey-talentica Jul 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BANNER, VIDEO } from '../../src/mediaTypes.js';
import { BANNER, VIDEO, AUDIO } from '../../src/mediaTypes.js';
Comment thread
pritishmd-talentica marked this conversation as resolved.
import { ortbConverter } from '../ortbConverter/converter.js';
import { deepAccess, logInfo, logWarn } from '../../src/utils.js';

Expand Down Expand Up @@ -56,6 +56,9 @@ export function createConverter(config = {}) {
} else if (mediaTypes[VIDEO]) {
logInfo('Adding video media type to impression:', mediaTypes[VIDEO]);
imp.video = { ...(imp.video || {}), ...mediaTypes[VIDEO] };
} else if (mediaTypes[AUDIO]) {
logInfo('Adding audio media type to impression:', mediaTypes[AUDIO]);
imp.audio = { ...(imp.audio || {}), ...mediaTypes[AUDIO] };
}
return imp;
},
Expand Down Expand Up @@ -131,6 +134,14 @@ export function isBidRequestValid(bid) {
return false;
}
}

if (mediaTypes?.[AUDIO]) {
const audio = mediaTypes[AUDIO];
if (!audio.mimes || !Array.isArray(audio.mimes) || audio.mimes.length === 0) {
logWarn('Invalid audio bid request: Missing or invalid mimes.');
return false;
}
}
return true;
}

Expand Down Expand Up @@ -204,6 +215,10 @@ export function interpretResponse(serverResponse, request, config = {}) {
bidResponse.mediaType = VIDEO;
bidResponse.vastXml = bid.adm;
break;
case 3:
bidResponse.mediaType = AUDIO;
bidResponse.vastXml = bid.adm;
break;
default:
if (bid.mtype != null) {
logWarn('Unknown media type: ', bid.mtype, ' for bidId: ', bid.id);
Expand Down
12 changes: 6 additions & 6 deletions modules/adsmartxBidAdapter.js → modules/agenticxBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER, VIDEO } from '../src/mediaTypes.js';
import { BANNER, VIDEO, AUDIO } from '../src/mediaTypes.js';
import {
createConverter,
isBidRequestValid as validateBidRequest,
createBuildRequests,
interpretResponse as interpretResponseUtil,
createGetUserSyncs,
} from '../libraries/adsmartxUtils/bidderUtils.js';
} from '../libraries/agenticxUtils/bidderUtils.js';

const BIDDER_CODE = 'adsmartx';
const ENDPOINT_URL = 'https://ads.adsmartx.com/ads/rtb/prebid/js';
const SYNC_URL = 'https://sync.adsmartx.com/sync';
const BIDDER_CODE = 'agenticx';
const ENDPOINT_URL = 'https://ads.theagenticx.ai/ads/rtb/prebid/js';
const SYNC_URL = 'https://sync.theagenticx.ai/sync';
const DEFAULT_CURRENCY = 'USD';
const DEFAULT_TTL = 60;

Expand All @@ -33,7 +33,7 @@ export const spec = {
code: BIDDER_CODE,
Comment thread
pritishmd-talentica marked this conversation as resolved.
// TODO: set gvlid once confirmed with AI Digital / AdSmartX team
gvlid: undefined,
supportedMediaTypes: [BANNER, VIDEO],
supportedMediaTypes: [BANNER, VIDEO, AUDIO],
isBidRequestValid,
buildRequests,
interpretResponse,
Expand Down
14 changes: 7 additions & 7 deletions modules/adsmartxBidAdapter.md → modules/agenticxBidAdapter.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Overview

Module Name : AdSmartX Bidder Adapter
Module Name : AgenticX Bidder Adapter
Module Type : Bid Adapter
Maintainer : prebid@aidigital.com

# Description
Connects to AdSmartX Exchange for bids
AdSmartX supports Display & Video(Instream) currently.
Connects to AgenticX Exchange for bids
AgenticX supports Display, Video(Instream) & Audio currently.

This adapter is maintained by Smart Exchange, the legal entity behind this implementation. Our official domain is [AI Digital](https://www.aidigital.com/).
This adapter is maintained by Smart Exchange, the legal entity behind this implementation. Our official domain is [The AgenticX](https://theagenticx.ai/).
# Sample Ad Unit : Banner
```
var adUnits = [
Expand All @@ -23,7 +23,7 @@ This adapter is maintained by Smart Exchange, the legal entity behind this imple
},
bids:[
{
bidder: 'adsmartx',
bidder: 'agenticx',
params: {
bidfloor: 0.001,
testMode: 1,
Expand All @@ -41,7 +41,7 @@ This adapter is maintained by Smart Exchange, the legal entity behind this imple
```
var videoAdUnit = [
{
code: 'adsmartx',
code: 'agenticx',
mediaTypes: {
video: {
playerSize: [640, 480], // required
Expand All @@ -57,7 +57,7 @@ This adapter is maintained by Smart Exchange, the legal entity behind this imple
},
bids:[
{
bidder: 'adsmartx',
bidder: 'agenticx',
params: {
bidfloor: 0.001,
testMode: 1,
Expand Down
2 changes: 1 addition & 1 deletion modules/risemediatechBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
createConverter,
createBuildRequests,
interpretResponse as interpretResponseUtil,
} from '../libraries/adsmartxUtils/bidderUtils.js';
} from '../libraries/agenticxUtils/bidderUtils.js';
import { logWarn } from '../src/utils.js';

const BIDDER_CODE = 'risemediatech';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { expect } from 'chai';
import { spec } from 'modules/adsmartxBidAdapter.js';
import { spec } from 'modules/agenticxBidAdapter.js';

describe('AdSmartX adapter', () => {
describe('AgenticX adapter', () => {
const validBidRequest = {
bidder: 'adsmartx',
bidder: 'agenticx',
params: {
publisherId: '12345',
adSlot: '/1234567/adunit',
Expand Down Expand Up @@ -172,7 +172,7 @@ describe('AdSmartX adapter', () => {
const request = spec.buildRequests([validBidRequest], bidderRequest);
expect(request).to.be.an('object');
expect(request.method).to.equal('POST');
expect(request.url).to.equal('https://ads.adsmartx.com/ads/rtb/prebid/js');
expect(request.url).to.equal('https://ads.theagenticx.ai/ads/rtb/prebid/js');
expect(request.data).to.be.an('object');
});

Expand Down Expand Up @@ -499,7 +499,7 @@ describe('AdSmartX adapter', () => {
expect(syncs).to.be.an('array').with.lengthOf(1);
expect(syncs[0]).to.have.property('type', 'iframe');
expect(syncs[0]).to.have.property('url');
expect(syncs[0].url).to.include('https://sync.adsmartx.com/sync');
expect(syncs[0].url).to.include('https://sync.theagenticx.ai/sync');
});

it('should return image sync when only pixelEnabled is true', () => {
Expand Down Expand Up @@ -658,7 +658,7 @@ describe('AdSmartX adapter', () => {

expect(syncs).to.be.an('array').with.lengthOf(1);
expect(syncs[0].type).to.equal('iframe');
expect(syncs[0].url).to.include('https://sync.adsmartx.com/sync');
expect(syncs[0].url).to.include('https://sync.theagenticx.ai/sync');
expect(syncs[0].url).to.include('ssp_id=630141');
expect(syncs[0].url).to.include('iframe_enabled=true');
});
Expand Down Expand Up @@ -1085,5 +1085,110 @@ describe('AdSmartX adapter', () => {

expect(spec.isBidRequestValid(videoBid)).to.equal(false);
});

it('should return true for a valid audio bid request', () => {
const validAudioBid = {
...validBidRequest,
mediaTypes: {
audio: {
mimes: ['audio/mp4']
}
}
};

expect(spec.isBidRequestValid(validAudioBid)).to.equal(true);
});

it('should return false for audio bid request with missing mimes', () => {
const invalidAudioBid = {
...validBidRequest,
mediaTypes: {
audio: {}
}
};

expect(spec.isBidRequestValid(invalidAudioBid)).to.equal(false);
});

it('should return false for audio bid request with mimes not an array', () => {
const invalidAudioBid = {
...validBidRequest,
mediaTypes: {
audio: {
mimes: 'audio/mp4'
}
}
};

expect(spec.isBidRequestValid(invalidAudioBid)).to.equal(false);
});

it('should return false for audio bid request with empty mimes array', () => {
const invalidAudioBid = {
...validBidRequest,
mediaTypes: {
audio: {
mimes: []
}
}
};

expect(spec.isBidRequestValid(invalidAudioBid)).to.equal(false);
});
});

describe('buildRequests - audio media type', () => {
it('should build an audio impression if only audio mediaType is present', () => {
const audioBidRequest = {
...validBidRequest,
mediaTypes: {
audio: {
mimes: ['audio/mp4'],
minduration: 5,
maxduration: 30
}
}
};

const request = spec.buildRequests([audioBidRequest], bidderRequest);
const { imp } = request.data;
expect(imp[0]).to.have.property('audio');
expect(imp[0]).to.not.have.property('banner');
expect(imp[0]).to.not.have.property('video');
expect(imp[0].audio.mimes).to.include('audio/mp4');
expect(imp[0].audio).to.include({ minduration: 5, maxduration: 30 });
});
});

describe('interpretResponse - audio media type', () => {
it('should set mediaType to audio and include vastXml when mtype is 3', () => {
const audioResponse = {
body: {
id: '2def',
seatbid: [
{
bid: [
{
id: '1abc',
impid: '1abc',
price: 1.75,
adm: '<VAST version="3.0">audio</VAST>',
crid: 'audio-creative-123',
adomain: ['audio-example.com'],
mtype: 3
}
]
}
]
}
};

const request = spec.buildRequests([validBidRequest], bidderRequest);
const bids = spec.interpretResponse(audioResponse, request);

expect(bids).to.be.an('array').with.lengthOf(1);
expect(bids[0]).to.have.property('mediaType', 'audio');
expect(bids[0]).to.have.property('vastXml', '<VAST version="3.0">audio</VAST>');
});
});
});
Loading