execute

abstract suspend fun execute(args: TArgs, context: AIAgentContext): TResult(source)

Executes the tool's logic with the provided arguments and the live AIAgentContext driving the current call.

Return

The result of the tool's execution.

Parameters

args

The input arguments required to execute the tool.

context

The agent context (LLM context, run id, configuration, storage, ...).


suspend override fun execute(args: TArgs, metadata: ToolCallMetadata): TResult(source)