Class: A2A::AgentCard

Inherits:
ProtocolStruct
  • Object
show all
Defined in:
lib/a2a/types/agent_card.rb

Overview

The AgentCard is a self-describing manifest for an agent. It provides essential metadata including the agent’s identity, capabilities, skills, supported communication methods, and security requirements.

Instance Method Summary collapse

Methods included from Extensions::CaseTransformation

#camelize, included, #to_json

Instance Method Details

#additional_interfacesArray<AgentInterface>?

Returns A list of additional supported interfaces (transport and URL combinations). This allows agents to expose multiple transports, potentially at different URLs.

Returns:

  • (Array<AgentInterface>, nil)

    A list of additional supported interfaces (transport and URL combinations). This allows agents to expose multiple transports, potentially at different URLs.



28
# File 'lib/a2a/types/agent_card.rb', line 28

attribute? :additional_interfaces, Types::Array.of(Types::Constructor(AgentInterface)).optional

#capabilitiesAgentCapabilities

Returns A declaration of optional capabilities supported by the agent.

Returns:

  • (AgentCapabilities)

    A declaration of optional capabilities supported by the agent.



43
# File 'lib/a2a/types/agent_card.rb', line 43

attribute :capabilities, Types::Constructor(AgentCapabilities)

#default_input_modesArray<String>

Returns Default set of supported input MIME types for all skills, which can be overridden on a per-skill basis.

Returns:

  • (Array<String>)

    Default set of supported input MIME types for all skills, which can be overridden on a per-skill basis.



55
# File 'lib/a2a/types/agent_card.rb', line 55

attribute :default_input_modes, Types::Array.of(Types::String)

#default_output_modesArray<String>

Returns Default set of supported output MIME types for all skills, which can be overridden on a per-skill basis.

Returns:

  • (Array<String>)

    Default set of supported output MIME types for all skills, which can be overridden on a per-skill basis.



59
# File 'lib/a2a/types/agent_card.rb', line 59

attribute :default_output_modes, Types::Array.of(Types::String)

#descriptionString

Returns A human-readable description of the agent, assisting users and other agents in understanding its purpose.

Returns:

  • (String)

    A human-readable description of the agent, assisting users and other agents in understanding its purpose.



16
# File 'lib/a2a/types/agent_card.rb', line 16

attribute :description, Types::String

#documentation_urlURI?

Returns An optional URL to the agent’s documentation.

Returns:

  • (URI, nil)

    An optional URL to the agent’s documentation.



40
# File 'lib/a2a/types/agent_card.rb', line 40

attribute? :documentation_url, Types::URI.optional

#icon_urlURI?

Returns An optional URL to an icon for the agent.

Returns:

  • (URI, nil)

    An optional URL to an icon for the agent.



31
# File 'lib/a2a/types/agent_card.rb', line 31

attribute? :icon_url, Types::URI.optional

#nameString

Returns A human-readable name for the agent.

Returns:

  • (String)

    A human-readable name for the agent.



12
# File 'lib/a2a/types/agent_card.rb', line 12

attribute :name, Types::String

#preferred_transportString

Returns The transport protocol for the preferred endpoint (the main ‘url’ field). If not specified, defaults to ‘JSONRPC’.

Returns:

  • (String)

    The transport protocol for the preferred endpoint (the main ‘url’ field). If not specified, defaults to ‘JSONRPC’.



24
# File 'lib/a2a/types/agent_card.rb', line 24

attribute? :preferred_transport, Types::String.default('JSONRPC')

#protocol_versionString

Returns The version of the A2A protocol this agent supports.

Returns:

  • (String)

    The version of the A2A protocol this agent supports.



9
# File 'lib/a2a/types/agent_card.rb', line 9

attribute :protocol_version, Types::String.default('0.3.0')

#providerAgentProvider?

Returns Information about the provider of the agent.

Returns:

  • (AgentProvider, nil)

    Information about the provider of the agent.



34
# File 'lib/a2a/types/agent_card.rb', line 34

attribute? :provider, Types::Constructor(AgentProvider).optional

#securityArray<Hash>?

Returns A list of security requirement objects that apply to all agent interactions. Each object lists security schemes that can be used. Follows the OpenAPI 3.0 Security Requirement Object.

Returns:

  • (Array<Hash>, nil)

    A list of security requirement objects that apply to all agent interactions. Each object lists security schemes that can be used. Follows the OpenAPI 3.0 Security Requirement Object.



51
# File 'lib/a2a/types/agent_card.rb', line 51

attribute? :security, Types::Array.of(Types::Hash.map(Types::String | Types::Symbol, Types::Array.of(Types::String))).optional

#security_schemesHash<String, SecurityScheme>?

Returns A declaration of the security schemes available to authorize requests. The key is the scheme name. Follows the OpenAPI 3.0 Security Scheme Object.

Returns:

  • (Hash<String, SecurityScheme>, nil)

    A declaration of the security schemes available to authorize requests. The key is the scheme name. Follows the OpenAPI 3.0 Security Scheme Object.



47
# File 'lib/a2a/types/agent_card.rb', line 47

attribute? :security_schemes, Types::Hash.map(Types::Symbol | Types::String, Types::Constructor(SecurityScheme)).optional

#signaturesArray<AgentCardSignature>?

Returns JSON Web Signatures computed for this AgentCard.

Returns:



69
# File 'lib/a2a/types/agent_card.rb', line 69

attribute? :signatures, Types::Array.of(Types::Constructor(AgentCardSignature)).optional

#skillsArray<AgentSkill>

Returns The set of skills, or distinct capabilities, that the agent can perform.

Returns:

  • (Array<AgentSkill>)

    The set of skills, or distinct capabilities, that the agent can perform.



62
# File 'lib/a2a/types/agent_card.rb', line 62

attribute :skills, Types::Array.of(Types::Constructor(AgentSkill))

#supports_authenticated_extended_cardBoolean

Returns If true, the agent can provide an extended agent card with additional details to authenticated users. Defaults to false.

Returns:

  • (Boolean)

    If true, the agent can provide an extended agent card with additional details to authenticated users. Defaults to false.



66
# File 'lib/a2a/types/agent_card.rb', line 66

attribute? :supports_authenticated_extended_card, Types::Bool.default(false)

#urlURI

Returns The preferred endpoint URL for interacting with the agent. This URL MUST support the transport specified by ‘preferred_transport’.

Returns:

  • (URI)

    The preferred endpoint URL for interacting with the agent. This URL MUST support the transport specified by ‘preferred_transport’.



20
# File 'lib/a2a/types/agent_card.rb', line 20

attribute :url, Types::URI

#versionString

Returns The agent’s own version number. The format is defined by the provider.

Returns:

  • (String)

    The agent’s own version number. The format is defined by the provider.



37
# File 'lib/a2a/types/agent_card.rb', line 37

attribute :version, Types::String