Class Autonomy
-
- All Implemented Interfaces:
@Service() public final class AutonomyAdds autonomy to an AgentPlatform, with the ability to choose goals and agents dynamically, given user input. Then calls the AgentPlatform to execute.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classAutonomy.GoalSeekerAgent to seek a goal and the goal rankings that we used to choose the goal.
-
Field Summary
Fields Modifier and Type Field Description private final AgentPlatformagentPlatformprivate final AutonomyPropertiesproperties
-
Constructor Summary
Constructors Constructor Description Autonomy(AgentPlatform agentPlatform, Ranker ranker, AutonomyProperties properties)
-
Method Summary
Modifier and Type Method Description final AgentPlatformgetAgentPlatform()final AutonomyPropertiesgetProperties()final AgentProcessExecutionchooseAndAccomplishGoal(ProcessOptions processOptions, GoalChoiceApprover goalChoiceApprover, AgentScope agentScope, Map<String, Object> bindings, GoalSelectionOptions goalSelectionOptions)Choose a goal based on the user input and try to achieve it. final AgentProcessExecutionchooseAndRunAgent(String intent, ProcessOptions processOptions)Choose an agent based on the user input and run it. final AgentProcessExecutionrunAgent(Object inputObject, ProcessOptions processOptions, Agent agent)final Autonomy.GoalSeekercreateGoalSeeker(String intent, GoalChoiceApprover goalChoiceApprover, AgentScope agentScope, GoalSelectionOptions goalSelectionOptions)Indicate which goal we'd use for this intent, and what agent we'd create. final AgentcreateGoalAgent(Object inputObject, AgentScope agentScope, Goal goal, Boolean prune)Open mode. -
-
Constructor Detail
-
Autonomy
Autonomy(AgentPlatform agentPlatform, Ranker ranker, AutonomyProperties properties)
-
-
Method Detail
-
getAgentPlatform
final AgentPlatform getAgentPlatform()
-
getProperties
final AutonomyProperties getProperties()
-
chooseAndAccomplishGoal
final AgentProcessExecution chooseAndAccomplishGoal(ProcessOptions processOptions, GoalChoiceApprover goalChoiceApprover, AgentScope agentScope, Map<String, Object> bindings, GoalSelectionOptions goalSelectionOptions)
Choose a goal based on the user input and try to achieve it. Open execution model. May bring in actions and conditions from multiple agents to help achieve the goal. Doesn't need reified types because we don't know the type yet.
- Parameters:
processOptions- process optionsgoalChoiceApprover- goal choice approver allowing goal choice to be rejectedagentScope- scope to look for the agentbindings- any additional bindings to pass to the agent processgoalSelectionOptions- options for goal selection, such as confidence cut-off and multi-goal selection, if we want customization.
-
chooseAndRunAgent
final AgentProcessExecution chooseAndRunAgent(String intent, ProcessOptions processOptions)
Choose an agent based on the user input and run it. Closed execution model: Will never mix actions and goals from different agents. Doesn't need reified types because we don't know the type yet.
-
runAgent
final AgentProcessExecution runAgent(Object inputObject, ProcessOptions processOptions, Agent agent)
-
createGoalSeeker
final Autonomy.GoalSeeker createGoalSeeker(String intent, GoalChoiceApprover goalChoiceApprover, AgentScope agentScope, GoalSelectionOptions goalSelectionOptions)
Indicate which goal we'd use for this intent, and what agent we'd create. Dry run capability available externally.
-
createGoalAgent
final Agent createGoalAgent(Object inputObject, AgentScope agentScope, Goal goal, Boolean prune)
Open mode. Create an agent to accomplish this goal from the given user input
- Parameters:
inputObject- any input objectagentScope- scope to look for the agentgoal- the goal to accomplishprune- whether to prune the agent to only relevant actions
-
-
-
-