GoalTool

data class GoalTool<I : Any>(val autonomy: Autonomy, val textCommunicator: TextCommunicator, val name: String, val description: String = goal.description, val goal: Goal, val inputType: Class<I>, val listeners: List<AgenticEventListener> = emptyList()) : Tool

Framework-agnostic Tool implementation for a specific goal.

Constructors

Link copied to clipboard
constructor(autonomy: Autonomy, textCommunicator: TextCommunicator, name: String, description: String = goal.description, goal: Goal, inputType: Class<I>, listeners: List<AgenticEventListener> = emptyList())

Properties

Link copied to clipboard
Link copied to clipboard
open override val definition: Tool.Definition

Tool definition for LLM

Link copied to clipboard
Link copied to clipboard
val goal: Goal
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val metadata: Tool.Metadata

Optional metadata

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun call(input: String): Tool.Result

Execute the tool with JSON input.

Link copied to clipboard
fun Tool.toSpringToolCallback(): <Error class: unknown class>

Extension function to convert an Embabel Tool to a Spring AI ToolCallback.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun Tool.withEventPublication(agentProcess: AgentProcess, action: Action?, llmOptions: <Error class: unknown class>): Tool

Extension function to wrap a Tool with event publication.

Link copied to clipboard