java.lang.Object
com.mulesoft.connectors.a2a.api.model.card.AgentCard

public class AgentCard extends Object
Represents an Agent Card in the A2A protocol, containing details about an agent's identity, capabilities, available skills, and connection information.

An Agent Card serves as the primary means for agents to discover and interact with each other in the A2A ecosystem.

Since:
1.0.0
  • Constructor Details

    • AgentCard

      public AgentCard()
  • Method Details

    • copy

      public AgentCard copy()
      Creates a copy of this AgentCard.
      Returns:
      A new AgentCard instance with the same values as this one
    • getName

      public String getName()
      Gets the name of the agent.
      Returns:
      The agent's name
    • setName

      public void setName(String name)
      Sets the name of the agent.
      Parameters:
      name - The agent's name
    • getDescription

      public String getDescription()
      Gets the description of the agent.
      Returns:
      The agent's description
    • setDescription

      public void setDescription(String description)
      Sets the description of the agent.
      Parameters:
      description - The agent's description
    • getUrl

      public String getUrl()
      Gets the URL endpoint where the agent can be reached.
      Returns:
      The agent's URL
    • setUrl

      public void setUrl(String url)
      Sets the URL endpoint where the agent can be reached.
      Parameters:
      url - The agent's URL
    • getVersion

      public String getVersion()
      Gets the version of the agent implementation.
      Returns:
      The agent's version
    • setVersion

      public void setVersion(String version)
      Sets the version of the agent implementation.
      Parameters:
      version - The agent's version
    • getDocumentationUrl

      public String getDocumentationUrl()
      Gets the URL where documentation for this agent can be found.
      Returns:
      The documentation URL
    • setDocumentationUrl

      public void setDocumentationUrl(String documentationUrl)
      Sets the URL where documentation for this agent can be found.
      Parameters:
      documentationUrl - The documentation URL
    • getDefaultInputModes

      public List<String> getDefaultInputModes()
      Gets the default input modes supported by the agent.
      Returns:
      The agent's default input modes
    • setDefaultInputModes

      public void setDefaultInputModes(List<String> defaultInputModes)
      Sets the default input modes supported by this agent.
      Parameters:
      defaultInputModes - The list of default input modes
    • getDefaultOutputModes

      public List<String> getDefaultOutputModes()
      Gets the default output modes supported by this agent. If not specified, returns a default list containing "text".
      Returns:
      The list of default output modes
    • setDefaultOutputModes

      public void setDefaultOutputModes(List<String> defaultOutputModes)
      Sets the default output modes supported by this agent.
      Parameters:
      defaultOutputModes - The list of default output modes
    • getProvider

      public AgentProvider getProvider()
      Gets information about the provider of this agent.
      Returns:
      The agent provider information
    • setProvider

      public void setProvider(AgentProvider provider)
      Sets information about the provider of this agent.
      Parameters:
      provider - The agent provider information
    • getCapabilities

      public AgentCapabilities getCapabilities()
      Gets the capabilities of this agent.
      Returns:
      The agent's capabilities
    • setCapabilities

      public void setCapabilities(AgentCapabilities capabilities)
      Sets the capabilities of this agent.
      Parameters:
      capabilities - The agent's capabilities
    • getSkills

      public List<AgentSkill> getSkills()
      Gets the list of skills that this agent can perform.
      Returns:
      The agent's skills
    • setSkills

      public void setSkills(List<AgentSkill> skills)
      Sets the list of skills that this agent can perform.
      Parameters:
      skills - The agent's skills
    • getSecurity

      public List<SecurityRequirement> getSecurity()
      Gets the security requirements for contacting the agent.
      Returns:
      The agent's security requirements
    • setSecurity

      public void setSecurity(List<SecurityRequirement> security)
      Sets the security requirements for contacting the agent.
      Parameters:
      security - The agent's security requirements
    • getSupportsAuthenticatedExtendedCard

      public boolean getSupportsAuthenticatedExtendedCard()
      Gets whether the agent supports providing an extended agent card when the user is authenticated.
      Returns:
      true if the agent supports authenticated extended card, false otherwise
    • setSupportsAuthenticatedExtendedCard

      public void setSupportsAuthenticatedExtendedCard(boolean supportsAuthenticatedExtendedCard)
      Sets whether the agent supports providing an extended agent card when the user is authenticated.
      Parameters:
      supportsAuthenticatedExtendedCard - true if the agent supports authenticated extended card
    • getSecuritySchemes

      public List<SecurityScheme> getSecuritySchemes()
      Gets the security schemes available for this agent.
      Returns:
      The agent's security schemes
    • setSecuritySchemes

      public void setSecuritySchemes(List<SecurityScheme> securitySchemes)
      Sets the security schemes available for this agent.
      Parameters:
      securitySchemes - The agent's security schemes
    • getIconUrl

      public String getIconUrl()
      Gets the icon URL for the agent.
      Returns:
      The agent's icon URL
    • setIconUrl

      public void setIconUrl(String iconUrl)
      Sets the icon URL for the agent.
      Parameters:
      iconUrl - The agent's icon URL
    • getProtocolVersion

      public String getProtocolVersion()
      Gets the A2A spec version on which agent is running.
      Returns:
      The A2A spec version on which agent is running
    • setProtocolVersion

      public void setProtocolVersion(String protocolVersion)
      Sets the A2A spec version on which agent is running.
      Parameters:
      protocolVersion - A2A spec version
    • equals

      public boolean equals(Object object)
      Compares this AgentCard with another object for equality.
      Overrides:
      equals in class Object
      Parameters:
      object - The object to compare with
      Returns:
      true if the objects are equal, false otherwise
    • hashCode

      public int hashCode()
      Generates a hash code for this AgentCard.
      Overrides:
      hashCode in class Object
      Returns:
      A hash code value for this object