Skip to main content
AdCP operations can take seconds, hours, or days. This guide covers how to handle each type of operation and design for asynchronous-first workflows.

Operation Types

AdCP operations fall into three categories:

1. Synchronous Operations

Return immediately with completed or failed: These are fast operations that don’t require external systems.

2. Interactive Operations

May return input-required before proceeding: These operations need user input to proceed.

3. Asynchronous Operations

Return working or submitted and require polling/streaming: These operations integrate with external systems or require human approval.

Timeout Configuration

Set reasonable timeouts based on operation type:

Human-in-the-Loop Workflows

Design Principles

  1. Optional by default - Approvals are configured per implementation
  2. Clear messaging - Users understand what they’re approving
  3. Timeout gracefully - Don’t block forever on human input
  4. Audit trail - Track who approved what when

Approval Patterns

Common Approval Triggers

  • Budget thresholds: Campaigns over $100K
  • New advertisers: First-time buyers
  • Policy-sensitive content: Certain industries or topics
  • Manual inventory: Premium placements requiring publisher approval

Progress Tracking

Progress Updates

Long-running operations may provide progress information:

Displaying Progress

Protocol-Agnostic Patterns

These patterns work with both MCP and A2A.

Product Discovery with Clarification

Campaign Creation with Approval

Waiting for Completion

Asynchronous-First Design

Store State Persistently

Don’t rely on in-memory state for async operations:

Handle Restarts Gracefully

Resume tracking after orchestrator restarts:

Best Practices

  1. Design async first - Assume any operation could take time
  2. Persist state - Don’t rely on in-memory tracking
  3. Handle restarts - Resume tracking on startup
  4. Implement timeouts - Don’t wait forever
  5. Show progress - Keep users informed
  6. Support cancellation - Let users cancel long operations
  7. Audit trail - Log all status transitions

Next Steps