Action

@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class Action(val description: String = "", val pre: Array<String> = [], val post: Array<String> = [], val canRerun: Boolean = false, val outputBinding: String = IoBinding.DEFAULT_BINDING, val cost: <Error class: unknown class> = 0.0, val value: <Error class: unknown class> = 0.0, val toolGroups: Array<String> = [], val toolGroupRequirements: Array<ToolGroup> = [])

Annotation to indicate a method implementing an Action. Methods can have any number of parameters, which represent necessary input types. Methods can return any type. The return type will become an effect.

Parameters

description

Description of the action. Less important than for goals as a planner chooses actions based on preconditions and effects rather than by description. The description property is used for documentation purposes, having the advantage over comments that it can appear in logs. Description defaults to name

pre

Preconditions for the action

outputBinding

Output binding for the action. Only required for a custom binding.

cost

Cost of executing the action

value

Value of performing the action

toolGroups

Tool groups that this action requires. These are well known tools from the server.

toolGroupRequirements

Tool groups required, with explicit metadata such as QoS requirements.

Properties

Link copied to clipboard
val canRerun: Boolean = false
Link copied to clipboard
val cost: <Error class: unknown class> = 0.0
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val value: <Error class: unknown class> = 0.0