Package com.embabel.agent.tools.agent
Class PerGoalToolFactory
-
- All Implemented Interfaces:
public final class PerGoalToolFactoryFactory that creates tools for each goal in the agent platform. 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 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<Tool>platformTools
-
Constructor Summary
Constructors Constructor Description PerGoalToolFactory(Autonomy autonomy, String applicationName, TextCommunicator textCommunicator, GoalToolNamingStrategy goalToolNamingStrategy)
-
Method Summary
Modifier and Type Method Description final List<Tool>getPlatformTools()Generic platform tools final List<GoalTool<?>>goalTools(Boolean remoteOnly, List<AgenticEventListener> listeners)Tools associated with goals. final List<Tool>allTools(Boolean remoteOnly, List<AgenticEventListener> listeners)All tools including goal tools and platform tools. final List<GoalTool<?>>toolsForGoal(Goal goal, List<AgenticEventListener> listeners)Create tools for the given goal. -
-
Constructor Detail
-
PerGoalToolFactory
PerGoalToolFactory(Autonomy autonomy, String applicationName, TextCommunicator textCommunicator, GoalToolNamingStrategy goalToolNamingStrategy)
-
-
Method Detail
-
getPlatformTools
final List<Tool> getPlatformTools()
Generic platform tools
-
goalTools
final List<GoalTool<?>> 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
-
allTools
final List<Tool> allTools(Boolean remoteOnly, List<AgenticEventListener> listeners)
All tools including goal tools and platform tools.
- Parameters:
remoteOnly- if true, only include tools that are remote.listeners- additional listeners to be notified of events relating to the created process
-
toolsForGoal
final List<GoalTool<?>> toolsForGoal(Goal goal, List<AgenticEventListener> listeners)
Create tools for the given goal. There will be one tool for each starting input type of the goal.
-
-
-
-