Package-level declarations

Types

Link copied to clipboard

A functional interface representing an action that can be performed on a builder in a chainable manner. It defines a transformation from one builder type to another, allowing the construction process to be extended or modified incrementally.

Link copied to clipboard
fun interface ConfigureAction<T>

Represents a functional interface designed to apply configurations of type T. This interface allows for standardized handling of configuration operations across various implementations or systems.

Functions

Link copied to clipboard
fun <T> runBlockingIfRequired(context: ERROR CLASS: Symbol not found for CoroutineContext = EmptyCoroutineContext, block: suspend () -> T): T

Executes a suspending block as a bridge from blocking (Java) code into the coroutine world. It uses AGENT_CONTEXT_ELEMENT to track the current logical dispatcher across blocking boundaries and avoid deadlocks in two scenarios:

Link copied to clipboard
fun <T> AIAgentConfig.runOnLLMDispatcher(executorService: ExecutorService? = null, block: suspend () -> T): T

Executes the given suspending block of code on the LLM dispatcher (suitable for IO / LLM communication) derived from the provided executorService, or falls back to Dispatchers.IO if none is supplied.

Link copied to clipboard
fun <T> AIAgentConfig.runOnStrategyDispatcher(executorService: ExecutorService? = null, block: suspend () -> T): T

Executes a given suspending block of code within a coroutine context on a strategy dispatcher that is determined by the provided executorService . If no executorService is supplied, it defaults to the AIAgentConfig.strategyExecutorService or falls back to Dispatchers.Default if none is configured.

Link copied to clipboard
suspend fun <T> AIAgentConfig.submitToMainDispatcher(block: () -> T): T

Submits a block of code to the main dispatcher for execution.