Interface AgentInvoker
- All Superinterfaces:
AgentInstance, InternalAgent
- All Known Implementing Classes:
A2AClientAgentInvoker, AbstractAgentInvoker, MapperAgentInvoker, McpClientAgentInvoker, MethodAgentInvoker, UntypedAgentInvoker
-
Method Summary
Modifier and TypeMethodDescriptionstatic AgentInvokerfromMethod(InternalAgent agent, Method method) static AgentInvokerfromSpec(AgentSpecsProvider spec, Method agenticMethod, String name) default Objectinvoke(DefaultAgenticScope agenticScope, Object agent, AgentInvocationArguments args) Invokes the agent, reports the invocation to its listeners with the response of the model it called, and registers the messages it exchanged in the context of the scope.method()optionalParameterName(Parameter parameter) static StringparameterName(Parameter parameter) toInvocationArguments(AgenticScope agenticScope) 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
-
method
Method method() -
toInvocationArguments
AgentInvocationArguments toInvocationArguments(AgenticScope agenticScope) throws MissingArgumentException - Throws:
MissingArgumentException
-
invoke
default Object invoke(DefaultAgenticScope agenticScope, Object agent, AgentInvocationArguments args) throws AgentInvocationException Invokes the agent, reports the invocation to its listeners with the response of the model it called, and registers the messages it exchanged in the context of the scope. Everything happens on the calling thread, which for an asynchronous agent is the thread of its executor.- Throws:
AgentInvocationException
-
fromSpec
-
fromMethod
-
parameterName
-
optionalParameterName
-