AIAgentFunctionalContextBase
Base class for functional/planner context implementations across all targets.
It inherits all shared behavior from AIAgentFunctionalContextBaseCommon.
Inheritors
Base class for functional/planner context implementations across all targets.
It inherits all shared behavior from AIAgentFunctionalContextBaseCommon.
Base class for functional/planner context implementations across all targets.
It inherits all shared behavior from AIAgentFunctionalContextBaseCommon.
Properties
A unique identifier representing the current agent instance within the context.
A unique identifier representing the current agent instance within the context.
Represents the input provided to the agent's execution.
Represents the input provided to the agent's execution.
Represents the input provided to the agent's execution.
Represents the configuration for an AI agent.
Represents the configuration for an AI agent.
Represents the configuration for an AI agent.
Represents the environment in which the agent operates.
Represents the environment in which the agent operates.
Represents the environment in which the agent operates.
Represents the observability data associated with the AI Agent context.
Represents the observability data associated with the AI Agent context.
Represents the observability data associated with the AI Agent context.
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 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 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 parent context of the AI Agent.
Represents the parent context of the AI Agent.
A unique identifier for the current session associated with the AI agent context. Used to track and differentiate sessions within the execution of the agent pipeline.
A unique identifier for the current session associated with the AI agent context. Used to track and differentiate sessions within the execution of the agent pipeline.
Manages and tracks the state of an AI agent within the context of its execution.
Manages and tracks the state of an AI agent within the context of its execution.
Manages and tracks the state of an 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 the AI agent stage execution. The storage property provides a thread-safe mechanism for sharing and storing data specific to the agent's operation.
Concurrent-safe key-value storage for an agent, used to manage and persist data within the context of the AI agent stage execution. The storage property provides a thread-safe mechanism for sharing and storing data specific to the agent's operation.
Concurrent-safe key-value storage for an agent, used to manage and persist data within the context of 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.
Represents the name of the strategy being used in the current AI agent context.
Represents the name of the strategy being used in the current AI agent context.
Functions
Retrieves the current agent input.
Utility function to get AIAgentContext.agentInput and try to cast it to some expected type.
Appends messages to the current LLM prompt without making an LLM request. Corresponds to nodeAppendPrompt.
Appends messages to the current LLM prompt without making an LLM request. Corresponds to nodeAppendPrompt.
Appends messages to the current LLM prompt without making an LLM request. Corresponds to nodeAppendPrompt.
Compresses the current LLM prompt (message history) into a summary, replacing messages with a TLDR.
Compresses the current LLM prompt (message history) into a summary, replacing messages with a TLDR.
Compresses the current LLM prompt (message history) into a summary, replacing messages with a TLDR.
Compresses the historical data of a tool's operations using the specified compression strategy.
Provides the configuration for an AI agent.
Extension function to access the Debugger feature from an agent context.
Retrieves the current AI agent environment.
Calls a specific tool directly using the provided arguments.
Calls a specific tool directly using the provided arguments.
Calls a specific tool directly using the provided arguments.
Executes a single tool with the specified arguments.
Executes a tool call and returns the result.
Executes a tool call and returns the result.
Executes a tool call and returns the result.
Executes the specified tool call.
Executes all tool calls from a Message.Assistant and returns their results. Corresponds to nodeExecuteToolsAndGetReceivedResults.
Executes multiple tool calls and returns their results. These calls can optionally be executed in parallel.
Executes all tool calls from a Message.Assistant and returns their results. Corresponds to nodeExecuteToolsAndGetReceivedResults.
Executes multiple tool calls and returns their results. These calls can optionally be executed in parallel.
Executes all tool calls from a Message.Assistant and returns their results. Corresponds to nodeExecuteToolsAndGetReceivedResults.
Executes multiple tool calls and returns their results. These calls can optionally be executed in parallel.
Executes tool calls either sequentially or in parallel based on the provided configurations.
Retrieves the execution information of the agent.
Retrieves a feature from the AIAgentContext.pipeline associated with this context using the specified key.
Retrieves a feature from the AIAgentContext.pipeline associated with this context using the specified key or throws an exception if it is not available.
Retrieves the agent-specific context data associated with the current instance.
Retrieves the agent-specific context data associated with the current instance.
Extracts a list of tool call messages from a given list of response messages.
Extracts a list of tool call messages from a given list of response messages.
Extracts a list of tool call messages from a given list of response messages.
Extracts a list of tool call messages from a given list of response messages.
Extracts a list of tool call messages from a given list of response messages.
Extracts a list of tool call messages from a given list of response messages.
Retrieves the latest token usage from the prompt within the LLM session.
Retrieves the latest token usage from the prompt within the LLM session.
Retrieves the latest token usage from the prompt within the LLM session.
Retrieves the most recent token usage count synchronously.
Returns the current instance of AIAgentLLMContext.
Moderates a message using the LLM. Corresponds to nodeLLMModerateMessage.
Moderates a message using the LLM. Corresponds to nodeLLMModerateMessage.
Moderates a message using the LLM. Corresponds to nodeLLMModerateMessage.
Executes the provided action if the given response is of type Message.Assistant.
Executes the provided action if the given response is of type Message.Assistant.
Executes the provided action if the given response is of type Message.Assistant.
Invokes the provided action when multiple tool call messages are found within a given list of response messages. Filters the list of responses to include only instances of MessagePart.Tool.Call and executes the action on the filtered list if it is not empty.
Invokes the provided action when multiple tool call messages are found within a given list of response messages. Filters the list of responses to include only instances of MessagePart.Tool.Call and executes the action on the filtered list if it is not empty.
Invokes the provided action when multiple tool call messages are found within a given list of response messages. Filters the list of responses to include only instances of MessagePart.Tool.Call and executes the action on the filtered list if it is not empty.
Removes the agent-specific context data associated with the current context.
Removes the agent-specific context data associated with the current context.
Sends a message to a Large Language Model (LLM) and optionally allows the use of tools during the LLM interaction. The message becomes part of the current prompt, and the LLM's response is processed accordingly, either with or without tool integrations based on the provided parameters. Corresponds to nodeLLMRequestWithUserText.
Sends a message to a Large Language Model (LLM) and optionally allows the use of tools during the LLM interaction. The message becomes part of the current prompt, and the LLM's response is processed accordingly, either with or without tool integrations based on the provided parameters. Corresponds to nodeLLMRequestWithUserText.
Sends a message to a Large Language Model (LLM) and optionally allows the use of tools during the LLM interaction. The message becomes part of the current prompt, and the LLM's response is processed accordingly, either with or without tool integrations based on the provided parameters. Corresponds to nodeLLMRequestWithUserText.
Sends a request to the Large Language Model (LLM) with tools enabled and retrieves its response. To run the request without tool calls, use requestLLMWithoutTools.
Sends a message to a Large Language Model (LLM) and forces it to use a specific tool. The message becomes part of the current prompt, and the LLM is instructed to use only the specified tool.
Sends a message to a Large Language Model (LLM) and forces it to use a specific tool. The message becomes part of the current prompt, and the LLM is instructed to use only the specified tool.
Sends a message to a Large Language Model (LLM) and forces it to use a specific tool. The message becomes part of the current prompt, and the LLM is instructed to use only the specified tool.
Sends a request to the LLM (Large Language Model) forcing the use of a specified tool and returns the response.
Sends a request to the LLM (Large Language Model) system using a specified tool, ensuring the use of exactly one tool in the response generation process.
Sends a string message to the LLM and returns multiple response choices. Corresponds to nodeLLMRequestMultipleChoicesWithUserText.
Sends a string message to the LLM and returns multiple response choices. Corresponds to nodeLLMRequestMultipleChoicesWithUserText.
Sends a string message to the LLM and returns multiple response choices. Corresponds to nodeLLMRequestMultipleChoicesWithUserText.
Sends a string message to the LLM without tool calls. Corresponds to nodeLLMRequestOnlyCallingToolsWithUserText.
Sends a string message to the LLM without tool calls. Corresponds to nodeLLMRequestOnlyCallingToolsWithUserText.
Sends a string message to the LLM without tool calls. Corresponds to nodeLLMRequestOnlyCallingToolsWithUserText.
Executes a request to the LLM, restricting the process to only calling external tools as needed.
Sends a message to a Large Language Model (LLM) and streams the LLM response. The message becomes part of the current prompt, and the LLM's response is streamed as it's generated.
Sends a message to a Large Language Model (LLM) and streams the LLM response. The message becomes part of the current prompt, and the LLM's response is streamed as it's generated.
Sends a message to a Large Language Model (LLM) and streams the LLM response. The message becomes part of the current prompt, and the LLM's response is streamed as it's generated.
Sends a request to the Language Learning Model (LLM) for streaming data.
Sends a string message to the LLM and returns a structured response using a StructuredRequestConfig. Corresponds to nodeLLMRequestStructuredWithUserText.
Sends a structured request to the Large Language Model (LLM) and processes the response.
Sends a structured request to the Large Language Model (LLM) and processes the response.
Sends a string message to the LLM and returns a structured response using a StructuredRequestConfig. Corresponds to nodeLLMRequestStructuredWithUserText.
Sends a string message to the LLM and returns a structured response using a StructuredRequestConfig. Corresponds to nodeLLMRequestStructuredWithUserText.
Sends a structured request to the Large Language Model (LLM) and processes the response.
Sends a string message to the LLM without tool calls. Corresponds to nodeLLMRequestWithoutToolsWithUserText.
Sends a string message to the LLM without tool calls. Corresponds to nodeLLMRequestWithoutToolsWithUserText.
Sends a string message to the LLM without tool calls. Corresponds to nodeLLMRequestWithoutToolsWithUserText.
Sends a request to the Large Language Model (LLM) with tools disabled and retrieves its response. To run the request with tool calls allowed, use requestLLM.
Provides the root context of the current agent. If the root context is not defined, this function defaults to returning the current instance.
Adds a tool result to the prompt and requests an LLM response.
Adds a tool result to the prompt and requests an LLM response.
Adds a tool result to the prompt and requests an LLM response.
Sends the provided tool result for processing.
Adds multiple tool results to the prompt and gets multiple LLM responses.
Adds multiple tool results to the prompt and gets multiple LLM responses.
Adds multiple tool results to the prompt and gets multiple LLM responses.
Sends tool results for processing and returns the corresponding responses.
Sends tool results to the LLM and forces it to use a specific tool. Corresponds to nodeSendToolReceivedResultsForceOneTool.
Sends tool results to the LLM and forces it to use a specific tool. Corresponds to nodeSendToolReceivedResultsForceOneTool.
Sends tool results to the LLM and forces it to use a specific tool. Corresponds to nodeSendToolReceivedResultsForceOneTool.
Sends tool results to the LLM and returns multiple response choices. Corresponds to nodeSendToolReceivedResultsMultipleChoices.
Sends tool results to the LLM and returns multiple response choices. Corresponds to nodeSendToolReceivedResultsMultipleChoices.
Sends tool results to the LLM and returns multiple response choices. Corresponds to nodeSendToolReceivedResultsMultipleChoices.
Sends tool results to the LLM, restricting it to only calling tools. Corresponds to nodeSendToolReceivedResultsOnlyCallingTools.
Sends tool results to the LLM, restricting it to only calling tools. Corresponds to nodeSendToolReceivedResultsOnlyCallingTools.
Sends tool results to the LLM, restricting it to only calling tools. Corresponds to nodeSendToolReceivedResultsOnlyCallingTools.
Sends tool results to the LLM without allowing further tool calls. Corresponds to nodeSendToolReceivedResultsWithoutTools.
Sends tool results to the LLM without allowing further tool calls. Corresponds to nodeSendToolReceivedResultsWithoutTools.
Sends tool results to the LLM without allowing further tool calls. Corresponds to nodeSendToolReceivedResultsWithoutTools.
Provides an instance of AIAgentStateManager responsible for managing the state of an AI Agent. This function allows access to the state management operations for coordinating AI agent behavior.
Provides access to the AIAgentStorage instance.
Stores the given agent context data within the current AI agent context.
Retrieves the name of the strategy.
Executes a subtask within the larger context of an AI agent's functional operation. This method allows defining a specific task to be performed with the given input, tools, and optional configuration.
Executes a subtask within the AI agent's functional context. This method enables the use of tools to achieve a specific task based on the input provided.
Executes a subtask within the larger context of an AI agent's functional operation. This method allows defining a specific task to be performed with the given input, tools, and optional configuration.
Executes a subtask within the AI agent's functional context. This method enables the use of tools to achieve a specific task based on the input provided.
Executes a subtask within the larger context of an AI agent's functional operation. This method allows defining a specific task to be performed with the given input, tools, and optional configuration.
Executes a subtask within the AI agent's functional context. This method enables the use of tools to achieve a specific task based on the input provided.
Executes a subtask with validation and verification of the results. The method defines a subtask for the AI agent using the provided input and additional parameters and ensures that the output is evaluated based on its correctness and feedback.
Executes a subtask with validation and verification of the results. The method defines a subtask for the AI agent using the provided input and additional parameters and ensures that the output is evaluated based on its correctness and feedback.
Executes a subtask with validation and verification of the results. The method defines a subtask for the AI agent using the provided input and additional parameters and ensures that the output is evaluated based on its correctness and feedback.
Executes a block of code with a modified execution context.
Executes a block of code with a modified execution context, creating a parent-child relationship between execution contexts for tracing purposes.