AIAgentGraphContextBase
The AIAgentGraphContextBase interface extends the AIAgentContext interface to provide a foundational context specifically tailored for AI agents operating within a graph structure.
This interface inherits the core capabilities from AIAgentContext, including environment management, configuration access, session tracking, state management, and custom workflows. By building upon these features, it serves as a base for defining additional constructs and behaviors that facilitate the agent's execution in graph-based workflows or execution pipelines.
Implementations of this interface are expected to leverage the provided capabilities to handle graph-specific logic, such as node traversal, input/output management, and handling complex dependencies between graph nodes.
Inheritors
Properties
Represents the input provided to the agent's execution.
TypeToken representing the type of the agentInput
Represents the configuration for an AI agent.
Represents the environment in which the agent operates.
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 parent context of the AI Agent.
Represents the pipeline associated with the AI agent.
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.
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.
InternalAgentsApi method. Appends a prompt to the current LLM session.
Creates a copy of the current AIAgentGraphContext, allowing for selective overriding of its properties.
Extension function to access the Debugger feature from an agent context.
InternalAgentsApi method. Executes a single tool with the provided arguments and returns the result.
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.
Creates a copy of the current AIAgentGraphContext with deep copies of all mutable properties.
Retrieves the agent-specific context data associated with the current instance.
Retrieves the agent-specific context data associated with the current instance.
InternalAgentsApi method. Performs LLM history compression.
Removes the agent-specific context data associated with the current context.
Removes the agent-specific context data associated with the current context.
Replaces the current context with the provided context. This method is used to update the current context with values from another context, particularly useful in scenarios like parallel node execution where contexts need to be merged.
InternalAgentsApi method. Appends a Message.User with given text to the prompt and requests a streaming response from the LLM.
Provides the root context of the current agent. If the root context is not defined, this function defaults to returning the current instance.
InternalAgentsApi method. Sets up structured output for an AI agent subgraph.
InternalAgentsApi method. Configures llmAsAJudge
Stores the given agent context data within the current AI agent context.
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.