AgentPlatform

An AgentPlatform can run agents. It can also act as an agent itself, drawing on all of its agents as its own actions, goals, and conditions. An AgentPlatform is stateful, as agents can be deployed to it. See TypedOps for a higher level API with typed I/O. Typically, there is one AgentPlatform per Spring Boot application, with agents discovered by classpath scanning for @Agent annotations, but this is not a requirement.

Properties

Link copied to clipboard
open override val actions: List<Action>
Link copied to clipboard
open override val conditions: Set<Condition>
Link copied to clipboard
open override val domainTypes: Collection<DomainType>

All known types referenced by this component. These may or may not be backed by JVM objects.

Link copied to clipboard
Link copied to clipboard
open override val goals: Set<Goal>
Link copied to clipboard
Link copied to clipboard
abstract val opaque: Boolean

Whether to hide the agent's actions and conditions from the outside world, defaults to false.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun agents(): List<Agent>
Link copied to clipboard
open fun createAgent(name: String, provider: String, description: String): Agent

Create a new agent from the given scope

Link copied to clipboard
abstract fun createAgentProcess(agent: Agent, processOptions: ProcessOptions, bindings: Map<String, Any>): AgentProcess

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.

Link copied to clipboard
open fun createAgentProcessFrom(agent: Agent, processOptions: ProcessOptions, vararg objectsToAdd: Any): AgentProcess

Create an agent process with the given options and bind all arguments.

Link copied to clipboard
abstract fun createChildProcess(agent: Agent, parentAgentProcess: AgentProcess): AgentProcess
Link copied to clipboard
abstract fun deploy(agent: Agent): AgentPlatform
open fun deploy(agentScope: AgentScope): AgentPlatform
Link copied to clipboard
fun AgentPlatform.deployAnnotatedInstances(agentMetadataReader: AgentMetadataReader, vararg instances: Any)

Convenient method to deploy instances to an agent platform

Link copied to clipboard
abstract fun getAgentProcess(id: String): AgentProcess?

Find an agent process by id. Implementations are only obliged to resolve running processes, although they may choose to return older processes.

Link copied to clipboard
open fun infoString(verbose: Boolean?, indent: Int): String
Link copied to clipboard

Kill an agent process by id. Return the killed process, or null if no such process was found.

Link copied to clipboard
open fun resolveType(name: String): DomainType
Link copied to clipboard
abstract fun runAgentFrom(agent: Agent, processOptions: ProcessOptions = ProcessOptions(), bindings: Map<String, Any>): AgentProcess

Run the agent from the given ProcessOptions. We might create a new blackboard or have one

Link copied to clipboard
open fun runAgentWithInput(agent: Agent, processOptions: ProcessOptions = ProcessOptions(), input: Any): AgentProcess

Run the given agent with the given input, which will be added to the blackboard with the default binding.

Link copied to clipboard

Run the given agent process in the background