@adcp/client API Reference - v3.3.3
    Preparing search index...

    Interface SingleAgentClientConfig

    Configuration for SingleAgentClient (and multi-agent client)

    interface SingleAgentClientConfig {
        maxHistorySize?: number;
        persistConversations?: boolean;
        workingTimeout?: number;
        defaultMaxClarifications?: number;
        debug?: boolean;
        userAgent?: string;
        headers?: Record<string, string>;
        onActivity?: (activity: Activity) => void | Promise<void>;
        handlers?: AsyncHandlerConfig;
        webhookSecret?: string;
        webhookUrlTemplate?: string;
        reportingWebhookFrequency?: "hourly" | "daily" | "monthly";
        validation?: {
            strictSchemaValidation?: boolean;
            logSchemaViolations?: boolean;
        };
    }

    Hierarchy (View Summary)

    Index

    Properties

    maxHistorySize?: number

    Maximum messages to keep in history

    persistConversations?: boolean

    Whether to persist conversations

    workingTimeout?: number

    Timeout for 'working' status (max 120s per PR #78)

    defaultMaxClarifications?: number

    Default max clarifications

    debug?: boolean

    Enable debug logging

    userAgent?: string

    Custom user agent string

    headers?: Record<string, string>

    Additional headers to include in requests

    onActivity?: (activity: Activity) => void | Promise<void>

    Activity callback for observability (logging, UI updates, etc)

    Task completion handlers - called for both sync responses and webhook completions

    webhookSecret?: string

    Webhook secret for signature verification (recommended for production)

    webhookUrlTemplate?: string

    Webhook URL template with macro substitution

    Available macros:

    • {agent_id} - Agent ID
    • {task_type} - Task type (e.g., sync_creatives, media_buy_delivery)
    • {operation_id} - Operation ID
    Path-based: "https://myapp.com/webhook/{task_type}/{agent_id}/{operation_id}"
    Query string: "https://myapp.com/webhook?agent={agent_id}&op={operation_id}&type={task_type}"
    Custom: "https://myapp.com/api/v1/adcp/{agent_id}?operation={operation_id}"
    reportingWebhookFrequency?: "hourly" | "daily" | "monthly"

    Reporting webhook frequency

    'daily'
    
    validation?: { strictSchemaValidation?: boolean; logSchemaViolations?: boolean }

    Runtime schema validation options

    Type Declaration

    • OptionalstrictSchemaValidation?: boolean

      Fail tasks when response schema validation fails (default: true)

      When true: Invalid responses cause task to fail with error When false: Schema violations are logged but task continues

      true
      
    • OptionallogSchemaViolations?: boolean

      Log all schema validation violations to debug logs (default: true)

      true