AIAgentParallelNodesMergeContext
Context for merging parallel node execution results.
This class provides DSL methods for selecting and folding results from parallel node executions. It delegates all AIAgentContextBase methods and properties to the underlying context.
Parameters
The input type of the parallel nodes
The output type of the parallel nodes
Constructors
Properties
Represents the AIAgent holding the current AIAgentContext.
Represents the input provided to the agent's execution.
KType representing the type of the agentInput
Represents the configuration for an AI agent.
Represents the environment in which the agent operates.
Represents the AI agent's LLM context, providing mechanisms for managing tools, prompts, and interaction with the execution environment. It ensures thread safety during concurrent read and write operations through the use of sessions.
Represents the parent context of the AI Agent.
Represents the execution pipeline associated with the AI agent operating in a graph-based context.
Manages and tracks the state of aт AI agent within the context of its execution.
Concurrent-safe key-value storage for an agent, used to manage and persist data within the context of a the AI agent stage execution. The storage
property provides a thread-safe mechanism for sharing and storing data specific to the agent's operation.
Represents the name of the strategy being used in the current AI agent context.
Functions
Utility function to get AIAgentContext.agentInput and try to cast it to some expected type.
Creates a copy of the current AIAgentContextBase object with the specified parameters.
Retrieves a feature from the current context using the specified key.
Retrieves a feature of the specified type from the current context.
Retrieves a feature of the specified type from the context or throws an exception if it is not available.
Creates a forked instance of the underlying agent context, resulting in a new independent copy of the AIAgentContextBase
. This can be used to create isolated contexts for parallel or independent operations.
Retrieves data from the agent's storage using the specified key.
Retrieves the agent-specific context data associated with the current instance.
Retrieves the history of messages exchanged during the agent's execution.
Removes a feature or data associated with the specified key from the agent's storage.
Removes the agent-specific context data associated with the current context.
Replaces the current context with the specified context in the underlying context base.
Provides the root context of the current agent. If the root context is not defined, this function defaults to returning the current instance.
Selects a result from a list of outputs based on a provided selection function.
Selects the maximum result based on a given comparison function and returns the corresponding NodeExecutionResult
containing the selected output and its associated context.
Stores a feature in the agent's storage using the specified key.
Stores the given agent context data within the current AI agent context.