Class A2AClientAgentInvoker
java.lang.Object
dev.langchain4j.agentic.a2a.A2AClientAgentInvoker
- All Implemented Interfaces:
AgentInvoker, InternalAgent, AgentInstance
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe condition under which this agent runs when it is invoked as a subagent, ornullwhen it always runs.agentId()void<T extends AgentInstance>
TGives access to the wrapped A2A client agent, for instance to fetch its agent card before the first invocation of the declarative agentic system containing it:subagent.as(A2AClientInstance.class).agentCard().booleanasync()The description of this agent.listener()method()name()parent()voidregisterInheritedParentListener(AgentListener parentListener) voidsetParent(InternalAgent parent) toInvocationArguments(AgenticScope agenticScope) topology()Class<?> type()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AgentInstance
leaf, optionalMethods inherited from interface AgentInvoker
invokeMethods inherited from interface InternalAgent
allowChatMemory, allowStreamingOutput, compensateOnError, enableCrossAgentCompensation, setAgentId
-
Constructor Details
-
A2AClientAgentInvoker
-
-
Method Details
-
name
- Specified by:
namein interfaceAgentInstance
-
agentId
- Specified by:
agentIdin interfaceAgentInstance
-
description
Description copied from interface:AgentInstanceThe description of this agent. For a remote agent without an explicit description, like an A2A or an MCP one, it is read from the remote server the first time it is requested, so this call can block, and it fails with anAgentUnavailableExceptionwhen the server is unavailable.- Specified by:
descriptionin interfaceAgentInstance
-
type
- Specified by:
typein interfaceAgentInstance
-
plannerType
- Specified by:
plannerTypein interfaceAgentInstance
-
outputType
- Specified by:
outputTypein interfaceAgentInstance
-
outputKey
- Specified by:
outputKeyin interfaceAgentInstance
-
async
public boolean async()- Specified by:
asyncin interfaceAgentInstance
-
method
- Specified by:
methodin interfaceAgentInvoker
-
activationCondition
Description copied from interface:AgentInstanceThe condition under which this agent runs when it is invoked as a subagent, ornullwhen it always runs. When the condition is false, the agent is skipped: it is not invoked, it writes nothing to theAgenticScopeand its parent's planner is notified of the skip. The condition is ignored when the agent is invoked directly, as the root of an agentic system.The condition can be evaluated more than once for a single invocation, by the planner of the parent while selecting its next agents and again when the agent is invoked, so it must be cheap and free of side effects.
- Specified by:
activationConditionin interfaceAgentInstance
-
arguments
- Specified by:
argumentsin interfaceAgentInstance
-
subagents
- Specified by:
subagentsin interfaceAgentInstance
-
toInvocationArguments
- Specified by:
toInvocationArgumentsin interfaceAgentInvoker
-
listener
- Specified by:
listenerin interfaceInternalAgent
-
topology
- Specified by:
topologyin interfaceAgentInstance
-
parent
- Specified by:
parentin interfaceAgentInstance
-
as
Gives access to the wrapped A2A client agent, for instance to fetch its agent card before the first invocation of the declarative agentic system containing it:subagent.as(A2AClientInstance.class).agentCard().- Specified by:
asin interfaceAgentInstance
-
setParent
- Specified by:
setParentin interfaceInternalAgent
-
registerInheritedParentListener
- Specified by:
registerInheritedParentListenerin interfaceInternalAgent
-
appendId
- Specified by:
appendIdin interfaceInternalAgent
-