Class MultiInstanceAgentInvoker
java.lang.Object
dev.langchain4j.agentic.internal.AbstractAgentInvoker
dev.langchain4j.agentic.internal.MultiInstanceAgentInvoker
- All Implemented Interfaces:
AgentInvoker, InternalAgent, AgentInstance
Wraps an existing
AgentInvoker to inject a specific item from a collection
into the agent's invocation arguments. Each instance represents one element of a
parallel multi-instance execution, with a unique name, agentId, and outputKey.-
Field Summary
Fields inherited from class AbstractAgentInvoker
agent, method -
Constructor Summary
ConstructorsConstructorDescriptionMultiInstanceAgentInvoker(AgentInvoker delegate, Object item, int instanceIndex) -
Method Summary
Modifier and TypeMethodDescriptionagentId()name()toInvocationArguments(AgenticScope agenticScope) Methods inherited from class AbstractAgentInvoker
appendId, arguments, as, async, description, equals, hashCode, invoke, listener, method, outputType, parent, plannerType, registerInheritedParentListener, setParent, subagents, topology, toString, typeMethods inherited from interface AgentInstance
leafMethods inherited from interface InternalAgent
allowStreamingOutput
-
Constructor Details
-
MultiInstanceAgentInvoker
-
-
Method Details
-
name
- Specified by:
namein interfaceAgentInstance- Overrides:
namein classAbstractAgentInvoker
-
agentId
- Specified by:
agentIdin interfaceAgentInstance- Overrides:
agentIdin classAbstractAgentInvoker
-
outputKey
- Specified by:
outputKeyin interfaceAgentInstance- Overrides:
outputKeyin classAbstractAgentInvoker
-
toInvocationArguments
public AgentInvocationArguments toInvocationArguments(AgenticScope agenticScope) throws MissingArgumentException - Specified by:
toInvocationArgumentsin interfaceAgentInvoker- Overrides:
toInvocationArgumentsin classAbstractAgentInvoker- Throws:
MissingArgumentException
-