TypedInvocation

Defines the contract for invoking an agent with a specific return type.

Extends BaseInvocation to add typed invoke and invokeAsync methods that extract and return a result of type T from the completed agent process.

Parameters

T

type of result returned by the invocation

Inheritors

Properties

Link copied to clipboard
abstract val resultType: Class<T>

The class of the result type this invocation will produce.

Functions

Link copied to clipboard
open fun invoke(map: Map<String, Any>): T

Invokes the agent with a map of named inputs and returns the typed result.

open fun invoke(obj: Any, vararg objs: Any): T

Invokes the agent with one or more arguments and returns the typed result.

Link copied to clipboard

Invokes the agent asynchronously with a map of named inputs.

open fun invokeAsync(obj: Any, vararg objs: Any): CompletableFuture<T>

Invokes the agent asynchronously with one or more arguments.

Link copied to clipboard
open fun run(map: Map<String, Any>): AgentProcess

Runs the agent with a map of named inputs.

open fun run(obj: Any, vararg objs: Any): AgentProcess

Runs the agent with one or more arguments

Link copied to clipboard

Runs the agent asynchronously with a map of named inputs.

abstract fun runAsync(obj: Any, vararg objs: Any): CompletableFuture<AgentProcess>

Runs the agent asynchronously with one or more arguments

Link copied to clipboard
abstract fun withProcessOptions(options: ProcessOptions): THIS