Package com.embabel.agent.core
Class Agent
-
- All Implemented Interfaces:
-
com.embabel.agent.api.common.scope.AgentScopeBuilder,com.embabel.agent.core.ActionSource,com.embabel.agent.core.AgentScope,com.embabel.agent.core.ConditionSource,com.embabel.agent.core.DataDictionary,com.embabel.agent.core.GoalSource,com.embabel.common.core.types.AssetCoordinates,com.embabel.common.core.types.Described,com.embabel.common.core.types.HasInfoString,com.embabel.common.core.types.Named,com.embabel.common.core.types.NamedAndDescribed
public final class Agent implements NamedAndDescribed, AssetCoordinates, AgentScope
An agent defines a set of actions and conditions that enable planning.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAgent.Companion
-
Field Summary
Fields Modifier and Type Field Description private final PlanningSystemplanningSystemprivate final Stringnameprivate final Stringproviderprivate final Semverversionprivate final Stringdescriptionprivate final Set<Condition>conditionsprivate final List<Action>actionsprivate final Set<Goal>goalsprivate final StuckHandlerstuckHandlerprivate final Booleanopaqueprivate final Collection<DomainType>domainTypesprivate final Collection<DynamicType>dynamicTypesprivate final Collection<JvmType>jvmTypespublic final static Agent.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description Agent(String name, String provider, String version, String description, Set<Goal> goals, List<Action> actions, Set<Condition> conditions, StuckHandler stuckHandler)Agent(String name, String provider, String version, String description, Set<Goal> goals, List<Action> actions, Set<Condition> conditions)Agent(String name, String provider, String version, String description, Set<Goal> goals, List<Action> actions)Agent(String name, String provider, Semver version, String description, Set<Condition> conditions, List<Action> actions, Set<Goal> goals, StuckHandler stuckHandler, Boolean opaque, Collection<DomainType> domainTypes)
-
Method Summary
Modifier and Type Method Description final PlanningSystemgetPlanningSystem()StringgetName()StringgetProvider()SemvergetVersion()StringgetDescription()Set<Condition>getConditions()List<Action>getActions()Set<Goal>getGoals()final StuckHandlergetStuckHandler()BooleangetOpaque()Collection<DomainType>getDomainTypes()final AgentwithSingleGoal(Goal goal)Return a version of the agent with the single goal final AgentpruneTo(ConditionPlanningSystem pruned)Return a version of the agent with actions and conditions pruned to the given pruned planning system. StringinfoString(Boolean verbose, Integer indent)-
Methods inherited from class com.embabel.agent.core.DataDictionary
allowedRelationships, domainTypeForLabels, excluding, excluding, filter, getDynamicTypes, getJvmTypes, minus, minus -
Methods inherited from class com.embabel.agent.core.AgentScope
createAgent, createAgentScope, resolveType -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
Agent
Agent(String name, String provider, String version, String description, Set<Goal> goals, List<Action> actions, Set<Condition> conditions, StuckHandler stuckHandler)
-
Agent
Agent(String name, String provider, String version, String description, Set<Goal> goals, List<Action> actions, Set<Condition> conditions)
-
Agent
Agent(String name, String provider, String version, String description, Set<Goal> goals, List<Action> actions)
-
Agent
Agent(String name, String provider, Semver version, String description, Set<Condition> conditions, List<Action> actions, Set<Goal> goals, StuckHandler stuckHandler, Boolean opaque, Collection<DomainType> domainTypes)
- Parameters:
name- The name of the agent.provider- The provider of the agent.version- The version of the agent.description- A description of the agent.conditions- Well-known conditions that can be referenced by actionsactions- The actions the agent can usegoals- The goals the agent can achievestuckHandler- The handler to call when the agent is stuck, if providedopaque- whether to hide the agent's actions and conditions from the outside world, defaults to false.domainTypes- Data types used in this agent
-
-
Method Detail
-
getPlanningSystem
final PlanningSystem getPlanningSystem()
-
getProvider
String getProvider()
-
getVersion
Semver getVersion()
-
getDescription
String getDescription()
-
getConditions
Set<Condition> getConditions()
-
getActions
List<Action> getActions()
-
getStuckHandler
final StuckHandler getStuckHandler()
-
getDomainTypes
Collection<DomainType> getDomainTypes()
-
withSingleGoal
final Agent withSingleGoal(Goal goal)
Return a version of the agent with the single goal
-
pruneTo
final Agent pruneTo(ConditionPlanningSystem pruned)
Return a version of the agent with actions and conditions pruned to the given pruned planning system.
-
infoString
String infoString(Boolean verbose, Integer indent)
-
-
-
-