Record Class A2aAgentCard

java.lang.Object
java.lang.Record
ai.badmonkey.agentspaces.a2a.A2aAgentCard
Record Components:
protocolVersion - the A2A protocol version this card follows
name - the agent's human-readable name
description - what the agent does
url - the endpoint an A2A client should talk to
preferredTransport - the transport at url
version - the agent's own version string
provider - who operates the agent
capabilities - optional A2A features this endpoint supports
defaultInputModes - media types the agent accepts
defaultOutputModes - media types the agent produces
skills - what the agent can do, one entry per skill
metadata - extension fields (the AgentSpaces identity)

public record A2aAgentCard(String protocolVersion, String name, String description, String url, String preferredTransport, String version, A2aAgentCard.Provider provider, A2aAgentCard.Capabilities capabilities, List<String> defaultInputModes, List<String> defaultOutputModes, List<A2aAgentCard.Skill> skills, Map<String,String> metadata) extends Record
The A2A agent card document: the JSON shape A2A clients fetch from /.well-known/agent-card.json. AgentSpaces AgentCards translate mechanically into this form; the AgentSpaces-specific identity (agent URI, peer id, group, schema names) travels in metadata so nothing is lost in translation.
  • Field Details

    • PROTOCOL_VERSION

      public static final String PROTOCOL_VERSION
      The A2A protocol version the gateway emits.
      See Also:
  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • protocolVersion

      public String protocolVersion()
      Returns the value of the protocolVersion record component.
      Returns:
      the value of the protocolVersion record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • url

      public String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • preferredTransport

      public String preferredTransport()
      Returns the value of the preferredTransport record component.
      Returns:
      the value of the preferredTransport record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • provider

      public A2aAgentCard.Provider provider()
      Returns the value of the provider record component.
      Returns:
      the value of the provider record component
    • capabilities

      public A2aAgentCard.Capabilities capabilities()
      Returns the value of the capabilities record component.
      Returns:
      the value of the capabilities record component
    • defaultInputModes

      public List<String> defaultInputModes()
      Returns the value of the defaultInputModes record component.
      Returns:
      the value of the defaultInputModes record component
    • defaultOutputModes

      public List<String> defaultOutputModes()
      Returns the value of the defaultOutputModes record component.
      Returns:
      the value of the defaultOutputModes record component
    • skills

      public List<A2aAgentCard.Skill> skills()
      Returns the value of the skills record component.
      Returns:
      the value of the skills record component
    • metadata

      public Map<String,String> metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component