Package com.embabel.agent.core.support
Class DefaultAgentPlatform
-
- All Implemented Interfaces:
-
com.embabel.agent.api.common.scope.AgentScopeBuilder,com.embabel.agent.core.ActionSource,com.embabel.agent.core.AgentPlatform,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.Described,com.embabel.common.core.types.HasInfoString,com.embabel.common.core.types.Named
@Service() public class DefaultAgentPlatform implements AgentPlatform
-
-
Field Summary
Fields Modifier and Type Field Description private final SpringContextPlatformServicesplatformServicesprivate final Booleanopaqueprivate final Stringnameprivate final Stringdescriptionprivate final AgentPlatformProperties.ProcessTypeprocessTypeprivate final ToolGroupResolvertoolGroupResolverprivate final Collection<DomainType>domainTypesprivate final List<Action>actionsprivate final Set<Goal>goalsprivate final Set<Condition>conditionsprivate final Collection<DynamicType>dynamicTypesprivate final Collection<JvmType>jvmTypes
-
Constructor Summary
Constructors Constructor Description DefaultAgentPlatform(String name, String description, AgentPlatformProperties.ProcessType processType, LlmOperations llmOperations, ToolGroupResolver toolGroupResolver, AgenticEventListener eventListener, AgentProcessIdGenerator agentProcessIdGenerator, ContextRepository contextRepository, AgentProcessRepository agentProcessRepository, OperationScheduler operationScheduler, BlackboardProvider blackboardProvider, Asyncer asyncer, ObjectMapper objectMapper, OutputChannel outputChannel, TemplateRenderer templateRenderer, LogicalExpressionParser customLogicalExpressionParser, ApplicationContext applicationContext)
-
Method Summary
Modifier and Type Method Description SpringContextPlatformServicesgetPlatformServices()BooleangetOpaque()Whether to hide the agent's actions and conditions from the outside world, defaults to false. StringgetName()StringgetDescription()final AgentPlatformProperties.ProcessTypegetProcessType()ToolGroupResolvergetToolGroupResolver()AgentProcessgetAgentProcess(String id)Find an agent process by id. AgentProcesskillAgentProcess(String id)Kill an agent process by id. List<Agent>agents()DefaultAgentPlatformdeploy(Agent agent)AgentProcessrunAgentFrom(Agent agent, ProcessOptions processOptions, Map<String, Object> bindings)Run the agent from the given ProcessOptions. AgentProcesscreateAgentProcess(Agent agent, ProcessOptions processOptions, Map<String, Object> bindings)Create an agent process with the given options and bindings. AgentProcesscreateChildProcess(Agent agent, AgentProcess parentAgentProcess)-
Methods inherited from class com.embabel.agent.core.AgentPlatform
createAgentProcessFrom, deploy, getActions, getConditions, getDomainTypes, getGoals, start -
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, infoString, resolveType -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
DefaultAgentPlatform
DefaultAgentPlatform(String name, String description, AgentPlatformProperties.ProcessType processType, LlmOperations llmOperations, ToolGroupResolver toolGroupResolver, AgenticEventListener eventListener, AgentProcessIdGenerator agentProcessIdGenerator, ContextRepository contextRepository, AgentProcessRepository agentProcessRepository, OperationScheduler operationScheduler, BlackboardProvider blackboardProvider, Asyncer asyncer, ObjectMapper objectMapper, OutputChannel outputChannel, TemplateRenderer templateRenderer, LogicalExpressionParser customLogicalExpressionParser, ApplicationContext applicationContext)
-
-
Method Detail
-
getPlatformServices
SpringContextPlatformServices getPlatformServices()
-
getOpaque
Boolean getOpaque()
Whether to hide the agent's actions and conditions from the outside world, defaults to false.
-
getDescription
String getDescription()
-
getProcessType
final AgentPlatformProperties.ProcessType getProcessType()
-
getToolGroupResolver
ToolGroupResolver getToolGroupResolver()
-
getAgentProcess
AgentProcess getAgentProcess(String id)
Find an agent process by id. Implementations are only obliged to resolve running processes, although they may choose to return older processes.
-
killAgentProcess
AgentProcess killAgentProcess(String id)
Kill an agent process by id. Return the killed process, or null if no such process was found.
-
deploy
DefaultAgentPlatform deploy(Agent agent)
-
runAgentFrom
AgentProcess runAgentFrom(Agent agent, ProcessOptions processOptions, Map<String, Object> bindings)
Run the agent from the given ProcessOptions. We might create a new blackboard or have one
- Parameters:
agent- the agent to run.processOptions- the options for the processbindings- the bindings for the process: Objects that are pre-bound to the blackboard.
-
createAgentProcess
AgentProcess createAgentProcess(Agent agent, ProcessOptions processOptions, Map<String, Object> bindings)
Create an agent process with the given options and bindings. The process will not be started automatically, so this will return quickly, unlike the run method on the created process. AgentProcess status will be NOT_STARTED.
- Parameters:
agent- the agent to run.processOptions- the options for the processbindings- the bindings for the process: Objects that are pre-bound to the blackboard.
-
createChildProcess
AgentProcess createChildProcess(Agent agent, AgentProcess parentAgentProcess)
-
-
-
-