AgentInvocation

Defines the contract for invoking an agent.

Default instances are created with AgentInvocation.create; AgentInvocation.builder allows for customization of the invocation before creation. Once created, invoke or invokeAsync is used to invoke the agent.

Parameters

T

type of result returned by the invocation

Types

Link copied to clipboard
class Builder

Builder for configuring and creating instances of AgentInvocation.

Link copied to clipboard
object Companion

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
abstract fun <U : Any> returning(resultType: Class<U>): AgentInvocation<U>
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 withAgentPlatform(agentPlatform: AgentPlatform): AgentInvocation<T>
Link copied to clipboard
Link copied to clipboard
open fun <U : Any> withResultType(resultType: Class<U>): AgentInvocation<U>