Skip to content

Agenticx New Bidder Adapter - #4864

Open
pritishmd-talentica wants to merge 15 commits into
prebid:masterfrom
smart-exchange-ai-digital:master
Open

Agenticx New Bidder Adapter#4864
pritishmd-talentica wants to merge 15 commits into
prebid:masterfrom
smart-exchange-ai-digital:master

Conversation

@pritishmd-talentica

Copy link
Copy Markdown

New Bidder Adapter

Documentation PR
prebid/prebid.github.io#6649

}

func getBidType(mtype openrtb2.MarkupType) (openrtb_ext.BidType, error) {
switch mtype {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@przemkaczmarek przemkaczmarek self-assigned this Jul 30, 2026
@@ -0,0 +1,22 @@
endpoint: "https://ads.theagenticx.ai/ads/rtb/prebid/server"

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.

doesnt work:

Image

endpoint: "https://ads.theagenticx.ai/ads/rtb/prebid/server"
endpointCompression: gzip
maintainer:
email: prebid@aidigital.com

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.

waiting for response

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.

verified:

Image

return nil, append(errs, fmt.Errorf("no valid impressions"))
}

request.Imp = validImps

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.

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 {

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.

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}}"

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.

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 @@
{

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.

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 @@
{

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.

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 httpCalls body
  • Expected: expectedMakeRequestsErrors contains 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.

@github-actions

Copy link
Copy Markdown

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, cf1c599

agenticx

Refer here for heat map coverage report

github.com/prebid/prebid-server/v4/adapters/agenticx/agenticx.go:19:	Builder		100.0%
github.com/prebid/prebid-server/v4/adapters/agenticx/agenticx.go:23:	MakeRequests	96.4%
github.com/prebid/prebid-server/v4/adapters/agenticx/agenticx.go:80:	parseImpExt	100.0%
github.com/prebid/prebid-server/v4/adapters/agenticx/agenticx.go:92:	MakeBids	100.0%
github.com/prebid/prebid-server/v4/adapters/agenticx/agenticx.go:128:	getBidType	100.0%
total:									(statements)	98.3%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants