feat: Add support for multiple transport announcement in AgentCard (#749)
This is designed to be backward compatible. Existing cards will work and be correct with this update. New fields are added to the agent card and default interpretation for these are provided to be backward compatible --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: a2a-bot <a2a-bot@google.com> Co-authored-by: Holt Skinner <holtskinner@google.com> Co-authored-by: tomsun28 <tomsun28@outlook.com> Co-authored-by: Mike Smith <mikeas@google.com> Co-authored-by: Holt Skinner <13262395+holtskinner@users.noreply.github.com> Co-authored-by: kthota-g <kcthota@google.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
2473f69a06
commit
b35485e02e
@ -325,6 +325,16 @@ message AuthenticationInfo {
|
||||
string credentials = 2;
|
||||
}
|
||||
|
||||
// Defines additional transport information for the agent.
|
||||
message AgentInterface {
|
||||
// The url this interface is found at.
|
||||
string url = 1;
|
||||
// The transport supported this url. This is an open form string, to be
|
||||
// easily extended for many transport protocols. The core ones officially
|
||||
// supported are JSONRPC, GRPC and HTTP+JSON.
|
||||
string transport = 2;
|
||||
}
|
||||
|
||||
// AgentCard conveys key information:
|
||||
// - Overall details (version, name, description, uses)
|
||||
// - Skills; a set of actions/solutions the agent can perform
|
||||
@ -335,9 +345,15 @@ message AgentCard {
|
||||
string name = 1;
|
||||
// A description of the agents domain of action/solution space.
|
||||
string description = 2;
|
||||
// The base url to interact with the agent at.
|
||||
// A URL to the address the agent is hosted at. This represents the
|
||||
// preferred endpoint as declared by the agent.
|
||||
string url = 3;
|
||||
// Information about the service provider of the agent.
|
||||
// The transport of the preferred endpoint. If empty, defaults to JSONRPC.
|
||||
string preferred_transport = 14;
|
||||
// Announcement of additional supported transports. Client can use any of
|
||||
// the supported transports.
|
||||
repeated AgentInterface additional_interfaces = 15;
|
||||
// The service provider of the agent.
|
||||
AgentProvider provider = 4;
|
||||
// The version of the agent.
|
||||
string version = 5;
|
||||
|
||||
@ -130,6 +130,13 @@
|
||||
"AgentCard": {
|
||||
"description": "An AgentCard conveys key information:\n- Overall details (version, name, description, uses)\n- Skills: A set of capabilities the agent can perform\n- Default modalities/content types supported by the agent.\n- Authentication requirements",
|
||||
"properties": {
|
||||
"additional_interfaces": {
|
||||
"description": "Announcement of additional supported transports. Client can use any of\nthe supported transports.",
|
||||
"items": {
|
||||
"$ref": "#/definitions/AgentInterface"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"capabilities": {
|
||||
"$ref": "#/definitions/AgentCapabilities",
|
||||
"description": "Optional capabilities supported by the agent."
|
||||
@ -164,6 +171,9 @@
|
||||
"description": "Human readable name of the agent.",
|
||||
"type": "string"
|
||||
},
|
||||
"preferred_transport": {
|
||||
"type": "string"
|
||||
},
|
||||
"provider": {
|
||||
"$ref": "#/definitions/AgentProvider",
|
||||
"description": "The service provider of the agent"
|
||||
@ -200,7 +210,7 @@
|
||||
"type": "boolean"
|
||||
},
|
||||
"url": {
|
||||
"description": "A URL to the address the agent is hosted at.",
|
||||
"description": "A URL to the address the agent is hosted at. This represents the\npreferred endpoint as declared by the agent.",
|
||||
"type": "string"
|
||||
},
|
||||
"version": {
|
||||
@ -209,6 +219,7 @@
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"additional_interfaces",
|
||||
"capabilities",
|
||||
"defaultInputModes",
|
||||
"defaultOutputModes",
|
||||
@ -246,6 +257,23 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AgentInterface": {
|
||||
"description": "AgentInterface provides a declaration of a combination of the\ntarget url and the supported transport to interact with the agent.",
|
||||
"properties": {
|
||||
"transport": {
|
||||
"description": "The transport supported this url. This is an open form string, to be\neasily extended for many transport protocols. The core ones officially\nsupported are JSONRPC, GRPC and HTTP+JSON.",
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"transport",
|
||||
"url"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AgentProvider": {
|
||||
"description": "Represents the service provider of an agent.",
|
||||
"properties": {
|
||||
|
||||
@ -82,6 +82,22 @@ export interface AgentSkill {
|
||||
}
|
||||
// --8<-- [end:AgentSkill]
|
||||
|
||||
// --8<-- [start:AgentInterface]
|
||||
/**
|
||||
* AgentInterface provides a declaration of a combination of the
|
||||
* target url and the supported transport to interact with the agent.
|
||||
*/
|
||||
export interface AgentInterface {
|
||||
url: string; // the url this interface is found at
|
||||
/**
|
||||
* The transport supported this url. This is an open form string, to be
|
||||
* easily extended for many transport protocols. The core ones officially
|
||||
* supported are JSONRPC, GRPC and HTTP+JSON.
|
||||
*/
|
||||
transport: string;
|
||||
}
|
||||
// --8<-- [end:AgentInterface]
|
||||
|
||||
// --8<-- [start:AgentCard]
|
||||
/**
|
||||
* An AgentCard conveys key information:
|
||||
@ -102,8 +118,18 @@ export interface AgentCard {
|
||||
* @example "Agent that helps users with recipes and cooking."
|
||||
*/
|
||||
description: string;
|
||||
/** A URL to the address the agent is hosted at. */
|
||||
/**
|
||||
* A URL to the address the agent is hosted at. This represents the
|
||||
* preferred endpoint as declared by the agent.
|
||||
*/
|
||||
url: string;
|
||||
/* The transport of the preferred endpoint. If empty, defaults to JSONRPC.*/
|
||||
preferred_transport?: string;
|
||||
/**
|
||||
* Announcement of additional supported transports. Client can use any of
|
||||
* the supported transports.
|
||||
*/
|
||||
additional_interfaces: AgentInterface[];
|
||||
/** A URL to an icon for the agent. */
|
||||
iconUrl?: string;
|
||||
/** The service provider of the agent */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user