OptionalmaxMaximum messages to keep in history
OptionalpersistWhether to persist conversations
OptionalworkingTimeout for 'working' status (max 120s per PR #78)
OptionaldefaultDefault max clarifications
Creative agent URL
OptionalprotocolProtocol to use (defaults to 'mcp')
OptionalauthAuthentication token if required
OptionaladcpAdCP protocol version this client speaks to agents. Defaults to
ADCP_VERSION — the GA version the SDK ships against. Override
to pin to an older stable (e.g., '3.0.0') or opt into a beta channel
('3.1.0-beta.1') once that registry ships.
Stage 2 plumbs the option through and validates it at construction
time; cross-major pins (e.g. '4.0.0-beta.1' while the SDK ships
against major 3) throw ConfigurationError. Stage 3 wires per-instance
schema/validator selection off this field.
Typed as AdcpVersion | (string & {}) so editors autocomplete
canonical values from COMPATIBLE_ADCP_VERSIONS while still
accepting forward-compatible strings.
OptionalwireOptional wire-only AdCP version envelope override. Request/response
validation still uses adcpVersion; protocol envelopes use this value.
OptionalversionControls emission of AdCP version envelope fields. Defaults to auto.
none is primarily for conformance harnesses that need to send a
request exactly as authored, without SDK-managed version fields.
OptionaldebugEnable debug logging
OptionaluserCustom User-Agent header sent with all outbound protocol requests.
Overridden by per-agent headers['User-Agent'] if set.
OptionalheadersAdditional headers to include in requests
OptionalonActivity callback for observability (logging, UI updates, etc)
OptionalonTransport-level diagnostics callback for outbound HTTP requests.
Receives sanitized request/response/failure events from the SDK's protocol fetch layer. Header maps are allowlisted/redacted and URLs have credentials, query strings, and fragments stripped before emission.
OptionalhandlersTask completion handlers — called for both sync responses and webhook completions.
For at-least-once webhook delivery, set handlers.webhookDedup to
drop duplicate retries by idempotency_key. See
docs/guides/PUSH-NOTIFICATION-CONFIG.md#deduplication.
OptionalwebhookWebhook secret for signature verification (recommended for production)
OptionalwebhookWebhook URL template with macro substitution
Available macros:
OptionalreportingReporting webhook frequency
OptionalvalidateValidate that the seller supports required features before each task call. When true, tasks like syncAudiences will fail fast with FeatureUnsupportedError if the seller hasn't declared audience_targeting support.
OptionalrequireGate mutating-task dispatch on the seller's declared major version.
When the seller returns an authoritative get_adcp_capabilities
response, the guard requires:
major_versions includes 3adcp.idempotency.replay_ttl_seconds is declared (spec-required)Sellers whose capabilities are synthesized from tools/list (no
authoritative get_adcp_capabilities response) route through the
v2 adapter with a one-time warning — a compliant v3 seller would
declare itself, so absence of a declaration is read as v2. Adopters
who need a hard "definitely-v3" gate should validate
(await client.getCapabilities())._synthetic === false directly.
Throws VersionUnsupportedError before the request is sent when
the guard rejects. Bypass with allowV2 or — process-wide as a
fallback — ADCP_ALLOW_V2=1.
OptionalallowPer-client bypass for the v3 guard. When true, the guard is off
regardless of the ADCP_ALLOW_V2 env var. When undefined, the env
var is consulted as a fallback. Set explicitly in multi-tenant
deployments so one tenant's override can't silently disable safety
for another.
OptionalvalidationRuntime schema validation options
Optionalrequests?: ValidationModeValidate outgoing requests against the bundled AdCP JSON schema before dispatch. Catches field-name drift at call-time instead of at storyboard-time.
strict: throw ValidationError with a JSON Pointer to the bad fieldwarn: log to debug logs and continueoff: skip the validator entirely (no overhead)Optionalresponses?: ValidationModeValidate incoming responses against the bundled AdCP JSON schema.
strict: fail the task with VALIDATION_ERRORwarn: log to debug logs and surface the task as successfuloff: skip the validator entirelyOverrides strictSchemaValidation when set.
OptionalstrictSchemaValidation?: booleanLegacy: fail tasks when response schema validation fails (default: true).
Superseded by responses above — retained for backward compat.
false maps to responses: 'warn' when responses isn't set.
OptionallogSchemaViolations?: booleanLog all schema validation violations to debug logs (default: true)
OptionalfilterInvalidProducts?: booleanFilter out invalid products from get_products responses instead of rejecting the entire response (default: false)
When true: Each product in a get_products response is validated individually. Valid products are kept, invalid products are dropped, and the response is returned as long as it passes full schema validation after filtering. When false: The entire response is rejected if any product fails validation.
Only applies to get_products — all other tool responses use standard validation.
OptionalrejectProductsWithoutPricingOptions?: booleanReject products that arrive without a usable pricing_options[] array
from completed get_products responses (default: true).
pricing_options is a required, non-empty field in AdCP 3.1 — a product
that advertises no pricing model is non-transactable, so the SDK drops it
from the product list before callers and completion handlers see it. This
runs on every completion path (sync, polling, track, webhook) and is
independent of the response validation mode, so unpriced products are
removed even under responses: 'warn' | 'off'. The rejection is recorded
in result.metadata.productPricingPolicy and a
product_missing_pricing_options debug-log notice.
Set to false to pass products through untouched (e.g. when the caller
deliberately inspects malformed seller responses).
OptionalproductPropertyPolicy?: false | ClientProductPropertyPolicyBuyer-side property policy applied to completed get_products
responses before completion handlers and callers receive the product
list. A request-level property_list is enforced automatically by
default; set this to false only when the caller deliberately wants to
trust seller-side filtering without SDK verification.
Use this for brand/block-list rules such as excluding ladbible.com;
domain matching normalizes www. aliases, so www.ladbible.com
violates an exclusion for ladbible.com.
OptionalgovernanceGovernance configuration for buyer-side campaign governance
OptionaltransportTransport-level safeguards. Applies to every call this client dispatches unless overridden at call time.
Set maxResponseBytes when crawling untrusted agents (registries,
federated discovery layers) to prevent a hostile vendor from buffering
a large reply before any application-layer schema validation runs. Set
requestTimeoutMs to override the default 60s cap on A2A agent-card
discovery; use 0 to disable the SDK-imposed discovery timeout.
Configuration for CreativeAgentClient