OptionalmaxMaximum messages to keep in history
OptionalpersistWhether to persist conversations
OptionalworkingTimeout for 'working' status (max 120s per PR #78)
OptionaldefaultDefault max clarifications
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.
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)
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.
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.
Configuration for SingleAgentClient (and multi-agent client)