Package com.embabel.agent.api.invocation
Interface BaseInvocation
-
- All Implemented Interfaces:
public interface BaseInvocation<THIS extends BaseInvocation<THIS>>Defines the contract for invoking an agent without a specific return type.
Default instances are created with AgentInvocation.create; AgentInvocation.builder allows for customization of the invocation before creation. Once created, run or runAsync is used to run the agent.
-
-
Method Summary
Modifier and Type Method Description abstract THISwithProcessOptions(ProcessOptions options)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
-
withProcessOptions
abstract THIS withProcessOptions(ProcessOptions options)
-
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
-
-
-
-