Agent

data class Agent(val name: String, val provider: String, val version: <Error class: unknown class> = Semver(), val description: String, val conditions: Set<Condition> = emptySet(), val actions: List<Action>, val goals: Set<Goal>, val stuckHandler: StuckHandler? = null, val opaque: Boolean = false, val domainTypes: Collection<DomainType> = mergeTypes( agentName = name, defaultDataTypes = emptyList(), actions = actions, )) : AgentScope

An agent defines a set of actions and conditions that enable planning.

Parameters

name

The name of the agent.

provider

The provider of the agent.

version

The version of the agent. Defaults to 0.1.0

description

A description of the agent. Required

goals

The goals the agent can achieve

stuckHandler

The handler to call when the agent is stuck, if provided

conditions

Well-known conditions that can be referenced by actions

actions

The actions the agent can use

opaque

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

domainTypes

Data types used in this agent

Constructors

Link copied to clipboard
constructor(name: String, provider: String, version: String, description: String, goals: Set<Goal>, actions: List<Action>, conditions: Set<Condition> = emptySet(), stuckHandler: StuckHandler? = null)
constructor(name: String, provider: String, version: <Error class: unknown class> = Semver(), description: String, conditions: Set<Condition> = emptySet(), actions: List<Action>, goals: Set<Goal>, stuckHandler: StuckHandler? = null, opaque: Boolean = false, domainTypes: Collection<DomainType> = mergeTypes( agentName = name, defaultDataTypes = emptyList(), actions = actions, ))

Types

Link copied to clipboard
object Companion

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
Link copied to clipboard
open override val domainTypes: Collection<DomainType>
Link copied to clipboard
Link copied to clipboard
open override val goals: Set<Goal>
Link copied to clipboard
Link copied to clipboard
open val name: String
Link copied to clipboard
open override val opaque: Boolean = false
Link copied to clipboard
Link copied to clipboard
open val provider: String
Link copied to clipboard
Link copied to clipboard
open val version: <Error class: unknown class>

Functions

Link copied to clipboard
inline fun <I, O : Any> Agent.asAction(): Action

Expose this agent as an action of the given transformation type

Link copied to clipboard
inline fun <I, O : Any> Agent.asTransformation(): Transformation<I, O>

Creates a transformation action from an 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
open override fun infoString(verbose: Boolean?, indent: Int): String
Link copied to clipboard

Return a version of the agent with actions and conditions pruned to the given pruned planning system.

Link copied to clipboard
open fun resolveType(name: String): DomainType
Link copied to clipboard

Return a version of the agent with the single goal