Class PerGoalToolCallbackFactory
-
- All Implemented Interfaces:
public final class PerGoalToolCallbackFactoryGeneric tool callback provider that publishes a tool callback for each goal. Each invocation will result in a distinct AgentProcess being executed. Multiple instances of this class can be created, each with different configuration, for different purposes. Tools can be exposed to actions or via an MCP server etc. Return a tool callback for each goal taking user input. If the goal specifies startingInputTypes, add a tool for each of those input types. Add a continue tool for any process that requires user input and is waiting for a form submission.
-
-
Field Summary
Fields Modifier and Type Field Description private final List<ToolCallback>platformTools
-
Constructor Summary
Constructors Constructor Description PerGoalToolCallbackFactory(Autonomy autonomy, String applicationName, TextCommunicator textCommunicator, GoalToolNamingStrategy goalToolNamingStrategy)
-
Method Summary
Modifier and Type Method Description final List<ToolCallback>getPlatformTools()Generic tools final List<GoalToolCallback<?>>goalTools(Boolean remoteOnly, List<AgenticEventListener> listeners)Tools associated with goals. final List<ToolCallback>toolCallbacks(Boolean remoteOnly, List<AgenticEventListener> listeners)If remote is true, include only remote tools. final List<GoalToolCallback<?>>toolsForGoal(Goal goal, List<AgenticEventListener> listeners)Create tool callbacks for the given goal. -
-
Constructor Detail
-
PerGoalToolCallbackFactory
PerGoalToolCallbackFactory(Autonomy autonomy, String applicationName, TextCommunicator textCommunicator, GoalToolNamingStrategy goalToolNamingStrategy)
-
-
Method Detail
-
getPlatformTools
final List<ToolCallback> getPlatformTools()
Generic tools
-
goalTools
final List<GoalToolCallback<?>> goalTools(Boolean remoteOnly, List<AgenticEventListener> listeners)
Tools associated with goals.
- Parameters:
remoteOnly- if true, only include tools that are remote.listeners- additional listeners to be notified of events relating to the created process
-
toolCallbacks
final List<ToolCallback> toolCallbacks(Boolean remoteOnly, List<AgenticEventListener> listeners)
If remote is true, include only remote tools.
-
toolsForGoal
final List<GoalToolCallback<?>> toolsForGoal(Goal goal, List<AgenticEventListener> listeners)
Create tool callbacks for the given goal. There will be one tool callback for each starting input type of the goal.
-
-
-
-