Interface AgentInvocation
-
- All Implemented Interfaces:
public interface AgentInvocation<T extends Object>Defines the contract for invoking an agent.
Default instances are created with AgentInvocation.create; AgentInvocation.builder allows for customization of the invocation before creation. Once created, invoke or invokeAsync is used to invoke the agent.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAgentInvocation.Companionpublic final classAgentInvocation.BuilderBuilder for configuring and creating instances of AgentInvocation.
Use this builder to set process options such as context, blackboard, verbosity, budget, and control policies before constructing the agent invocation.
-
Method Summary
Modifier and Type Method Description Tinvoke(Object obj, Object objs)Invokes the agent with one or more arguments. Tinvoke(Map<String, Object> map)Invokes the agent with a map of named inputs. abstract CompletableFuture<T>invokeAsync(Object obj, Object objs)Invokes the agent asynchronously with one or more arguments. abstract CompletableFuture<T>invokeAsync(Map<String, Object> map)Invokes the agent asynchronously with a map of named inputs. AgentProcessrun(Object obj, Object objs)Runs the agent with one or more arguments AgentProcessrun(Map<String, Object> map)Runs the agent with a map of named inputs. abstract CompletableFuture<AgentProcess>runAsync(Object obj, Object objs)Runs the agent asynchronously with one or more arguments abstract CompletableFuture<AgentProcess>runAsync(Map<String, Object> map)Runs the agent asynchronously with a map of named inputs. -
-
Method Detail
-
invoke
T invoke(Object obj, Object objs)
Invokes the agent with one or more arguments.
- Parameters:
obj- the first (and possibly only) input value to be added to the blackboardobjs- additional input values to add to the blackboard- Returns:
the result of type T from the agent invocation
-
invokeAsync
abstract CompletableFuture<T> invokeAsync(Object obj, Object objs)
Invokes the agent asynchronously with one or more arguments.
- Parameters:
obj- the first (and possibly only) input value to be added to the blackboardobjs- additional input values to add to the blackboard- Returns:
the result of type T from the agent invocation
-
invokeAsync
abstract CompletableFuture<T> invokeAsync(Map<String, Object> map)
Invokes the agent asynchronously with a map of named inputs.
-
run
AgentProcess run(Object obj, Object objs)
Runs the agent with one or more arguments
- Parameters:
obj- the first (and possibly only) input value to be added to the blackboardobjs- additional input values to add to the blackboard- Returns:
the agent process
-
run
AgentProcess run(Map<String, Object> map)
Runs the agent with a map of named inputs.
- Parameters:
map- A Map that initializes the blackboard- Returns:
the agent process
-
runAsync
abstract CompletableFuture<AgentProcess> runAsync(Object obj, Object objs)
Runs the agent asynchronously with one or more arguments
- Parameters:
obj- the first (and possibly only) input value to be added to the blackboardobjs- additional input values to add to the blackboard- Returns:
the future agent process
-
runAsync
abstract CompletableFuture<AgentProcess> runAsync(Map<String, Object> map)
Runs the agent asynchronously with a map of named inputs.
- Parameters:
map- A Map that initializes the blackboard- Returns:
the future agent process
-
-
-
-