AgentInvocation

interface AgentInvocation<T>

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

Functions

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

Invokes the agent with a map of named inputs.

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

Invokes the agent with one or more arguments.

Link copied to clipboard
abstract fun invokeAsync(map: Map<String, Any>): CompletableFuture<T>

Invokes the agent asynchronously with a map of named inputs.

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

Invokes the agent asynchronously with one or more arguments.