Agenticx New Bidder Adapter - #4864
Conversation
…dapter-For-Adsmartx RM-1477 : Added a new adapter for adsmartx
…apter-For-Adsmartx
…dapter-For-Adsmartx Rm 1477 prebid adapter for adsmartx
…com/smart-exchange-ai-digital/agenticX-prebid-server into RM-1891-Rebranding-Prebid-Adapter
…dapter-For-Adsmartx RM-1477 : Fixed version mismatch
…/agenticX-prebid-server into RM-1891-Rebranding-Prebid-Adapter
…ng-Prebid-Adapter RM-1891 : Rebranded adsmartx adapter to agenticx
| } | ||
|
|
||
| func getBidType(mtype openrtb2.MarkupType) (openrtb_ext.BidType, error) { | ||
| switch mtype { |
There was a problem hiding this comment.
Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeAudio. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.
| } | ||
|
|
||
| func getBidType(mtype openrtb2.MarkupType) (openrtb_ext.BidType, error) { | ||
| switch mtype { |
There was a problem hiding this comment.
Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeBanner. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.
| } | ||
|
|
||
| func getBidType(mtype openrtb2.MarkupType) (openrtb_ext.BidType, error) { | ||
| switch mtype { |
There was a problem hiding this comment.
Consider this as a suggestion. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeVideo. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.
| @@ -0,0 +1,22 @@ | |||
| endpoint: "https://ads.theagenticx.ai/ads/rtb/prebid/server" | |||
| endpoint: "https://ads.theagenticx.ai/ads/rtb/prebid/server" | ||
| endpointCompression: gzip | ||
| maintainer: | ||
| email: prebid@aidigital.com |
There was a problem hiding this comment.
waiting for response
| return nil, append(errs, fmt.Errorf("no valid impressions")) | ||
| } | ||
|
|
||
| request.Imp = validImps |
There was a problem hiding this comment.
MakeRequests receives request as a pointer and modifies it directly (request.Imp = validImps, request.Test = 1). In multi-bidder auctions, PBS passes the same *openrtb2.BidRequest pointer to every adapter concurrently — mutating it here can corrupt what other adapters see.
Please work on a shallow copy:
reqCopy := *request
reqCopy.Imp = validImps
if setTestMode {
reqCopy.Test = 1
}
reqJSON, err := jsonutil.Marshal(reqCopy)| imp.BidFloor = impExt.BidFloor | ||
| } | ||
|
|
||
| if impExt.TestMode == 1 { |
There was a problem hiding this comment.
testMode is an imp-level parameter, but setting it causes request.Test = 1 — a request-level flag that affects every impression in the outgoing request. If only one imp out of several has testMode: 1, all imps are sent as a test request.
Is this intentional? If so, please add a comment explaining the design decision. If not, consider an alternative approach (e.g. reject the request entirely, or apply test mode only if all imps agree).
| - audio | ||
| userSync: | ||
| iframe: | ||
| url: "https://ads.theagenticx.ai/sync?ssp_site_id=49964415&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&iframe_enabled=true&redir={{.RedirectURL}}" |
There was a problem hiding this comment.
The ssp_site_id=49964415 is hardcoded in both the iframe and redirect sync URLs. This means every publisher using this adapter syncs cookies under the same site ID. Is this a global PBS-level ID that Agenticx has assigned for this integration? If yes, please add a comment explaining it. If ssp_site_id should vary per publisher, this URL needs to be reworked.
| @@ -0,0 +1,29 @@ | |||
| { | |||
There was a problem hiding this comment.
All four parameters are optional — an empty {} object is a valid set of bidder params. A request with no sspId and no siteId carries no publisher identifier. Can Agenticx's server correctly route and attribute such a request? If either sspId or siteId is required for proper routing, please add a "required" array to the schema.
| @@ -0,0 +1,89 @@ | |||
| { | |||
There was a problem hiding this comment.
Could you add a supplemental fixture to cover the request mutation scenario? For example supplemental/multi_imp_one_invalid.json:
- Two impressions in the request: one valid (with banner), one invalid (malformed ext)
- Expected: only the valid imp appears in the outgoing
httpCallsbody - Expected:
expectedMakeRequestsErrorscontains the parse error for the bad imp
This fixture would catch any regression where request.Imp gets modified in place rather than working on a copy — currently a real risk since MakeRequests assigns directly to request.Imp.
Code coverage summaryNote:
agenticxRefer here for heat map coverage report |


New Bidder Adapter
Documentation PR
prebid/prebid.github.io#6649