Handle webhook from agent (async task completion or notifications)
Webhook payload from agent
Task type (e.g create_media_buy) from url param or url part of the webhook delivery
Operation id (e.g used for client app to track the operation) from the param or url part of the webhook delivery
Optionalsignature: stringOptional signature for verification (X-ADCP-Signature)
Optionaltimestamp: string | numberOptional timestamp for verification (X-ADCP-Timestamp)
Whether webhook was handled successfully
Generate webhook URL for a specific task and operation
Type of task (e.g., 'get_products', 'media_buy_delivery')
Operation ID for this request
Full webhook URL
Verify webhook signature using HMAC-SHA256 per AdCP PR #86 spec
Webhook payload object
X-ADCP-Signature header value (format: "sha256=...")
X-ADCP-Timestamp header value (Unix timestamp)
true if signature is valid
Discover available advertising products
OptionalinputHandler: InputHandlerOptionaloptions: TaskOptionsList available creative formats
OptionalinputHandler: InputHandlerOptionaloptions: TaskOptionsCreate a new media buy
OptionalinputHandler: InputHandlerOptionaloptions: TaskOptionsUpdate an existing media buy
OptionalinputHandler: InputHandlerOptionaloptions: TaskOptionsSync creative assets
OptionalinputHandler: InputHandlerOptionaloptions: TaskOptionsList creative assets
OptionalinputHandler: InputHandlerOptionaloptions: TaskOptionsGet media buy delivery information
OptionalinputHandler: InputHandlerOptionaloptions: TaskOptionsProvide performance feedback
OptionalinputHandler: InputHandlerOptionaloptions: TaskOptionsGet audience signals
OptionalinputHandler: InputHandlerOptionaloptions: TaskOptionsActivate audience signals
OptionalinputHandler: InputHandlerOptionaloptions: TaskOptionsGet AdCP capabilities (v3 tool call)
OptionalinputHandler: InputHandlerOptionaloptions: TaskOptionsGet normalized capabilities with v2/v3 fallback
For v3 servers: calls get_adcp_capabilities tool For v2 servers: builds synthetic capabilities from tool list
Continue the conversation with a natural language message
Natural language message to send to the agent
OptionalinputHandler: InputHandlerHandler for any clarification requests
Optionaloptions: TaskOptionsGet the full conversation history
Clear the conversation context (start fresh)
Get the current conversation context ID
Set a specific conversation context ID
Get the agent configuration
Get the agent ID
Get the agent name
Get the agent protocol
Get the canonical base URL for this agent
Returns the canonical URL if already resolved, or computes it synchronously. For guaranteed canonical URL (especially for A2A), use resolveCanonicalUrl() first.
Resolve and return the canonical base URL for this agent
For A2A: Fetches the agent card and uses its 'url' field For MCP: Performs endpoint discovery and strips /mcp suffix
Check if this agent is the same as another agent by canonical URL
Async version that resolves canonical URLs first for more accurate comparison
Get the fully resolved agent configuration with canonical URL
Get agent information including capabilities
Check if there's an active conversation
Get active tasks for this agent
Execute any ADCP task by name with full type safety
OptionalinputHandler: InputHandlerOptionaloptions: TaskOptions// ✅ TYPE-SAFE: Automatic response type inference
const result = await agent.executeTask('get_products', params);
// result is TaskResult<GetProductsResponse> - no casting needed!
// ✅ CUSTOM TYPES: For non-standard tasks
const customResult = await agent.executeTask<MyCustomResponse>('custom_task', params);
Execute any task by name with custom response type
OptionalinputHandler: InputHandlerOptionaloptions: TaskOptionsList all tasks for this agent
Get detailed information about a specific task
Subscribe to task notifications for this agent
Subscribe to all task events
Register webhook for task notifications
OptionaltaskTypes: string[]Unregister webhook notifications
Per-agent client that maintains conversation context across calls
This wrapper provides a persistent conversation context for a single agent, making it easy to have multi-turn conversations and maintain state.