Record Class A2aAgentCard
java.lang.Object
java.lang.Record
ai.badmonkey.agentspaces.a2a.A2aAgentCard
- Record Components:
protocolVersion- the A2A protocol version this card followsname- the agent's human-readable namedescription- what the agent doesurl- the endpoint an A2A client should talk topreferredTransport- the transport aturlversion- the agent's own version stringprovider- who operates the agentcapabilities- optional A2A features this endpoint supportsdefaultInputModes- media types the agent acceptsdefaultOutputModes- media types the agent producesskills- what the agent can do, one entry per skillmetadata- 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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOptional A2A protocol features.static final recordThe operating organization.static final recordOne skill: an A2A client's unit of "what can this agent do". -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionA2aAgentCard(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) Creates an instance of aA2aAgentCardrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecapabilitiesrecord component.Returns the value of thedefaultInputModesrecord component.Returns the value of thedefaultOutputModesrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.name()Returns the value of thenamerecord component.Returns the value of thepreferredTransportrecord component.Returns the value of theprotocolVersionrecord component.provider()Returns the value of theproviderrecord component.skills()Returns the value of theskillsrecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.version()Returns the value of theversionrecord component.
-
Field Details
-
PROTOCOL_VERSION
-
-
Constructor Details
-
A2aAgentCard
public 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) Creates an instance of aA2aAgentCardrecord class.- Parameters:
protocolVersion- the value for theprotocolVersionrecord componentname- the value for thenamerecord componentdescription- the value for thedescriptionrecord componenturl- the value for theurlrecord componentpreferredTransport- the value for thepreferredTransportrecord componentversion- the value for theversionrecord componentprovider- the value for theproviderrecord componentcapabilities- the value for thecapabilitiesrecord componentdefaultInputModes- the value for thedefaultInputModesrecord componentdefaultOutputModes- the value for thedefaultOutputModesrecord componentskills- the value for theskillsrecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
protocolVersion
Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-
name
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
url
-
preferredTransport
Returns the value of thepreferredTransportrecord component.- Returns:
- the value of the
preferredTransportrecord component
-
version
-
provider
-
capabilities
Returns the value of thecapabilitiesrecord component.- Returns:
- the value of the
capabilitiesrecord component
-
defaultInputModes
Returns the value of thedefaultInputModesrecord component.- Returns:
- the value of the
defaultInputModesrecord component
-
defaultOutputModes
Returns the value of thedefaultOutputModesrecord component.- Returns:
- the value of the
defaultOutputModesrecord component
-
skills
-
metadata
-