一键导入
build-si-agent
// Use when building an AdCP sponsored intelligence agent — a brand-side conversational AI experience that an LLM host (ChatGPT, Claude, Perplexity, Arc) can hand off to.
// Use when building an AdCP sponsored intelligence agent — a brand-side conversational AI experience that an LLM host (ChatGPT, Claude, Perplexity, Arc) can hand off to.
Build an AdCP sales agent (publisher / SSP / retail-media network). Implement 5 functions, throw 8 typed errors, run it. Framework handles idempotency, HITL, signing, multi-tenant, schema validation.
Use when building an AdCP creative agent — an ad server, creative management platform, or any system that accepts, stores, transforms, and serves ad creatives.
Wire-level invariants for any AdCP buyer call — idempotency_key replay semantics, account `oneOf` variants, async `status:'submitted'`+`task_id` polling, error recovery from `adcp_error.issues[]`. Load before any per-protocol task skill (adcp-media-buy, adcp-creative, adcp-signals, adcp-governance, adcp-si, adcp-brand) when calling an AdCP agent as a buyer.
Use when building an AdCP seller agent — a publisher, SSP, or retail media network that sells advertising inventory to buyer agents.
Build an AdCP creative-template decisioning platform — a stateless creative transform service (TTS, watermarking, format conversion, template fill). Use when the user wants the typed `DecisioningPlatform` shape; for fork-an-adapter starting points, see `build-creative-agent`.
Build an AdCP signal-marketplace OR signal-owned decisioning platform — a data provider serving audience signals to buyers. Use when the user wants the typed `DecisioningPlatform` shape; for fork-an-adapter starting points, see `build-signals-agent`.
| name | build-si-agent |
| description | Use when building an AdCP sponsored intelligence agent — a brand-side conversational AI experience that an LLM host (ChatGPT, Claude, Perplexity, Arc) can hand off to. |
A sponsored intelligence (SI) agent runs a brand-side conversational AI experience that an LLM host can hand off to. The buyer agent calls four tools across the session lifecycle:
si_get_offering — discover what's available, get an offering_tokensi_initiate_session — start a conversation, receive session_idsi_send_message — exchange turns, optionally surface a handoff hintsi_terminate_session — end the session, optionally return ACP checkout payloadThe agent owns the brand voice, transcript state, and product knowledge. The host owns the user, identity consent, and ACP checkout. SI is the AdCP surface that connects them.
| Protocol | Fork this | Storyboard |
|---|---|---|
sponsored-intelligence | hello_si_adapter_brand.ts | si_baseline |
SI is a protocol and specialism in AdCP 3.1. Declare it with specialisms: ['sponsored-intelligence'] and implement the sponsoredIntelligence field on the v6 DecisioningPlatform; the framework auto-derives the wire-side supported_protocols: ['sponsored_intelligence'] entry from the four registered SI tools. Older 3.0-era agents that omit the specialism still dispatch through platform.sponsoredIntelligence, but new agents should claim the specialism for compile-time and runtime validation.
The storyboard at compliance/cache/latest/protocols/sponsored-intelligence/index.yaml has three phases (capability_discovery, offering_discovery, session_lifecycle) covering all four tools. The reference adapter passes 3/3.
For exact response shapes, error codes, and optional fields, docs/llms.txt is the canonical reference.
si_initiate_session, si_send_message, si_get_offering, or si_terminate_sessionNot this skill:
skills/build-seller-agent/skills/build-signals-agent/skills/build-creative-agent/skills/build-brand-rights-agent/Every SI agent hits the cross-cutting rules in ../cross-cutting.md. The high-traffic ones for SI (deep-linked to the rule):
idempotency_key on si_initiate_session and si_send_messageserve({ authenticate }) baselinectx_metadata is not for credentials — important for SI because session state is naturally rich; production engines own full transcripts in their own backend, not in ctx_metadataOne SI-specific note on idempotency:
si_initiate_session and si_send_message are mutating and require idempotency_key. si_terminate_session is naturally idempotent on session_id and intentionally lacks the key (re-terminating a closed session must return the same payload). si_get_offering is read-only.
sponsored-intelligence specialism —
accounts.resolve, not by carrying account on the wire (SI tool schemas don't have it).req.session record (intent, offering scoping, identity consent, negotiated capabilities) onto si_send_message / si_terminate_session. Production brand engines almost always own full transcript state in their own backend (Postgres, Redis, vector store) — full transcripts, RAG embeddings, tool-call logs are too rich for ctx_metadata and easily exceed the 16KB blob cap. Treat req.session as a convenience, not authoritative state.offering_token.si_terminate_session.reason is a closed enum — user_exit | session_timeout | host_terminated | handoff_transaction | handoff_complete. handoff_transaction returns acp_handoff with checkout_url, checkout_token, expires_at; handoff_complete is conversation-concluded-naturally with no checkout.session_status, not status — values 'active' | 'pending_handoff' | 'complete' | 'terminated'. status: 'active' fails wire validation.terminated: true, not status: 'terminated'.si_send_message response requires session_id even though it's also in the request — echo from req.session_id.si_get_offering requires available: boolean at the top level.reason enum is closed — see above. Anything else fails wire validation.product_card in ui_elements requires data.title + data.price (not name/display_price); action_button requires data.label + data.action. Project per-type from upstream vocabulary in your handler.See ../SHAPE-GOTCHAS.md.
# Run the fork-matrix gate
npm run compliance:fork-matrix -- --test-name-pattern="hello-si-adapter-brand"
# Or validate your forked agent directly against the SI baseline
adcp storyboard run http://127.0.0.1:3007/mcp si_baseline \
--bearer "$ADCP_AUTH_TOKEN" --include-bundles --json
The fork-matrix gate is the three-gate contract from docs/guides/EXAMPLE-TEST-CONTRACT.md: tsc strict / storyboard zero-failures / upstream façade.
For deeper validation: docs/guides/VALIDATE-YOUR-AGENT.md.
docs/migration-6.6-to-6.7.md.docs/migration-4.x-to-5.x.md.