Package-level declarations

Types

Link copied to clipboard

Represents a session for interacting with a language model (LLM) in a read-only context within an AI agent setup. This session is configured with a set of tools, an executor for handling prompt execution, a prompt definition, a language model, and specific session configurations.

Link copied to clipboard

Represents a session for an AI agent that interacts with an LLM (Language Learning Model). The session manages prompt execution, structured outputs, and tools integration.

Link copied to clipboard

A session for managing interactions with a language learning model (LLM) and tools in an agent environment. This class provides functionality for executing LLM requests, managing tools, and customizing prompts dynamically within a specific session context.

Functions

Link copied to clipboard
inline suspend fun <TResult> AIAgentLLMWriteSession.callTool(toolFunction: KFunction<TResult>, vararg args: Any?): SafeToolFromCallable.Result<TResult>

Invokes a specified tool function within the AI Agent's write session context.

Link copied to clipboard

Executes a parallelized tool call using the provided data flow and tool function within the session.

Link copied to clipboard
inline fun <DataArgs, TResult> AIAgentLLMWriteSession.emitParallelToolCallsRaw(flow: Flow<DataArgs>, foolFunction: KFunction<TResult>, concurrency: Int = 16): Flow<String>

Executes parallel tool calls in a raw format using the provided flow of data arguments.

Link copied to clipboard

Finds a specific tool within the tool registry using the given tool function and returns it as a safe tool.

Link copied to clipboard

Transforms a flow of argument data into a flow of parallel tool call results using the provided SafeToolFromCallable.

Link copied to clipboard
inline fun <TArgs, TResult> Flow<TArgs>.toParallelToolCallsRaw(safeTool: SafeToolFromCallable<TResult>, concurrency: Int = 16): Flow<String>

Transforms a flow of input arguments into a flow of raw parallel tool calls.