@adcp/client 4.21.0 → 4.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +278 -0
- package/README.md +96 -61
- package/bin/adcp.js +342 -4
- package/dist/lib/agents/index.generated.d.ts +9 -1
- package/dist/lib/agents/index.generated.d.ts.map +1 -1
- package/dist/lib/agents/index.generated.js +12 -0
- package/dist/lib/agents/index.generated.js.map +1 -1
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.ts +2 -1
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +10 -1
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/discovery/property-crawler.d.ts +4 -0
- package/dist/lib/discovery/property-crawler.d.ts.map +1 -1
- package/dist/lib/discovery/property-crawler.js +10 -2
- package/dist/lib/discovery/property-crawler.js.map +1 -1
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +6 -4
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/protocols/index.d.ts.map +1 -1
- package/dist/lib/protocols/index.js +8 -6
- package/dist/lib/protocols/index.js.map +1 -1
- package/dist/lib/protocols/mcp.d.ts.map +1 -1
- package/dist/lib/protocols/mcp.js +24 -11
- package/dist/lib/protocols/mcp.js.map +1 -1
- package/dist/lib/server/index.d.ts +2 -0
- package/dist/lib/server/index.d.ts.map +1 -1
- package/dist/lib/server/index.js +3 -1
- package/dist/lib/server/index.js.map +1 -1
- package/dist/lib/server/serve.d.ts +73 -0
- package/dist/lib/server/serve.d.ts.map +1 -0
- package/dist/lib/server/serve.js +94 -0
- package/dist/lib/server/serve.js.map +1 -0
- package/dist/lib/testing/client.d.ts.map +1 -1
- package/dist/lib/testing/client.js +1 -0
- package/dist/lib/testing/client.js.map +1 -1
- package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
- package/dist/lib/testing/compliance/comply.js +48 -63
- package/dist/lib/testing/compliance/comply.js.map +1 -1
- package/dist/lib/testing/compliance/storyboard-tracks.d.ts +24 -0
- package/dist/lib/testing/compliance/storyboard-tracks.d.ts.map +1 -0
- package/dist/lib/testing/compliance/storyboard-tracks.js +157 -0
- package/dist/lib/testing/compliance/storyboard-tracks.js.map +1 -0
- package/dist/lib/testing/compliance/types.d.ts +1 -1
- package/dist/lib/testing/compliance/types.d.ts.map +1 -1
- package/dist/lib/testing/index.d.ts +1 -0
- package/dist/lib/testing/index.d.ts.map +1 -1
- package/dist/lib/testing/index.js +23 -1
- package/dist/lib/testing/index.js.map +1 -1
- package/dist/lib/testing/orchestrator.d.ts +8 -0
- package/dist/lib/testing/orchestrator.d.ts.map +1 -1
- package/dist/lib/testing/orchestrator.js +8 -0
- package/dist/lib/testing/orchestrator.js.map +1 -1
- package/dist/lib/testing/storyboard/context.d.ts +34 -0
- package/dist/lib/testing/storyboard/context.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/context.js +257 -0
- package/dist/lib/testing/storyboard/context.js.map +1 -0
- package/dist/lib/testing/storyboard/index.d.ts +15 -0
- package/dist/lib/testing/storyboard/index.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/index.js +48 -0
- package/dist/lib/testing/storyboard/index.js.map +1 -0
- package/dist/lib/testing/storyboard/loader.d.ts +53 -0
- package/dist/lib/testing/storyboard/loader.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/loader.js +114 -0
- package/dist/lib/testing/storyboard/loader.js.map +1 -0
- package/dist/lib/testing/storyboard/path.d.ts +29 -0
- package/dist/lib/testing/storyboard/path.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/path.js +121 -0
- package/dist/lib/testing/storyboard/path.js.map +1 -0
- package/dist/lib/testing/storyboard/request-builder.d.ts +28 -0
- package/dist/lib/testing/storyboard/request-builder.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/request-builder.js +410 -0
- package/dist/lib/testing/storyboard/request-builder.js.map +1 -0
- package/dist/lib/testing/storyboard/runner.d.ts +24 -0
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/runner.js +280 -0
- package/dist/lib/testing/storyboard/runner.js.map +1 -0
- package/dist/lib/testing/storyboard/task-map.d.ts +21 -0
- package/dist/lib/testing/storyboard/task-map.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/task-map.js +84 -0
- package/dist/lib/testing/storyboard/task-map.js.map +1 -0
- package/dist/lib/testing/storyboard/types.d.ts +156 -0
- package/dist/lib/testing/storyboard/types.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/types.js +10 -0
- package/dist/lib/testing/storyboard/types.js.map +1 -0
- package/dist/lib/testing/storyboard/validations.d.ts +17 -0
- package/dist/lib/testing/storyboard/validations.d.ts.map +1 -0
- package/dist/lib/testing/storyboard/validations.js +166 -0
- package/dist/lib/testing/storyboard/validations.js.map +1 -0
- package/dist/lib/testing/types.d.ts +2 -0
- package/dist/lib/testing/types.d.ts.map +1 -1
- package/dist/lib/types/core.generated.d.ts +2 -2
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js +1 -1
- package/dist/lib/types/schemas.generated.d.ts +193 -34
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +87 -5
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/tools.generated.d.ts +280 -3
- package/dist/lib/types/tools.generated.d.ts.map +1 -1
- package/dist/lib/utils/response-schemas.d.ts.map +1 -1
- package/dist/lib/utils/response-schemas.js +34 -3
- package/dist/lib/utils/response-schemas.js.map +1 -1
- package/dist/lib/utils/validate-user-agent.d.ts +8 -0
- package/dist/lib/utils/validate-user-agent.d.ts.map +1 -0
- package/dist/lib/utils/validate-user-agent.js +15 -0
- package/dist/lib/utils/validate-user-agent.js.map +1 -0
- package/dist/lib/version.d.ts +6 -0
- package/dist/lib/version.d.ts.map +1 -1
- package/dist/lib/version.js +7 -1
- package/dist/lib/version.js.map +1 -1
- package/docs/README.md +42 -0
- package/docs/guides/BUILD-AN-AGENT.md +294 -0
- package/docs/llms.txt +634 -0
- package/examples/README.md +106 -0
- package/examples/adcp.config.json +30 -0
- package/examples/basic-a2a.ts +76 -0
- package/examples/basic-mcp.ts +50 -0
- package/examples/batch-preview-test.ts +266 -0
- package/examples/conversation-client.ts +291 -0
- package/examples/debug-preview-response.ts +73 -0
- package/examples/debug-preview-with-logging.ts +50 -0
- package/examples/easy-config-demo.ts +242 -0
- package/examples/env-config.ts +51 -0
- package/examples/error-compliant-server.ts +237 -0
- package/examples/generative-creative-demo.ts +205 -0
- package/examples/inspect-card-formats.ts +161 -0
- package/examples/logger-usage.ts +165 -0
- package/examples/oauth-cli-example.ts +154 -0
- package/examples/pr78-async-patterns-demo.ts +247 -0
- package/examples/signals-agent.ts +163 -0
- package/examples/simple-getting-started.ts +225 -0
- package/examples/simple-protocol-demo.ts +75 -0
- package/examples/test-helpers-demo.ts +239 -0
- package/examples/zod-validation-example.ts +126 -0
- package/package.json +12 -2
- package/skills/adcp/SKILL.md +13 -2
- package/storyboards/audience_sync.yaml +199 -0
- package/storyboards/behavioral_analysis.yaml +244 -0
- package/storyboards/brand_rights.yaml +131 -0
- package/storyboards/creative_ad_server.yaml +171 -0
- package/storyboards/creative_sales_agent.yaml +169 -0
- package/storyboards/creative_template.yaml +306 -0
- package/storyboards/deterministic_testing.yaml +925 -0
- package/storyboards/error_compliance.yaml +231 -0
- package/storyboards/governance_content_standards.yaml +213 -0
- package/storyboards/governance_property_lists.yaml +372 -0
- package/storyboards/media_buy_catalog_creative.yaml +457 -0
- package/storyboards/media_buy_governance_escalation.yaml +467 -0
- package/storyboards/media_buy_guaranteed_approval.yaml +396 -0
- package/storyboards/media_buy_non_guaranteed.yaml +288 -0
- package/storyboards/media_buy_proposal_mode.yaml +369 -0
- package/storyboards/media_buy_seller.yaml +560 -0
- package/storyboards/media_buy_state_machine.yaml +254 -0
- package/storyboards/schema.yaml +65 -0
- package/storyboards/schema_validation.yaml +166 -0
- package/storyboards/si_session.yaml +384 -0
- package/storyboards/signal_marketplace.yaml +283 -0
- package/storyboards/signal_owned.yaml +211 -0
package/docs/llms.txt
ADDED
|
@@ -0,0 +1,634 @@
|
|
|
1
|
+
# Ad Context Protocol (AdCP)
|
|
2
|
+
|
|
3
|
+
> Generated at: 2026-04-08
|
|
4
|
+
> Library: @adcp/client v4.20.0
|
|
5
|
+
> AdCP major version: 3
|
|
6
|
+
> Canonical URL: https://adcontextprotocol.github.io/adcp-client/llms.txt
|
|
7
|
+
|
|
8
|
+
## What is AdCP
|
|
9
|
+
|
|
10
|
+
AdCP is an open protocol for AI agents to buy, manage, and optimize advertising programmatically. It defines MCP tools that agents call on publisher ad servers — discover inventory, create media buys, sync creatives, manage brand safety, and track delivery. Every tool follows request/response JSON schemas; the TypeScript client wraps them with async task handling, conversation context, and governance middleware.
|
|
11
|
+
|
|
12
|
+
## Are you building a client or a server?
|
|
13
|
+
|
|
14
|
+
- **Client** (calling existing agents): Continue reading — the Quick Start below is for you.
|
|
15
|
+
- **Server** (implementing an agent that others call): Read `docs/guides/BUILD-AN-AGENT.md` instead. Minimal example:
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { createTaskCapableServer, taskToolResponse, serve, GetSignalsRequestSchema } from '@adcp/client';
|
|
19
|
+
|
|
20
|
+
function createAgent({ taskStore }) {
|
|
21
|
+
const server = createTaskCapableServer('My Agent', '1.0.0', { taskStore });
|
|
22
|
+
server.tool('get_signals', 'Discover segments.', GetSignalsRequestSchema.shape, async (args) => {
|
|
23
|
+
return taskToolResponse({ signals: [...], sandbox: true }, 'Found segments');
|
|
24
|
+
});
|
|
25
|
+
return server;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
serve(createAgent); // http://localhost:3001/mcp
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Quick Start (Client)
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { ADCPMultiAgentClient } from '@adcp/client';
|
|
35
|
+
|
|
36
|
+
const client = ADCPMultiAgentClient.simple('https://agent.example.com/mcp/', {
|
|
37
|
+
authToken: process.env.ADCP_TOKEN,
|
|
38
|
+
});
|
|
39
|
+
const agent = client.agent('default-agent');
|
|
40
|
+
|
|
41
|
+
// Discover products
|
|
42
|
+
const products = await agent.getProducts({ buying_mode: 'brief', brief: 'coffee brands' });
|
|
43
|
+
if (products.status === 'completed') console.log(products.data.products);
|
|
44
|
+
|
|
45
|
+
// Create a media buy
|
|
46
|
+
const buy = await agent.createMediaBuy({
|
|
47
|
+
account: { account_id: 'acct_1' },
|
|
48
|
+
brand: { domain: 'coffee.example.com' },
|
|
49
|
+
start_time: 'asap',
|
|
50
|
+
end_time: '2026-06-01T00:00:00Z',
|
|
51
|
+
packages: [{ buyer_ref: 'pkg-1', product_id: 'prod_1', pricing_option_id: 'cpm_1', budget: 5000 }],
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Tools
|
|
56
|
+
|
|
57
|
+
Every tool is an MCP tool called via `agent.<methodName>(params)`. Returns `TaskResult<T>` with `status`, `data`, `error`, `deferred`, or `submitted`.
|
|
58
|
+
|
|
59
|
+
### Protocol
|
|
60
|
+
|
|
61
|
+
#### `get_adcp_capabilities`
|
|
62
|
+
|
|
63
|
+
Request parameters for cross-protocol capability discovery.
|
|
64
|
+
|
|
65
|
+
Optional: `protocols: string[]`, `context: Context`
|
|
66
|
+
|
|
67
|
+
### Account Management
|
|
68
|
+
|
|
69
|
+
#### `list_accounts`
|
|
70
|
+
|
|
71
|
+
Request parameters for listing accounts accessible to the authenticated agent.
|
|
72
|
+
|
|
73
|
+
Optional: `status: 'active' | 'pending_approval' | 'rejected' | 'payment_required' | 'suspended' | 'closed'`, `pagination: Pagination Request`, `sandbox: boolean`, `context: Context`
|
|
74
|
+
|
|
75
|
+
#### `sync_accounts`
|
|
76
|
+
|
|
77
|
+
Request parameters for syncing advertiser accounts with a seller.
|
|
78
|
+
|
|
79
|
+
Required: `accounts: object[]`
|
|
80
|
+
Optional: `delete_missing: boolean`, `dry_run: boolean`, `push_notification_config: Push Notification Config`, `context: Context`
|
|
81
|
+
|
|
82
|
+
#### `sync_governance`
|
|
83
|
+
|
|
84
|
+
Request parameters for registering governance agent endpoints on accounts.
|
|
85
|
+
|
|
86
|
+
Required: `accounts: object[]`
|
|
87
|
+
Optional: `context: Context`
|
|
88
|
+
|
|
89
|
+
#### `report_usage`
|
|
90
|
+
|
|
91
|
+
Request parameters for reporting vendor service consumption after delivery.
|
|
92
|
+
|
|
93
|
+
Required: `reporting_period: Datetime Range`, `usage: object[]`
|
|
94
|
+
Optional: `idempotency_key: string`, `context: Context`
|
|
95
|
+
|
|
96
|
+
#### `get_account_financials`
|
|
97
|
+
|
|
98
|
+
Request parameters for querying financial status of an operator-billed account.
|
|
99
|
+
|
|
100
|
+
Required: `account: Account Ref`
|
|
101
|
+
Optional: `period: Date Range`, `context: Context`
|
|
102
|
+
|
|
103
|
+
**Deep dive:**
|
|
104
|
+
- docs/getting-started.md — authentication and account setup
|
|
105
|
+
|
|
106
|
+
### Media Buying
|
|
107
|
+
|
|
108
|
+
#### `get_products`
|
|
109
|
+
|
|
110
|
+
Request parameters for discovering available advertising products.
|
|
111
|
+
|
|
112
|
+
Required: `buying_mode: 'brief' | 'wholesale' | 'refine'`
|
|
113
|
+
Optional: `brief: string`, `refine: object[]`, `brand: Brand Ref`, `catalog: Catalog`, `account: Account Ref`, `preferred_delivery_types: object[]`, `filters: Product Filters`, `property_list: Property List Ref`, +5 more
|
|
114
|
+
|
|
115
|
+
#### `list_creative_formats`
|
|
116
|
+
|
|
117
|
+
Request parameters for discovering format IDs and creative agents supported by this sales agent.
|
|
118
|
+
|
|
119
|
+
Optional: `format_ids: object[]`, `asset_types: object[]`, `max_width: integer`, `max_height: integer`, `min_width: integer`, `min_height: integer`, `is_responsive: boolean`, `name_search: string`, +7 more
|
|
120
|
+
|
|
121
|
+
#### `create_media_buy`
|
|
122
|
+
|
|
123
|
+
Request parameters for creating a media buy.
|
|
124
|
+
|
|
125
|
+
Required: `account: Account Ref`, `brand: Brand Ref`, `start_time: Start Timing`, `end_time: string`
|
|
126
|
+
Optional: `idempotency_key: string`, `plan_id: string`, `proposal_id: string`, `total_budget: object`, `packages: object[]`, `advertiser_industry: Advertiser Industry`, `invoice_recipient: Business Entity`, `io_acceptance: object`, +5 more
|
|
127
|
+
|
|
128
|
+
#### `update_media_buy`
|
|
129
|
+
|
|
130
|
+
Request parameters for updating campaign and package settings.
|
|
131
|
+
|
|
132
|
+
Required: `media_buy_id: string`
|
|
133
|
+
Optional: `revision: integer`, `paused: boolean`, `canceled: 'true'`, `cancellation_reason: string`, `start_time: Start Timing`, `end_time: string`, `packages: object[]`, `invoice_recipient: Business Entity`, +5 more
|
|
134
|
+
|
|
135
|
+
#### `get_media_buys`
|
|
136
|
+
|
|
137
|
+
Request parameters for retrieving media buy status, creative approvals, and delivery snapshots.
|
|
138
|
+
|
|
139
|
+
Optional: `account: Account Ref`, `media_buy_ids: string[]`, `status_filter: Media Buy Status | object[]`, `include_snapshot: boolean`, `include_history: integer`, `pagination: Pagination Request`, `context: Context`
|
|
140
|
+
|
|
141
|
+
#### `get_media_buy_delivery`
|
|
142
|
+
|
|
143
|
+
Request parameters for retrieving comprehensive delivery metrics.
|
|
144
|
+
|
|
145
|
+
Optional: `account: Account Ref`, `media_buy_ids: string[]`, `status_filter: Media Buy Status | object[]`, `start_date: string`, `end_date: string`, `include_package_daily_breakdown: boolean`, `attribution_window: object`, `reporting_dimensions: object`, +1 more
|
|
146
|
+
|
|
147
|
+
#### `provide_performance_feedback`
|
|
148
|
+
|
|
149
|
+
Request parameters for sharing performance outcomes with publishers.
|
|
150
|
+
|
|
151
|
+
Required: `media_buy_id: string`, `measurement_period: Datetime Range`, `performance_index: number`
|
|
152
|
+
Optional: `idempotency_key: string`, `package_id: string`, `creative_id: string`, `metric_type: Metric Type`, `feedback_source: Feedback Source`, `context: Context`
|
|
153
|
+
|
|
154
|
+
#### `sync_event_sources`
|
|
155
|
+
|
|
156
|
+
Request parameters for configuring event sources on an account.
|
|
157
|
+
|
|
158
|
+
Required: `account: Account Ref`
|
|
159
|
+
Optional: `event_sources: object[]`, `delete_missing: boolean`, `context: Context`
|
|
160
|
+
|
|
161
|
+
#### `log_event`
|
|
162
|
+
|
|
163
|
+
Request parameters for logging conversion or marketing events.
|
|
164
|
+
|
|
165
|
+
Required: `event_source_id: string`, `events: object[]`
|
|
166
|
+
Optional: `test_event_code: string`, `idempotency_key: string`, `context: Context`
|
|
167
|
+
|
|
168
|
+
#### `sync_audiences`
|
|
169
|
+
|
|
170
|
+
Request parameters for managing CRM-based audiences on an account.
|
|
171
|
+
|
|
172
|
+
Required: `account: Account Ref`
|
|
173
|
+
Optional: `audiences: object[]`, `delete_missing: boolean`, `context: Context`
|
|
174
|
+
|
|
175
|
+
#### `sync_catalogs`
|
|
176
|
+
|
|
177
|
+
Request parameters for syncing catalog feeds (products, inventory, stores, promotions, offerings) with approval workflow.
|
|
178
|
+
|
|
179
|
+
Required: `account: Account Ref`
|
|
180
|
+
Optional: `catalogs: object[]`, `catalog_ids: string[]`, `delete_missing: boolean`, `dry_run: boolean`, `validation_mode: Validation Mode`, `push_notification_config: Push Notification Config`, `context: Context`
|
|
181
|
+
|
|
182
|
+
**Deep dive:**
|
|
183
|
+
- docs/getting-started.md — installation, auth, basic usage
|
|
184
|
+
- docs/guides/ASYNC-DEVELOPER-GUIDE.md — async task patterns (submitted, deferred, input-required)
|
|
185
|
+
- docs/guides/PUSH-NOTIFICATION-CONFIG.md — webhook setup for delivery reports
|
|
186
|
+
- docs/guides/REAL-WORLD-EXAMPLES.md — end-to-end buying flows
|
|
187
|
+
|
|
188
|
+
### Creative
|
|
189
|
+
|
|
190
|
+
#### `build_creative`
|
|
191
|
+
|
|
192
|
+
Request parameters for AI-powered creative generation.
|
|
193
|
+
|
|
194
|
+
Optional: `message: string`, `creative_manifest: Creative Manifest`, `creative_id: string`, `concept_id: string`, `media_buy_id: string`, `package_id: string`, `target_format_id: Format Id`, `target_format_ids: object[]`, +10 more
|
|
195
|
+
|
|
196
|
+
#### `preview_creative`
|
|
197
|
+
|
|
198
|
+
Request parameters for generating creative previews.
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
#### `list_creative_formats`
|
|
202
|
+
|
|
203
|
+
Request parameters for discovering creative formats from this creative agent.
|
|
204
|
+
|
|
205
|
+
Optional: `format_ids: object[]`, `type: 'audio' | 'video' | 'display' | 'dooh'`, `asset_types: string[]`, `max_width: integer`, `max_height: integer`, `min_width: integer`, `min_height: integer`, `is_responsive: boolean`, +8 more
|
|
206
|
+
|
|
207
|
+
#### `get_creative_delivery`
|
|
208
|
+
|
|
209
|
+
Request parameters for retrieving creative delivery data with variant-level breakdowns.
|
|
210
|
+
|
|
211
|
+
Optional: `account: Account Ref`, `media_buy_ids: string[]`, `creative_ids: string[]`, `start_date: string`, `end_date: string`, `max_variants: integer`, `pagination: Pagination Request`, `context: Context`
|
|
212
|
+
|
|
213
|
+
#### `list_creatives`
|
|
214
|
+
|
|
215
|
+
Request parameters for querying creative library with filtering and pagination.
|
|
216
|
+
|
|
217
|
+
Optional: `filters: Creative Filters`, `sort: object`, `pagination: Pagination Request`, `include_assignments: boolean`, `include_snapshot: boolean`, `include_items: boolean`, `include_variables: boolean`, `fields: string[]`, +1 more
|
|
218
|
+
|
|
219
|
+
#### `sync_creatives`
|
|
220
|
+
|
|
221
|
+
Request parameters for syncing creative assets with upsert semantics.
|
|
222
|
+
|
|
223
|
+
Required: `account: Account Ref`, `creatives: object[]`
|
|
224
|
+
Optional: `creative_ids: string[]`, `assignments: object[]`, `idempotency_key: string`, `delete_missing: boolean`, `dry_run: boolean`, `validation_mode: Validation Mode`, `push_notification_config: Push Notification Config`, `context: Context`
|
|
225
|
+
|
|
226
|
+
**Deep dive:**
|
|
227
|
+
- docs/guides/BUILD-AN-AGENT.md — building a creative agent (server-side)
|
|
228
|
+
- schemas/cache/latest/creative/asset-types/index.json — asset type definitions
|
|
229
|
+
|
|
230
|
+
### Signals
|
|
231
|
+
|
|
232
|
+
#### `get_signals`
|
|
233
|
+
|
|
234
|
+
Request parameters for discovering signals based on description.
|
|
235
|
+
|
|
236
|
+
Optional: `account: Account Ref`, `signal_spec: string`, `signal_ids: object[]`, `destinations: object[]`, `countries: string[]`, `filters: Signal Filters`, `max_results: integer`, `pagination: Pagination Request`, +1 more
|
|
237
|
+
|
|
238
|
+
#### `activate_signal`
|
|
239
|
+
|
|
240
|
+
Request parameters for activating a signal on a specific platform/account.
|
|
241
|
+
|
|
242
|
+
Required: `signal_agent_segment_id: string`, `destinations: object[]`
|
|
243
|
+
Optional: `action: 'activate' | 'deactivate'`, `pricing_option_id: string`, `account: Account Ref`, `idempotency_key: string`, `context: Context`
|
|
244
|
+
|
|
245
|
+
**Deep dive:**
|
|
246
|
+
- docs/guides/BUILD-AN-AGENT.md — signals agent example
|
|
247
|
+
|
|
248
|
+
### Governance
|
|
249
|
+
|
|
250
|
+
#### `create_property_list`
|
|
251
|
+
|
|
252
|
+
Request parameters for creating a new property list.
|
|
253
|
+
|
|
254
|
+
Required: `name: string`
|
|
255
|
+
Optional: `description: string`, `base_properties: object[]`, `filters: Property List Filters`, `brand: Brand Ref`, `idempotency_key: string`, `context: Context`
|
|
256
|
+
|
|
257
|
+
#### `update_property_list`
|
|
258
|
+
|
|
259
|
+
Request parameters for updating an existing property list.
|
|
260
|
+
|
|
261
|
+
Required: `list_id: string`
|
|
262
|
+
Optional: `name: string`, `description: string`, `base_properties: object[]`, `filters: Property List Filters`, `brand: Brand Ref`, `webhook_url: string`, `context: Context`, `idempotency_key: string`
|
|
263
|
+
|
|
264
|
+
#### `get_property_list`
|
|
265
|
+
|
|
266
|
+
Request parameters for retrieving a property list with resolved properties.
|
|
267
|
+
|
|
268
|
+
Required: `list_id: string`
|
|
269
|
+
Optional: `resolve: boolean`, `pagination: object`, `context: Context`
|
|
270
|
+
|
|
271
|
+
#### `list_property_lists`
|
|
272
|
+
|
|
273
|
+
Request parameters for listing property lists.
|
|
274
|
+
|
|
275
|
+
Optional: `principal: string`, `name_contains: string`, `pagination: Pagination Request`, `context: Context`
|
|
276
|
+
|
|
277
|
+
#### `delete_property_list`
|
|
278
|
+
|
|
279
|
+
Request parameters for deleting a property list.
|
|
280
|
+
|
|
281
|
+
Required: `list_id: string`
|
|
282
|
+
Optional: `context: Context`, `idempotency_key: string`
|
|
283
|
+
|
|
284
|
+
#### `list_content_standards`
|
|
285
|
+
|
|
286
|
+
Request parameters for listing content standards configurations.
|
|
287
|
+
|
|
288
|
+
Optional: `channels: object[]`, `languages: string[]`, `countries: string[]`, `pagination: Pagination Request`, `context: Context`
|
|
289
|
+
|
|
290
|
+
#### `get_content_standards`
|
|
291
|
+
|
|
292
|
+
Request parameters for retrieving a specific standards configuration.
|
|
293
|
+
|
|
294
|
+
Required: `standards_id: string`
|
|
295
|
+
Optional: `context: Context`
|
|
296
|
+
|
|
297
|
+
#### `create_content_standards`
|
|
298
|
+
|
|
299
|
+
Request parameters for creating a new content standards configuration.
|
|
300
|
+
|
|
301
|
+
Required: `scope: object`, `policy: string`
|
|
302
|
+
Optional: `registry_policy_ids: string[]`, `calibration_exemplars: object`, `idempotency_key: string`, `context: Context`
|
|
303
|
+
|
|
304
|
+
#### `update_content_standards`
|
|
305
|
+
|
|
306
|
+
Request parameters for updating an existing content standards configuration.
|
|
307
|
+
|
|
308
|
+
Required: `standards_id: string`
|
|
309
|
+
Optional: `scope: object`, `registry_policy_ids: string[]`, `policy: string`, `calibration_exemplars: object`, `context: Context`, `idempotency_key: string`
|
|
310
|
+
|
|
311
|
+
#### `calibrate_content`
|
|
312
|
+
|
|
313
|
+
Request parameters for collaborative calibration dialogue.
|
|
314
|
+
|
|
315
|
+
Required: `standards_id: string`, `artifact: Artifact`
|
|
316
|
+
Optional: `idempotency_key: string`
|
|
317
|
+
|
|
318
|
+
#### `validate_content_delivery`
|
|
319
|
+
|
|
320
|
+
Request parameters for batch validating delivery records.
|
|
321
|
+
|
|
322
|
+
Required: `standards_id: string`, `records: object[]`
|
|
323
|
+
Optional: `feature_ids: string[]`, `include_passed: boolean`, `context: Context`
|
|
324
|
+
|
|
325
|
+
#### `get_media_buy_artifacts`
|
|
326
|
+
|
|
327
|
+
Request parameters for retrieving content artifacts from a media buy.
|
|
328
|
+
|
|
329
|
+
Required: `media_buy_id: string`
|
|
330
|
+
Optional: `account: Account Ref`, `package_ids: string[]`, `failures_only: boolean`, `time_range: object`, `pagination: object`, `context: Context`
|
|
331
|
+
|
|
332
|
+
#### `get_creative_features`
|
|
333
|
+
|
|
334
|
+
Request parameters for evaluating creative features from a governance agent.
|
|
335
|
+
|
|
336
|
+
Required: `creative_manifest: Creative Manifest`
|
|
337
|
+
Optional: `feature_ids: string[]`, `account: Account Ref`, `context: Context`
|
|
338
|
+
|
|
339
|
+
#### `sync_plans`
|
|
340
|
+
|
|
341
|
+
Push campaign plans to the governance agent.
|
|
342
|
+
|
|
343
|
+
Required: `plans: object[]`
|
|
344
|
+
|
|
345
|
+
#### `report_plan_outcome`
|
|
346
|
+
|
|
347
|
+
Report the outcome of an action to the governance agent.
|
|
348
|
+
|
|
349
|
+
Required: `plan_id: string`, `outcome: Outcome Type`, `governance_context: string`
|
|
350
|
+
Optional: `check_id: string`, `idempotency_key: string`, `seller_response: object`, `delivery: object`, `error: object`
|
|
351
|
+
|
|
352
|
+
#### `get_plan_audit_logs`
|
|
353
|
+
|
|
354
|
+
Retrieve governance state and audit trail for a plan.
|
|
355
|
+
|
|
356
|
+
Optional: `plan_ids: string[]`, `portfolio_plan_ids: string[]`, `include_entries: boolean`
|
|
357
|
+
|
|
358
|
+
#### `check_governance`
|
|
359
|
+
|
|
360
|
+
Orchestrator or seller calls the governance agent to validate an action against the campaign plan.
|
|
361
|
+
|
|
362
|
+
Required: `plan_id: string`, `caller: string`
|
|
363
|
+
Optional: `tool: string`, `payload: object`, `governance_context: string`, `media_buy_id: string`, `phase: Governance Phase`, `planned_delivery: Planned Delivery`, `delivery_metrics: object`, `modification_summary: string`, +1 more
|
|
364
|
+
|
|
365
|
+
**Deep dive:**
|
|
366
|
+
- docs/guides/HANDLER-PATTERNS-GUIDE.md — input handler patterns for governance flows
|
|
367
|
+
|
|
368
|
+
### Sponsored Intelligence
|
|
369
|
+
|
|
370
|
+
#### `si_get_offering`
|
|
371
|
+
|
|
372
|
+
Get offering details, availability, and optionally matching products before session handoff.
|
|
373
|
+
|
|
374
|
+
Required: `offering_id: string`
|
|
375
|
+
Optional: `context: string`, `include_products: boolean`, `product_limit: integer`
|
|
376
|
+
|
|
377
|
+
#### `si_initiate_session`
|
|
378
|
+
|
|
379
|
+
Host initiates SI session with brand agent - includes context, identity, and capability negotiation.
|
|
380
|
+
|
|
381
|
+
Required: `context: string`, `identity: Si Identity`
|
|
382
|
+
Optional: `media_buy_id: string`, `placement: string`, `offering_id: string`, `supported_capabilities: Si Capabilities`, `offering_token: string`, `idempotency_key: string`
|
|
383
|
+
|
|
384
|
+
#### `si_send_message`
|
|
385
|
+
|
|
386
|
+
Send a message within an active SI session.
|
|
387
|
+
|
|
388
|
+
Required: `session_id: string`
|
|
389
|
+
Optional: `message: string`, `action_response: object`
|
|
390
|
+
|
|
391
|
+
#### `si_terminate_session`
|
|
392
|
+
|
|
393
|
+
Terminate an SI session with reason (handoff_transaction, handoff_complete, user_exit, session_timeout, host_terminated).
|
|
394
|
+
|
|
395
|
+
Required: `session_id: string`, `reason: 'handoff_transaction' | 'handoff_complete' | 'user_exit' | 'session_timeout' | 'host_terminated'`
|
|
396
|
+
Optional: `termination_context: object`
|
|
397
|
+
|
|
398
|
+
**Deep dive:**
|
|
399
|
+
- docs/guides/ASYNC-DEVELOPER-GUIDE.md — session lifecycle patterns
|
|
400
|
+
|
|
401
|
+
### Trusted Match (TMP)
|
|
402
|
+
|
|
403
|
+
Real-time execution layer. These are HTTP operations, not MCP tools.
|
|
404
|
+
|
|
405
|
+
#### `context_match`
|
|
406
|
+
|
|
407
|
+
Evaluate available packages against content context.
|
|
408
|
+
|
|
409
|
+
#### `identity_match`
|
|
410
|
+
|
|
411
|
+
Evaluate user eligibility for packages using an opaque identity token.
|
|
412
|
+
|
|
413
|
+
## Common Flows
|
|
414
|
+
|
|
415
|
+
These are the standard tool call sequences from the AdCP storyboards. Each flow shows the tools called in order.
|
|
416
|
+
|
|
417
|
+
### Audiences
|
|
418
|
+
|
|
419
|
+
**Audience sync** — Tests sync_audiences: account discovery, audience creation with hashed identifiers, and audience deletion.
|
|
420
|
+
Flow: `list_accounts → sync_audiences`
|
|
421
|
+
|
|
422
|
+
### Products
|
|
423
|
+
|
|
424
|
+
**Behavioral analysis** — Validates product discovery behavior, response consistency, and pricing edge cases.
|
|
425
|
+
Flow: `get_products`
|
|
426
|
+
|
|
427
|
+
### Core
|
|
428
|
+
|
|
429
|
+
**Brand rights flow** — Agent that provides brand identity, queries rights, and supports rights acquisition.
|
|
430
|
+
Flow: `get_brand_identity → get_rights → acquire_rights`
|
|
431
|
+
|
|
432
|
+
**Deterministic testing** — Uses comply_test_controller to force state transitions and simulate delivery/budget, verifying state machines and reporting.
|
|
433
|
+
Flow: `comply_test_controller → list_accounts → comply_test_controller → create_media_buy → comply_test_controller → get_media_buys → comply_test_controller → sync_creatives → comply_test_controller → si_initiate_session → comply_test_controller → si_send_message → create_media_buy → comply_test_controller → get_media_buy_delivery → create_media_buy → comply_test_controller`
|
|
434
|
+
|
|
435
|
+
### Creative
|
|
436
|
+
|
|
437
|
+
**Creative ad server** — Stateful ad server with pre-loaded creatives. Generates serving tags per media buy.
|
|
438
|
+
Flow: `list_creatives → list_creative_formats → build_creative → get_creative_delivery`
|
|
439
|
+
|
|
440
|
+
**Sales agent with creative capabilities** — Stateful sales agent that accepts pushed creative assets and renders them in its environment.
|
|
441
|
+
Flow: `list_creative_formats → sync_creatives → preview_creative`
|
|
442
|
+
|
|
443
|
+
**Creative template and transformation agent** — Stateless creative agent that takes assets in, applies templates, and produces tags or rendered output.
|
|
444
|
+
Flow: `list_creative_formats → preview_creative → build_creative`
|
|
445
|
+
|
|
446
|
+
### Error Handling
|
|
447
|
+
|
|
448
|
+
**Error handling and compliance** — Validates that agents return properly structured AdCP errors with correct codes, recovery hints, and transport bindings.
|
|
449
|
+
Flow: `create_media_buy → get_products → create_media_buy`
|
|
450
|
+
|
|
451
|
+
### Governance
|
|
452
|
+
|
|
453
|
+
**Governance content standards** — Content standards discovery, calibration, and delivery validation.
|
|
454
|
+
Flow: `list_content_standards → get_content_standards → calibrate_content → validate_content_delivery`
|
|
455
|
+
|
|
456
|
+
**Governance property list management** — CRUD lifecycle for property lists with filter round-trip validation.
|
|
457
|
+
Flow: `create_property_list → get_property_list → update_property_list → list_property_lists → delete_property_list → get_property_list → create_property_list → get_property_list → delete_property_list`
|
|
458
|
+
|
|
459
|
+
### Media Buy
|
|
460
|
+
|
|
461
|
+
**Catalog-driven creative and conversion tracking** — Seller that renders dynamic ads from product catalogs, tracks conversions, and optimizes delivery based on performance feedback.
|
|
462
|
+
Flow: `sync_accounts → list_creative_formats → sync_catalogs → get_products → create_media_buy → sync_event_sources → log_event → provide_performance_feedback → get_media_buy_delivery`
|
|
463
|
+
|
|
464
|
+
**Guaranteed media buy with human IO approval** — Seller agent that requires human-in-the-loop IO signing before guaranteed media buys go live.
|
|
465
|
+
Flow: `sync_accounts → get_products → create_media_buy → get_media_buys → sync_creatives → get_media_buy_delivery`
|
|
466
|
+
|
|
467
|
+
**Non-guaranteed auction-based media buy** — Seller agent for auction-based, non-guaranteed buying where the buyer sets bid prices and budgets.
|
|
468
|
+
Flow: `get_products → create_media_buy → get_media_buys → update_media_buy → get_media_buy_delivery`
|
|
469
|
+
|
|
470
|
+
**Media buy via proposal acceptance** — Seller agent that generates curated media plan proposals the buyer can review, refine, and accept.
|
|
471
|
+
Flow: `sync_accounts → get_products → create_media_buy → list_creative_formats → sync_creatives → get_media_buy_delivery`
|
|
472
|
+
|
|
473
|
+
**Media buy state machine lifecycle** — Validates media buy state transitions: create, pause, resume, cancel, and terminal state enforcement.
|
|
474
|
+
Flow: `get_products → create_media_buy → update_media_buy`
|
|
475
|
+
|
|
476
|
+
### Campaign Governance
|
|
477
|
+
|
|
478
|
+
**Governance denial and human escalation** — Buyer's governance agent denies a media buy that exceeds spending authority, escalates to a human who approves with conditions.
|
|
479
|
+
Flow: `sync_accounts → sync_governance → sync_plans → get_products → check_governance → create_media_buy → report_plan_outcome → get_plan_audit_logs`
|
|
480
|
+
|
|
481
|
+
### Reporting
|
|
482
|
+
|
|
483
|
+
**Media buy seller agent** — Seller agent that receives briefs, returns products, accepts media buys, and reports delivery.
|
|
484
|
+
Flow: `sync_accounts → sync_governance → get_products → create_media_buy → get_media_buys → list_creative_formats → sync_creatives → get_media_buy_delivery`
|
|
485
|
+
|
|
486
|
+
### Sponsored Intelligence (SI)
|
|
487
|
+
|
|
488
|
+
**Sponsored intelligence session** — SI agent that serves offerings, manages conversational sessions, and handles purchase handoffs.
|
|
489
|
+
Flow: `si_get_offering → si_initiate_session → si_send_message → si_terminate_session → si_send_message → si_initiate_session → si_send_message → si_terminate_session`
|
|
490
|
+
|
|
491
|
+
### Signals
|
|
492
|
+
|
|
493
|
+
**Marketplace signal agent** — Signal agent that resells third-party data provider signals with verifiable catalog provenance.
|
|
494
|
+
Flow: `get_signals → activate_signal`
|
|
495
|
+
|
|
496
|
+
**Owned signal agent** — Signal agent serving first-party or proprietary audience data without external catalog verification.
|
|
497
|
+
Flow: `get_signals → activate_signal`
|
|
498
|
+
|
|
499
|
+
## Error Codes
|
|
500
|
+
|
|
501
|
+
Agents use the `recovery` classification to decide what to do: `transient` → retry after delay, `correctable` → fix parameters and retry, `terminal` → stop and report.
|
|
502
|
+
|
|
503
|
+
| Code | Recovery | Description |
|
|
504
|
+
|------|----------|-------------|
|
|
505
|
+
| `INVALID_REQUEST` | correctable | The request is malformed or contains invalid parameters |
|
|
506
|
+
| `AUTH_REQUIRED` | correctable | Authentication is required or the provided credentials are invalid |
|
|
507
|
+
| `RATE_LIMITED` | transient | Too many requests; retry after the specified delay |
|
|
508
|
+
| `SERVICE_UNAVAILABLE` | transient | The service is temporarily unavailable |
|
|
509
|
+
| `POLICY_VIOLATION` | correctable | The request violates a platform or advertiser policy |
|
|
510
|
+
| `PRODUCT_NOT_FOUND` | correctable | The requested product does not exist |
|
|
511
|
+
| `PRODUCT_UNAVAILABLE` | transient | The product exists but is not currently available |
|
|
512
|
+
| `PROPOSAL_EXPIRED` | correctable | The proposal has expired and is no longer valid |
|
|
513
|
+
| `BUDGET_TOO_LOW` | correctable | The specified budget is below the minimum threshold |
|
|
514
|
+
| `CREATIVE_REJECTED` | correctable | One or more creatives failed review or validation |
|
|
515
|
+
| `UNSUPPORTED_FEATURE` | terminal | The requested feature is not supported by this seller |
|
|
516
|
+
| `AUDIENCE_TOO_SMALL` | correctable | The target audience is too small to deliver against |
|
|
517
|
+
| `ACCOUNT_NOT_FOUND` | terminal | The specified account does not exist |
|
|
518
|
+
| `ACCOUNT_SETUP_REQUIRED` | terminal | The account requires additional setup before use |
|
|
519
|
+
| `ACCOUNT_AMBIGUOUS` | correctable | Multiple accounts match; provide a more specific identifier |
|
|
520
|
+
| `ACCOUNT_PAYMENT_REQUIRED` | terminal | The account has an outstanding payment issue |
|
|
521
|
+
| `ACCOUNT_SUSPENDED` | terminal | The account has been suspended |
|
|
522
|
+
| `COMPLIANCE_UNSATISFIED` | correctable | Compliance requirements have not been met |
|
|
523
|
+
| `BUDGET_EXHAUSTED` | terminal | The budget has been fully spent |
|
|
524
|
+
| `BUDGET_EXCEEDED` | correctable | Operation would exceed the allocated budget for the media buy or package |
|
|
525
|
+
| `CONFLICT` | correctable | The request conflicts with the current state of the resource |
|
|
526
|
+
| `INVALID_STATE` | correctable | Operation is not permitted for the resource's current status |
|
|
527
|
+
| `MEDIA_BUY_NOT_FOUND` | correctable | Referenced media buy does not exist or is not accessible |
|
|
528
|
+
| `NOT_CANCELLABLE` | correctable | The media buy or package cannot be canceled in its current state |
|
|
529
|
+
| `PACKAGE_NOT_FOUND` | correctable | Referenced package does not exist within the specified media buy |
|
|
530
|
+
| `VALIDATION_ERROR` | correctable | Request contains invalid field values or violates business rules beyond schema validation |
|
|
531
|
+
|
|
532
|
+
Unknown codes: fall back to the HTTP status code (4xx = correctable, 5xx = transient).
|
|
533
|
+
|
|
534
|
+
## Test Scenarios
|
|
535
|
+
|
|
536
|
+
Run compliance tests with `adcp test <agent> <scenario>`. 24 built-in scenarios:
|
|
537
|
+
|
|
538
|
+
| Scenario | What it tests |
|
|
539
|
+
|----------|---------------|
|
|
540
|
+
| `health_check` | Basic connectivity check - verify agent responds |
|
|
541
|
+
| `discovery` | Test get_products, list_creative_formats, list_authorized_properties |
|
|
542
|
+
| `create_media_buy` | Discovery + create a test media buy (dry-run by default) |
|
|
543
|
+
| `full_sales_flow` | Full lifecycle: discovery → create → update → delivery |
|
|
544
|
+
| `creative_sync` | Test sync_creatives flow |
|
|
545
|
+
| `creative_inline` | Test inline creatives in create_media_buy |
|
|
546
|
+
| `creative_flow` | Creative agent: list_formats → build → preview |
|
|
547
|
+
| `signals_flow` | Signals agent: get_signals → activate |
|
|
548
|
+
| `error_handling` | Verify agent returns proper error responses |
|
|
549
|
+
| `validation` | Test schema validation (invalid inputs should be rejected) |
|
|
550
|
+
| `pricing_edge_cases` | Test auction vs fixed pricing, min spend, bid_price |
|
|
551
|
+
| `temporal_validation` | Test date/time ordering and format validation |
|
|
552
|
+
| `behavior_analysis` | Analyze agent behavior: auth, brief relevance, filtering |
|
|
553
|
+
| `response_consistency` | Check for schema errors, pagination bugs, data mismatches |
|
|
554
|
+
| `capability_discovery` | Test get_adcp_capabilities and verify v3 protocol support |
|
|
555
|
+
| `governance_property_lists` | Test property list CRUD (create, get, update, delete) |
|
|
556
|
+
| `governance_content_standards` | Test content standards listing and calibration |
|
|
557
|
+
| `si_session_lifecycle` | Test full SI session: initiate → messages → terminate |
|
|
558
|
+
| `si_availability` | Quick check for SI offering availability |
|
|
559
|
+
| `campaign_governance` | Full governance lifecycle: sync_plans → check → execute → report |
|
|
560
|
+
| `campaign_governance_denied` | Denied flow: over-budget, unauthorized market |
|
|
561
|
+
| `campaign_governance_conditions` | Conditions flow: apply conditions → re-check |
|
|
562
|
+
| `campaign_governance_delivery` | Delivery monitoring with drift detection |
|
|
563
|
+
| `seller_governance_context` | Verify seller persists governance_context from media buy lifecycle |
|
|
564
|
+
|
|
565
|
+
**Deep dive:** storyboards/ directory has full YAML definitions for each flow
|
|
566
|
+
|
|
567
|
+
## Key Types
|
|
568
|
+
|
|
569
|
+
See docs/TYPE-SUMMARY.md for field-level detail. Key types at a glance:
|
|
570
|
+
|
|
571
|
+
| Type | Purpose |
|
|
572
|
+
|------|---------|
|
|
573
|
+
| `AgentConfig` | Agent connection config (uri, protocol, auth) |
|
|
574
|
+
| `TaskResult<T>` | Return type of every tool call (status + data/error/deferred/submitted) |
|
|
575
|
+
| `InputHandler` | Callback for agent clarification requests |
|
|
576
|
+
| `ConversationContext` | Passed to InputHandler with messages, question, helpers |
|
|
577
|
+
| `Product` | Advertising inventory item with formats, pricing, targeting |
|
|
578
|
+
| `MediaBuy` | Purchased campaign with packages, budget, schedule |
|
|
579
|
+
| `CreativeAsset` | Creative with type, format, dimensions, status |
|
|
580
|
+
| `Targeting` | Audience criteria (geo, demo, behavioral, contextual, device) |
|
|
581
|
+
| `PricingOption` | Price model (CPM, vCPM, CPC, CPCV, CPV, CPP, CPA, FlatRate, Time) |
|
|
582
|
+
| `GovernanceConfig` | Buyer-side governance middleware config |
|
|
583
|
+
|
|
584
|
+
## Task Statuses
|
|
585
|
+
|
|
586
|
+
Every tool call returns a `TaskResult` with one of these statuses:
|
|
587
|
+
|
|
588
|
+
- `completed` — Success. Data in `result.data`.
|
|
589
|
+
- `input-required` — Agent needs clarification. Use `InputHandler` or `result.deferred.resume(answer)`.
|
|
590
|
+
- `submitted` — Long-running. Poll via `result.submitted.waitForCompletion()` or use webhooks.
|
|
591
|
+
- `working` — In progress (intermediate, usually not seen by callers).
|
|
592
|
+
- `deferred` — Requires human decision. Token in `result.deferred.token`.
|
|
593
|
+
- `governance-denied` / `governance-escalated` — Blocked or flagged by governance middleware.
|
|
594
|
+
|
|
595
|
+
**Deep dive:** docs/guides/ASYNC-DEVELOPER-GUIDE.md, docs/guides/ASYNC-API-REFERENCE.md
|
|
596
|
+
|
|
597
|
+
## Protocols
|
|
598
|
+
|
|
599
|
+
AdCP tools are served over MCP (Model Context Protocol) or A2A (Agent-to-Agent). The client auto-detects based on `AgentConfig.protocol`. MCP endpoints end with `/mcp/`. Auth is via bearer token in `x-adcp-auth` header.
|
|
600
|
+
|
|
601
|
+
**Deep dive:** docs/development/PROTOCOL_DIFFERENCES.md
|
|
602
|
+
|
|
603
|
+
## Discovery
|
|
604
|
+
|
|
605
|
+
Publishers declare agents in `/.well-known/adagents.json`. Brands declare identity in `/.well-known/brand.json`. Use `PropertyCrawler` or `adcp registry` CLI to discover agents.
|
|
606
|
+
|
|
607
|
+
## Where to Read More
|
|
608
|
+
|
|
609
|
+
These docs are available locally in the repo and hosted at https://adcontextprotocol.github.io/adcp-client/
|
|
610
|
+
|
|
611
|
+
| Need | Local path | Hosted |
|
|
612
|
+
|------|-----------|--------|
|
|
613
|
+
| Full type signatures | docs/TYPE-SUMMARY.md | [link](https://adcontextprotocol.github.io/adcp-client/TYPE-SUMMARY.md) |
|
|
614
|
+
| Getting started / install | docs/getting-started.md | [link](https://adcontextprotocol.github.io/adcp-client/getting-started.md) |
|
|
615
|
+
| Build a server-side agent | docs/guides/BUILD-AN-AGENT.md | [link](https://adcontextprotocol.github.io/adcp-client/guides/BUILD-AN-AGENT.md) |
|
|
616
|
+
| Async patterns (polling, webhooks, deferred) | docs/guides/ASYNC-DEVELOPER-GUIDE.md | [link](https://adcontextprotocol.github.io/adcp-client/guides/ASYNC-DEVELOPER-GUIDE.md) |
|
|
617
|
+
| Async API reference | docs/guides/ASYNC-API-REFERENCE.md | [link](https://adcontextprotocol.github.io/adcp-client/guides/ASYNC-API-REFERENCE.md) |
|
|
618
|
+
| Input handler patterns | docs/guides/HANDLER-PATTERNS-GUIDE.md | [link](https://adcontextprotocol.github.io/adcp-client/guides/HANDLER-PATTERNS-GUIDE.md) |
|
|
619
|
+
| Webhook configuration | docs/guides/PUSH-NOTIFICATION-CONFIG.md | [link](https://adcontextprotocol.github.io/adcp-client/guides/PUSH-NOTIFICATION-CONFIG.md) |
|
|
620
|
+
| Real-world code examples | docs/guides/REAL-WORLD-EXAMPLES.md | [link](https://adcontextprotocol.github.io/adcp-client/guides/REAL-WORLD-EXAMPLES.md) |
|
|
621
|
+
| CLI reference | docs/CLI.md | [link](https://adcontextprotocol.github.io/adcp-client/CLI.md) |
|
|
622
|
+
| Zod runtime validation | docs/ZOD-SCHEMAS.md | [link](https://adcontextprotocol.github.io/adcp-client/ZOD-SCHEMAS.md) |
|
|
623
|
+
| Testing strategy | docs/guides/TESTING-STRATEGY.md | [link](https://adcontextprotocol.github.io/adcp-client/guides/TESTING-STRATEGY.md) |
|
|
624
|
+
| Protocol differences (MCP vs A2A) | docs/development/PROTOCOL_DIFFERENCES.md | [link](https://adcontextprotocol.github.io/adcp-client/development/PROTOCOL_DIFFERENCES.md) |
|
|
625
|
+
| TypeDoc API reference | docs/api/index.html | [link](https://adcontextprotocol.github.io/adcp-client/api/index.html) |
|
|
626
|
+
|
|
627
|
+
JSON schemas (source of truth): `schemas/cache/latest/index.json` (local only)
|
|
628
|
+
|
|
629
|
+
## External Resources
|
|
630
|
+
|
|
631
|
+
- Documentation: https://adcontextprotocol.github.io/adcp-client/
|
|
632
|
+
- npm: https://www.npmjs.com/package/@adcp/client
|
|
633
|
+
- Spec: https://adcontextprotocol.org
|
|
634
|
+
- CLI: `npx @adcp/client`
|