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.

JVM actual implementation of a read-only LLM session.

Represents a session for interacting with a language model (LLM) in a read-only context within an AI agent setup.

Link copied to clipboard

Common base implementation for read-only LLM sessions shared across platform-specific actual classes.

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.

JVM actual implementation of a mutable LLM session.

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.

Link copied to clipboard

Common base implementation for mutable LLM sessions shared across platform-specific actual classes.

Link copied to clipboard

Represents a session for running an ai.koog.agents.core.agent.AIAgent.

Functions

Link copied to clipboard
inline suspend fun <ToolT : Tool<Any?, Any?>> AIAgentLLMWriteSession.callTool(args: Any?): SafeTool.Result<out Any?>

Invokes a tool of the specified type with the provided arguments.

Executes the specified tool with the given arguments and returns the result within a SafeTool.Result wrapper.

suspend fun <TArgs> AIAgentLLMWriteSession.callTool(toolName: String, args: TArgs): SafeTool.Result<out Any?>

Executes a tool by its name with the provided arguments.

Executes a tool operation based on the provided tool class and arguments.

inline suspend fun <TResult> AIAgentLLMWriteSession.callTool(toolFunction: KFunction<TResult>, vararg args: Any?): SafeTool.Result<TResult>

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

Link copied to clipboard
suspend fun <TArgs> AIAgentLLMWriteSession.callToolRaw(toolName: String, args: TArgs): String

Executes a tool identified by its name with the provided arguments and returns the raw string result.

Link copied to clipboard

Retrieves a feature from the AIAgentRunSession.pipeline associated with this session using the specified key.

Link copied to clipboard

Retrieves a feature from the AIAgentRunSession.pipeline associated with this session using the specified key or throws an exception if it is not available.

Link copied to clipboard
inline fun <TResult> AIAgentLLMWriteSession.findTool(toolFunction: KFunction<TResult>): SafeTool<ERROR CLASS: Symbol not found for ToolFromCallable.Args, TResult>

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

Link copied to clipboard

Finds a tool by its name and ensures its arguments are compatible with the specified type.

Link copied to clipboard

Finds and retrieves a tool by its name and argument/result types.