Interface A2AClientInstance
- All Superinterfaces:
AgentInstance, InternalAgent
-
Method Summary
Modifier and TypeMethodDescriptionorg.a2aproject.sdk.spec.AgentCardReturns the agent card of the remote agent, fetching it from the A2A server if it has not been fetched yet.String[]default Stringtenant()Returns the tenant configured for this A2A client instance, or the one of the agent card when the card has already been fetched, ornullotherwise.Methods inherited from interface AgentInstance
activationCondition, agentId, arguments, as, async, description, leaf, name, optional, outputKey, outputType, parent, plannerType, subagents, topology, typeMethods inherited from interface InternalAgent
allowChatMemory, allowStreamingOutput, appendId, compensateOnError, enableCrossAgentCompensation, listener, registerInheritedParentListener, setAgentId, setParent
-
Method Details
-
inputKeys
String[] inputKeys() -
agentCard
org.a2aproject.sdk.spec.AgentCard agentCard()Returns the agent card of the remote agent, fetching it from the A2A server if it has not been fetched yet. The card is normally fetched on the first invocation of the agent, so this call blocks until the fetch completes, at most for the resolution timeout of the agent, 30 seconds by default, and can be used to warm up the agent, or to fail fast, before its first invocation. Inside a declarative agentic system the A2A agent is wrapped: reach it throughsubagent.as(A2AClientInstance.class)on the corresponding subagent of theAgentInstanceof the system.- Throws:
A2AAgentCardException- if the card cannot be fetched, or is not fetched within the resolution timeout
-
tenant
Returns the tenant configured for this A2A client instance, or the one of the agent card when the card has already been fetched, ornullotherwise. It never fetches the card. When non-null, this tenant is sent automatically with every message.
-