Skip to content

Commit a540eb4

Browse files
vvillait88claude
andcommitted
docs(readme): update A2A snippet for spec-compliant card shape
The README's identity-publishing example for build_a2a_agent_card used the pre-refactor shape (capabilities=A2AAgentCardCapabilities(...) + data= assess_result + no version / description / skills). Update to the spec-compliant inputs (top-level description, version, skills as A2AAgentSkill objects, extensions inside capabilities via the helper). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0801002 commit a540eb4

1 file changed

Lines changed: 21 additions & 5 deletions

File tree

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,17 +185,33 @@ from agentscore_commerce.identity import (
185185
UCPServiceBinding,
186186
UCPSigningKey,
187187
UCPPaymentHandlerBinding,
188-
A2AAgentCardCapabilities,
188+
A2AAgentSkill,
189189
build_a2a_agent_card,
190190
build_ucp_profile,
191191
ucp_a2a_extension,
192192
)
193193

194194
# Google A2A v1.0 Signed Agent Card. Publish at /.well-known/agent-card.json.
195-
# Per UCP §A2A binding the card MUST declare the canonical UCP extension URI;
196-
# pass `ucp_a2a_extension()` with empty capabilities until you bind formal UCP
197-
# capabilities (dev.ucp.shopping.checkout, etc.).
198-
card = build_a2a_agent_card(name="My Service", url=base_url, capabilities=A2AAgentCardCapabilities(...), extensions=[ucp_a2a_extension()], data=assess_result)
195+
# Per UCP §A2A binding the card MUST declare the canonical UCP extension URI in
196+
# `capabilities.extensions[]`; pass `ucp_a2a_extension()` with empty capabilities
197+
# until you bind formal UCP capabilities (dev.ucp.shopping.checkout, etc.).
198+
# Skills are top-level AgentSkill objects; identity claims live in a separate
199+
# AgentCardSignature (RFC 7515 JWS) wrapping the serialized card.
200+
card = build_a2a_agent_card(
201+
name="My Service",
202+
description="Buy products via agent payments.",
203+
url=base_url,
204+
version="1.0.0",
205+
skills=[
206+
A2AAgentSkill(
207+
id="purchase",
208+
name="Purchase",
209+
description="Buy products via agent payments.",
210+
tags=["commerce", "payment"],
211+
),
212+
],
213+
extensions=[ucp_a2a_extension()],
214+
)
199215

200216
# Google Universal Commerce Protocol. Publish at /.well-known/ucp.
201217
# Output shape: {"ucp": {"version", "services", "capabilities",

0 commit comments

Comments
 (0)