Package io.a2a.spec

Record Class AgentCard

java.lang.Object
java.lang.Record
io.a2a.spec.AgentCard

public record AgentCard(String name, String description, String url, AgentProvider provider, String version, String documentationUrl, AgentCapabilities capabilities, List<String> defaultInputModes, List<String> defaultOutputModes, List<AgentSkill> skills, boolean supportsAuthenticatedExtendedCard, Map<String,SecurityScheme> securitySchemes, List<Map<String,List<String>>> security, String iconUrl, List<AgentInterface> additionalInterfaces, String preferredTransport, String protocolVersion) extends Record
A public metadata file that describes an agent's capabilities, skills, endpoint URL, and authentication requirements. Clients use this for discovery.
  • Constructor Details

    • AgentCard

      public AgentCard(String name, String description, String url, AgentProvider provider, String version, String documentationUrl, AgentCapabilities capabilities, List<String> defaultInputModes, List<String> defaultOutputModes, List<AgentSkill> skills, boolean supportsAuthenticatedExtendedCard, Map<String,SecurityScheme> securitySchemes, List<Map<String,List<String>>> security, String iconUrl, List<AgentInterface> additionalInterfaces, String preferredTransport, String protocolVersion)
      Creates an instance of a AgentCard record class.
      Parameters:
      name - the value for the name record component
      description - the value for the description record component
      url - the value for the url record component
      provider - the value for the provider record component
      version - the value for the version record component
      documentationUrl - the value for the documentationUrl record component
      capabilities - the value for the capabilities record component
      defaultInputModes - the value for the defaultInputModes record component
      defaultOutputModes - the value for the defaultOutputModes record component
      skills - the value for the skills record component
      supportsAuthenticatedExtendedCard - the value for the supportsAuthenticatedExtendedCard record component
      securitySchemes - the value for the securitySchemes record component
      security - the value for the security record component
      iconUrl - the value for the iconUrl record component
      additionalInterfaces - the value for the additionalInterfaces record component
      preferredTransport - the value for the preferredTransport record component
      protocolVersion - the value for the protocolVersion record component
  • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • 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
    • provider

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

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

      public String documentationUrl()
      Returns the value of the documentationUrl record component.
      Returns:
      the value of the documentationUrl record component
    • capabilities

      public AgentCapabilities 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<AgentSkill> skills()
      Returns the value of the skills record component.
      Returns:
      the value of the skills record component
    • supportsAuthenticatedExtendedCard

      public boolean supportsAuthenticatedExtendedCard()
      Returns the value of the supportsAuthenticatedExtendedCard record component.
      Returns:
      the value of the supportsAuthenticatedExtendedCard record component
    • securitySchemes

      public Map<String,SecurityScheme> securitySchemes()
      Returns the value of the securitySchemes record component.
      Returns:
      the value of the securitySchemes record component
    • security

      public List<Map<String,List<String>>> security()
      Returns the value of the security record component.
      Returns:
      the value of the security record component
    • iconUrl

      public String iconUrl()
      Returns the value of the iconUrl record component.
      Returns:
      the value of the iconUrl record component
    • additionalInterfaces

      public List<AgentInterface> additionalInterfaces()
      Returns the value of the additionalInterfaces record component.
      Returns:
      the value of the additionalInterfaces record component
    • preferredTransport

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

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