AIAgentLLMContext
data class AIAgentLLMContext(tools: List<ToolDescriptor>, val toolRegistry: ToolRegistry = ToolRegistry.Companion.EMPTY, prompt: Prompt, model: LLModel, promptExecutor: PromptExecutor, environment: AIAgentEnvironment, config: AIAgentConfigBase)(source)
Represents the context for an AI agent LLM, managing tools, prompt handling, and interaction with the environment and execution layers. It provides mechanisms for concurrent read and write operations through sessions, ensuring thread safety.
Constructors
Link copied to clipboard
constructor(tools: List<ToolDescriptor>, toolRegistry: ToolRegistry = ToolRegistry.Companion.EMPTY, prompt: Prompt, model: LLModel, promptExecutor: PromptExecutor, environment: AIAgentEnvironment, config: AIAgentConfigBase)
Functions
Link copied to clipboard
Executes a read session within the AIAgentLLMContext, ensuring concurrent safety with active write session and other read sessions.
Link copied to clipboard
Executes a write session on the AIAgentLLMContext, ensuring that all active write and read sessions are completed before initiating the write session.