AIAgentLLMContext
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.
It inherits all shared behavior from AIAgentLLMContextCommon.
Constructs a new instance of AIAgentLLMContext with the provided parameters.
Parameters
A list of tools described by ToolDescriptor that the agent can interact with.
A registry of available tools, defaulting to an empty ToolRegistry.
The initial prompt used in the context, represented by a Prompt instance.
The language model used for processing prompts and generating responses.
An optional ResponseProcessor for handling and processing model responses.
Responsible for executing the logic for prompt processing in the context.
The operational environment of the AI agent, represented by an AIAgentEnvironment.
Configuration settings for the AI agent, encapsulated in an AIAgentConfig.
A clock instance for managing time-related operations within the context.
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.
It inherits all shared behavior from AIAgentLLMContextCommon.
Constructs a new instance of AIAgentLLMContext with the provided parameters.
Parameters
A list of tools described by ToolDescriptor that the agent can interact with.
A registry of available tools, defaulting to an empty ToolRegistry.
The initial prompt used in the context, represented by a Prompt instance.
The language model used for processing prompts and generating responses.
An optional ResponseProcessor for handling and processing model responses.
Responsible for executing the logic for prompt processing in the context.
The operational environment of the AI agent, represented by an AIAgentEnvironment.
Configuration settings for the AI agent, encapsulated in an AIAgentConfig.
A clock instance for managing time-related operations within the context.
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.
It inherits all shared behavior from AIAgentLLMContextCommon.
Constructs a new instance of AIAgentLLMContext with the provided parameters.
Parameters
A list of tools described by ToolDescriptor that the agent can interact with.
A registry of available tools, defaulting to an empty ToolRegistry.
The initial prompt used in the context, represented by a Prompt instance.
The language model used for processing prompts and generating responses.
An optional ResponseProcessor for handling and processing model responses.
Responsible for executing the logic for prompt processing in the context.
The operational environment of the AI agent, represented by an AIAgentEnvironment.
Configuration settings for the AI agent, encapsulated in an AIAgentConfig.
A clock instance for managing time-related operations within the context.
Constructors
Properties
Represents the clock instance used for time-related operations and scheduling within the context.
Represents the clock instance used for time-related operations and scheduling within the context.
Provides access to the configuration settings for an AI agent within the LLM context.
Provides access to the configuration settings for an AI agent within the LLM context.
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.
Represents the execution environment associated with an AI agent within the context of the LLM (Large Language Model) framework.
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.
LLM currently associated with this context.
LLM currently associated with this context.
The PromptExecutor responsible for performing operations on the current prompt.
The PromptExecutor responsible for performing operations on the current prompt.
The PromptExecutor responsible for performing operations on the current prompt.
Response processor currently associated with this context.
Response processor currently associated with this context.
Response processor currently associated with this context.
A ToolRegistry that contains metadata about available tools.
A ToolRegistry that contains metadata about available tools.
A ToolRegistry that contains metadata about available tools.
List of current tools associated with this agent context.
List of current tools associated with this agent context.
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.
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.
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 read-only session within the context of AIAgentLLMReadSession and returns the result of the provided block.
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 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.
Executes a block of code within a write session for the AI Agent LLM context.
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.
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.