AIAgentLLMContextCommon
Common AIAgentLLMContext implementation shared across platforms.
Inheritors
Properties
Provides access to the configuration settings for an AI agent within the LLM context.
Represents the execution environment associated with an AI agent within the context of the LLM (Large Language Model) framework.
LLM currently associated with this context.
The PromptExecutor responsible for performing operations on the current prompt.
Response processor currently associated with this context.
A ToolRegistry that contains metadata about available tools.
List of current tools associated with this agent context.
Functions
Creates a non-suspending copy of this LLM context with the given overrides. Unlike the suspending copy overload, this variant does not acquire the internal read lock and therefore does not guarantee a consistent snapshot if another coroutine is concurrently mutating this context.
Creates a copy of this LLM context, taking a consistent snapshot of its mutable fields under the internal read lock. Multiple concurrent copy / readSession calls may proceed in parallel, but any concurrent writeSession / withPrompt will serialize against them.
Executes a read session on the AIAgentLLMContext. Multiple read sessions may run concurrently, while any concurrent writeSession or withPrompt is serialized against them.
Executes a write session on the AIAgentLLMContext, suspending until all other active write and read sessions on this context complete, then running block under exclusive access. At the end of the session, prompt, tools and model are overwritten with the values mutated inside the session.