@@ -48,6 +48,27 @@ class APIKeySecurityScheme(A2ABaseModel):
4848 """
4949
5050
51+ class AgentCardSignature (A2ABaseModel ):
52+ """
53+ AgentCardSignature represents a JWS signature of an AgentCard.
54+ This follows the JSON format of an RFC 7515 JSON Web Signature (JWS).
55+ """
56+
57+ header : dict [str , Any ] | None = None
58+ """
59+ The unprotected JWS header values.
60+ """
61+ protected : str
62+ """
63+ The protected JWS header for the signature. This is a Base64url-encoded
64+ JSON object, as per RFC 7515.
65+ """
66+ signature : str
67+ """
68+ The computed signature, Base64url-encoded.
69+ """
70+
71+
5172class AgentExtension (A2ABaseModel ):
5273 """
5374 A declaration of a protocol extension supported by an Agent.
@@ -75,16 +96,23 @@ class AgentExtension(A2ABaseModel):
7596class AgentInterface (A2ABaseModel ):
7697 """
7798 Declares a combination of a target URL and a transport protocol for interacting with the agent.
99+ This allows agents to expose the same functionality over multiple transport mechanisms.
78100 """
79101
80- transport : str
102+ transport : str = Field (..., examples = [ 'JSONRPC' , 'GRPC' , 'HTTP+JSON' ])
81103 """
82- The transport protocol supported at this URL. This is a string to allow for future
83- extension. Core supported transports include 'JSONRPC', 'GRPC', and 'HTTP+JSON'.
104+ The transport protocol supported at this URL.
84105 """
85- url : str
106+ url : str = Field (
107+ ...,
108+ examples = [
109+ 'https://api.example.com/a2a/v1' ,
110+ 'https://grpc.example.com/a2a' ,
111+ 'https://rest.example.com/v1' ,
112+ ],
113+ )
86114 """
87- The URL where this interface is available.
115+ The URL where this interface is available. Must be a valid absolute HTTPS URL in production.
88116 """
89117
90118
@@ -928,6 +956,16 @@ class TextPart(A2ABaseModel):
928956 """
929957
930958
959+ class TransportProtocol (str , Enum ):
960+ """
961+ Supported A2A transport protocols.
962+ """
963+
964+ jsonrpc = 'JSONRPC'
965+ grpc = 'GRPC'
966+ http_json = 'HTTP+JSON'
967+
968+
931969class UnsupportedOperationError (A2ABaseModel ):
932970 """
933971 An A2A-specific error indicating that the requested operation is not supported by the agent.
@@ -1615,7 +1653,16 @@ class AgentCard(A2ABaseModel):
16151653 additional_interfaces : list [AgentInterface ] | None = None
16161654 """
16171655 A list of additional supported interfaces (transport and URL combinations).
1618- A client can use any of these to communicate with the agent.
1656+ This allows agents to expose multiple transports, potentially at different URLs.
1657+
1658+ Best practices:
1659+ - SHOULD include all supported transports for completeness
1660+ - SHOULD include an entry matching the main 'url' and 'preferredTransport'
1661+ - MAY reuse URLs if multiple transports are available at the same endpoint
1662+ - MUST accurately declare the transport available at each URL
1663+
1664+ Clients can select any interface from this list based on their transport capabilities
1665+ and preferences. This enables transport negotiation and fallback scenarios.
16191666 """
16201667 capabilities : AgentCapabilities
16211668 """
@@ -1650,9 +1697,16 @@ class AgentCard(A2ABaseModel):
16501697 """
16511698 A human-readable name for the agent.
16521699 """
1653- preferred_transport : str | None = None
1700+ preferred_transport : str | None = Field (
1701+ default = 'JSONRPC' , examples = ['JSONRPC' , 'GRPC' , 'HTTP+JSON' ]
1702+ )
16541703 """
1655- The transport protocol for the preferred endpoint. Defaults to 'JSONRPC' if not specified.
1704+ The transport protocol for the preferred endpoint (the main 'url' field).
1705+ If not specified, defaults to 'JSONRPC'.
1706+
1707+ IMPORTANT: The transport specified here MUST be available at the main 'url'.
1708+ This creates a binding between the main URL and its supported transport protocol.
1709+ Clients should prefer this transport and URL combination when both are supported.
16561710 """
16571711 protocol_version : str | None = '0.2.6'
16581712 """
@@ -1672,6 +1726,10 @@ class AgentCard(A2ABaseModel):
16721726 A declaration of the security schemes available to authorize requests. The key is the
16731727 scheme name. Follows the OpenAPI 3.0 Security Scheme Object.
16741728 """
1729+ signatures : list [AgentCardSignature ] | None = None
1730+ """
1731+ JSON Web Signatures computed for this AgentCard.
1732+ """
16751733 skills : list [AgentSkill ]
16761734 """
16771735 The set of skills, or distinct capabilities, that the agent can perform.
@@ -1681,9 +1739,10 @@ class AgentCard(A2ABaseModel):
16811739 If true, the agent can provide an extended agent card with additional details
16821740 to authenticated users. Defaults to false.
16831741 """
1684- url : str
1742+ url : str = Field (..., examples = [ 'https://api.example.com/a2a/v1' ])
16851743 """
16861744 The preferred endpoint URL for interacting with the agent.
1745+ This URL MUST support the transport specified by 'preferredTransport'.
16871746 """
16881747 version : str = Field (..., examples = ['1.0.0' ])
16891748 """
0 commit comments