Class AgentCard
java.lang.Object
com.mulesoft.connectors.a2a.api.model.card.AgentCard
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a copy of this AgentCard.booleanCompares this AgentCard with another object for equality.Gets the capabilities of this agent.Gets the default input modes supported by the agent.Gets the default output modes supported by this agent.Gets the description of the agent.Gets the URL where documentation for this agent can be found.Gets the icon URL for the agent.getName()Gets the name of the agent.Gets information about the provider of this agent.Gets the security requirements for contacting the agent.Gets the security schemes available for this agent.Gets the list of skills that this agent can perform.booleanGets whether the agent supports providing an extended agent card when the user is authenticated.getUrl()Gets the URL endpoint where the agent can be reached.Gets the version of the agent implementation.inthashCode()Generates a hash code for this AgentCard.voidsetCapabilities(AgentCapabilities capabilities) Sets the capabilities of this agent.voidsetDefaultInputModes(List<String> defaultInputModes) Sets the default input modes supported by this agent.voidsetDefaultOutputModes(List<String> defaultOutputModes) Sets the default output modes supported by this agent.voidsetDescription(String description) Sets the description of the agent.voidsetDocumentationUrl(String documentationUrl) Sets the URL where documentation for this agent can be found.voidsetIconUrl(String iconUrl) Sets the icon URL for the agent.voidSets the name of the agent.voidsetProvider(AgentProvider provider) Sets information about the provider of this agent.voidsetSecurity(List<SecurityRequirement> security) Sets the security requirements for contacting the agent.voidsetSecuritySchemes(List<SecurityScheme> securitySchemes) Sets the security schemes available for this agent.voidsetSkills(List<AgentSkill> skills) Sets the list of skills that this agent can perform.voidsetSupportsAuthenticatedExtendedCard(boolean supportsAuthenticatedExtendedCard) Sets whether the agent supports providing an extended agent card when the user is authenticated.voidSets the URL endpoint where the agent can be reached.voidsetVersion(String version) Sets the version of the agent implementation.
-
Constructor Details
-
AgentCard
public AgentCard()
-
-
Method Details
-
copy
Creates a copy of this AgentCard.- Returns:
- A new AgentCard instance with the same values as this one
-
getName
Gets the name of the agent.- Returns:
- The agent's name
-
setName
Sets the name of the agent.- Parameters:
name- The agent's name
-
getDescription
Gets the description of the agent.- Returns:
- The agent's description
-
setDescription
Sets the description of the agent.- Parameters:
description- The agent's description
-
getUrl
Gets the URL endpoint where the agent can be reached.- Returns:
- The agent's URL
-
setUrl
Sets the URL endpoint where the agent can be reached.- Parameters:
url- The agent's URL
-
getVersion
Gets the version of the agent implementation.- Returns:
- The agent's version
-
setVersion
Sets the version of the agent implementation.- Parameters:
version- The agent's version
-
getDocumentationUrl
Gets the URL where documentation for this agent can be found.- Returns:
- The documentation URL
-
setDocumentationUrl
Sets the URL where documentation for this agent can be found.- Parameters:
documentationUrl- The documentation URL
-
getDefaultInputModes
Gets the default input modes supported by the agent.- Returns:
- The agent's default input modes
-
setDefaultInputModes
Sets the default input modes supported by this agent.- Parameters:
defaultInputModes- The list of default input modes
-
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
Sets the default output modes supported by this agent.- Parameters:
defaultOutputModes- The list of default output modes
-
getProvider
Gets information about the provider of this agent.- Returns:
- The agent provider information
-
setProvider
Sets information about the provider of this agent.- Parameters:
provider- The agent provider information
-
getCapabilities
Gets the capabilities of this agent.- Returns:
- The agent's capabilities
-
setCapabilities
Sets the capabilities of this agent.- Parameters:
capabilities- The agent's capabilities
-
getSkills
Gets the list of skills that this agent can perform.- Returns:
- The agent's skills
-
setSkills
Sets the list of skills that this agent can perform.- Parameters:
skills- The agent's skills
-
getSecurity
Gets the security requirements for contacting the agent.- Returns:
- The agent's security requirements
-
setSecurity
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
Gets the security schemes available for this agent.- Returns:
- The agent's security schemes
-
setSecuritySchemes
Sets the security schemes available for this agent.- Parameters:
securitySchemes- The agent's security schemes
-
getIconUrl
Gets the icon URL for the agent.- Returns:
- The agent's icon URL
-
setIconUrl
Sets the icon URL for the agent.- Parameters:
iconUrl- The agent's icon URL
-
equals
Compares this AgentCard with another object for equality. -
hashCode
public int hashCode()Generates a hash code for this AgentCard.
-