Share
Embed
Universal Commerce Protocol
Mete Atamel
November 05, 2026
Transcript
30 slides
-
Universal Commerce Protocol (UCP) Mete Atamel Developer Advocate @ Google
@meteatamel atamel.dev speakerdeck.com/meteatamel github.com/meteatamel/genai-beyond-basics/tree/main/samples/protocols/ucp -
Universal Commerce Protocol (UCP) ucp.dev UCP is an open standard,
co-developed by Google, Shopify, and industry partners, that defines a common language and functional primitives for agentic commerce -
UCP enables AI agents, consumer platforms, businesses, and payment providers
to interoperate across merchant discovery, capability negotiation, and checkout without bespoke one-off integrations -
Agent Protocols Stack MCP gives agents tools & A2A enables
agent-to-agent communication UCP standardizes merchant discovery & checkout; AP2 secures payments A2UI & AG-UI bring agents into rich, interactive user interfaces -
UCP vs. AP2 UCP is the commerce layer: merchant discovery,
catalog, cart, and checkout AP2 is the trust & payment layer: cryptographically signed mandates (SD-JWT) -
Four Layers of UCP 1. Services: Vertical or domain groupings
(dev.ucp.shopping, dev.ucp.common) 2. Capabilities: Discrete, versioned features (checkout, cart, catalog.search) 3. Extensions: Optional schemas augmenting a capability via extends (fulfillment, discount) 4. Transports: Transport-agnostic bindings for REST, MCP, A2A, and Embedded -
1. 2. 3. 4. 5. 6. 7. 8. 9. 10.
11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. { "ucp": { "version": "2026-08-25", "services": { "dev.ucp.shopping": [{ "transport": "rest", "endpoint": "http://127.0.0.1:8182" }] }, "capabilities": { "dev.ucp.shopping.checkout": [{ "version": "2026-08-25" }], "dev.ucp.shopping.fulfillment": [ { "version": "2026-08-25", "extends": "dev.ucp.shopping.checkout" } ], "dev.ucp.shopping.discount": [ { "version": "2026-08-25", "extends": "dev.ucp.shopping.checkout" } ] }, "payment_handlers": { "com.google.pay": [{ "id": "gpay", "version": "2026-08-25" }], "dev.shopify.shop_pay": [{ "id": "shop_pay", "version": "2026-08-25" }] } }, "keys": [{ "kid": "merchant_key_2026", "kty": "EC", "crv": "P-256", "alg": "ES256" }] } -
Roles & Participants • Platform (AI Agent): Consumes merchant capabilities
on behalf of a user • Business (Merchant of Record): Publishes /.well-known/ucp and retains customer relationship • Credential Provider (CP): Issues scoped payment tokens (e.g., Google Wallet, Shop Pay) • Payment Service Provider (PSP): Authorizes, captures, and settles funds (e.g., Stripe, Adyen) -
Capabilities & Extensions Capabilities: Reverse-domain naming ({domain}.{service}.{capability}) and date-based versions
(2026-08-25) without a central registry Extensions: Optional schemas augmenting a parent capability via extends (fulfillment, discount, buyer_consent, ap2_mandate); pruned if parent is inactive ucp.dev/latest/specification/overview/ -
Capability Negotiation • Discovery: Business publishes its profile at GET
/.well-known/ucp; Platform sends its profile URL in the UCP-Agent HTTP header • Server-selects negotiation: Business computes capability intersection, selects latest mutually supported version, and prunes orphaned extensions • HTTP Message Signatures (RFC 9421): Permissionless request authentication verified against JWK public keys (keys[]) in each party's profile -
Checkout Flow Buy Red Roses Bouquet ($25) & Ceramic Vase
($15) 1. Agent discovers Merchant profile 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. GET /.well-known/ucp HTTP/1.1 UCP-Agent: profile="https://agent.example.com/.well-known/ucp-agent.json" { "ucp": { "version": "2026-08-25", "services": { "dev.ucp.shopping": [{ "transport": "rest", ... }] }, "capabilities": { "dev.ucp.shopping.checkout": [...], ... }, "payment_handlers": { "com.google.pay": [...], "dev.shopify.shop_pay": [...] } } } -
Checkout Flow 2. Agent creates checkout session 1. 2. 3.
4. 5. 6. 7. 8. 9. 10. 11. 12. // POST /checkout-sessions { "items": [ { "sku": "sku_roses", "quantity": 1 }, { "sku": "sku_vase", "quantity": 1 } ], "platform_capabilities": [ "dev.ucp.shopping.checkout", "dev.ucp.shopping.fulfillment", "dev.ucp.shopping.discount" ] } -
Checkout Flow 3. Merchant negotiates capabilities → status: incomplete 1.
2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. { "id": "chk_9c35e04f", "status": "incomplete", "currency": "USD", "line_items": [ { "id": "li_1", "item": { "id": "sku_roses", "price": 2500 }, "quantity": 1 }, { "id": "li_2", "item": { "id": "sku_vase", "price": 1500 }, "quantity": 1 } ], "totals": [ { "type": "subtotal", "amount": 4000 }, { "type": "total", "amount": 4000 } ] } -
Checkout Flow 4. Explicit checkout states guide autonomous vs. escalated
flows: • incomplete — Missing required buyer or fulfillment info • requires_escalation — Hand off to buyer via continue_url • ready_for_complete — Finalized totals; ready for payment • complete_in_progress — Completion executing (blocks new updates) • completed — Payment processed and OrderConfirmation created • canceled — Checkout session canceled or expired -
Checkout Flow 5. Agent updates fulfillment & discount 1. 2.
3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. // PUT /checkout-sessions/chk_9c35e04f { "buyer_email": "[email protected]", "shipping_method": "Express Delivery", "discount_code": "SAVE10" } // Response: status = "ready_for_complete" (amounts in minor units / cents) "totals": [ { "type": "subtotal", "amount": 4000 }, { "type": "discount", "display_text": "10% Promo (SAVE10)", "amount": -400 }, { "type": "fulfillment", "display_text": "Shipping (Express Delivery)", "amount": 500 }, { "type": "total", "amount": 4100 } ] -
Checkout Flow 6. Agent submits payment token → status: completed
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. // POST /checkout-sessions/chk_9c35e04f/complete { "payment_handler": "com.google.pay", "payment_token": "tok_gpay_demo_987654" } // Response: status = "completed" "order": { "id": "ord_ef9fcc12", "label": "Order #ORD_EF9FCC12", "permalink_url": "https://flowershop.example.com/orders/ord_ef9fcc12" } -
Integrate UCP into your agent 1. Discover merchant capabilities with
ucp-sdk 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. from ucp_sdk.models.schemas.profile import BusinessSchema as BusinessProfile def discover_merchant() -> dict: resp = client.get("/.well-known/ucp") profile = BusinessProfile.model_validate(resp.json()) return { "version": profile.ucp.version, "capabilities": list((profile.ucp.capabilities or {}).keys()), "payment_handlers": list(profile.ucp.payment_handlers.keys()), } -
Integrate UCP into your agent 2. Create and validate a
checkout session 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. from ucp_sdk.models.schemas.shopping.checkout import Checkout def create_checkout_session(sku: str, quantity: int = 1) -> dict: resp = client.post("/checkout-sessions", json={ "items": [{"sku": sku, "quantity": quantity}], "platform_capabilities": [ "dev.ucp.shopping.checkout", "dev.ucp.shopping.fulfillment", "dev.ucp.shopping.discount", ], }) return Checkout.model_validate(resp.json()).model_dump(mode="json") -
Integrate UCP into your agent 3. Update and complete checkout
session 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. def update_checkout_session(checkout_id: str, email: str) -> dict: resp = client.put(f"/checkout-sessions/{checkout_id}", json={ "buyer_email": email, "shipping_method": "Express Delivery", "discount_code": "SAVE10", }) return Checkout.model_validate(resp.json()).model_dump(mode="json") def complete_checkout_session(checkout_id: str, token: str) -> dict: resp = client.post(f"/checkout-sessions/{checkout_id}/complete", json={ "payment_handler": "com.google.pay", "payment_token": token, }) return Checkout.model_validate(resp.json()).model_dump(mode="json") -
Integrate UCP into your agent 4. Equip a Google ADK
Agent with UCP tools 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. from google.adk.agents import Agent root_agent = Agent( name="ucp_shopping_agent", model="gemini-2.5-flash", description="AI Shopping Agent using Universal Commerce Protocol (UCP).", instruction="Discover merchant, then create, update & complete checkout.", tools=[ discover_merchant, create_checkout_session, update_checkout_session, complete_checkout_session, ], ) -
UCP with Agent Development Kit (ADK) [user]: What capabilities and
products does this merchant support? [ucp_shopping_agent]: I checked the merchant's UCP profile at /.well-known/ucp (2026-08-25): - Capabilities: dev.ucp.shopping.checkout, fulfillment, discount - Payment Handlers: com.google.pay, dev.shopify.shop_pay - Products: Red Roses Bouquet ($25.00), Ceramic Vase ($15.00) [user]: Buy 1 Red Roses Bouquet with Express Delivery, promo SAVE10, and Google Pay. [ucp_shopping_agent]: Your order is complete! - Checkout ID: chk_a1b2c3d4 (status: completed) - Subtotal: $25.00 | Discount (SAVE10): -$2.50 | Express Delivery: $5.00 | Total: $27.50 - Order: Order #ORD_9F8E7D6C (https://flowershop.example.com/orders/ord_9f8e7d6c) github.com/meteatamel/genai-beyond-basics/tree/main/samples/protocols/ucp/adk -
Thank you! Mete Atamel Developer Advocate at Google @meteatamel atamel.dev
speakerdeck.com/meteatamel github.com/meteatamel/genai-beyond-basics/tree/main/samples/protocols/ucp