Package-level declarations

Types

Link copied to clipboard

Ask the user a question and return their answer to the LLM.

Link copied to clipboard

UserInteractionGateway backed by the host console (stdin / stdout).

Link copied to clipboard
class CurrentDateTimeTool(clock: Clock = Clock.System, timeZone: TimeZone = TimeZone.currentSystemDefault()) : LlmTool

Returns the current date / time in the host time zone.

Link copied to clipboard
class DateResolverTool(clock: Clock = Clock.System, timeZone: TimeZone = TimeZone.currentSystemDefault()) : LlmTool

Resolves a small vocabulary of relative date expressions to absolute ISO-8601 dates.

Link copied to clipboard
interface LlmTool

A tool the LLM may call during a completion.

Link copied to clipboard
class ParallelToolRunner(tracer: Tracer = NullTracer, caller: String? = null, maxConcurrency: Int = 4) : ToolRunner

Parallel tool runner — fans out tool calls onto child coroutines and waits for all of them. Opt-in alternative to SerialToolRunner.

Link copied to clipboard

Serial tool runner — executes tool calls one after another in input order.

Link copied to clipboard

Display a message to the user without waiting for a reply.

Link copied to clipboard
data class ToolDescriptor(val name: String, val description: String, val parameters: JsonObject)

JSON-Schema description of a tool exposed to the LLM.

Link copied to clipboard
data class ToolOutcome(val call: LlmToolCall, val result: String? = null, val error: Throwable? = null, val duration: Duration)

The outcome of executing a single tool call.

Link copied to clipboard
interface ToolRunner

Strategy for executing a batch of tool calls returned by the LLM.

Link copied to clipboard

Abstraction over the user-interaction channel used by AskUserTool and TellUserTool.