AIAgentBase
Abstract base class representing a single-use AI agent with state.
This AI agent is designed to execute a specific long-running strategy only once, and provides API to monitor and manage it's state.
It maintains internal states including its running status, whether it was started, its result (if available), and the root context associated with its execution. The class enforces safe state transitions and provides thread-safe operations via a mutex.
Parameters
the type of the input accepted by the agent.
the type of the output produced by the agent.
the type of the context used during the agent's execution, extending AIAgentContext.
the unique identifier for the agent. Random UUID will be generated if set to null.
Inheritors
Properties
Functions
Converts the current AI agent into a tool to allow using it in other agents as a tool.
Creates a new AIAgentRunSession for executing the agent with the given input.
Prepares and initializes the agent context required to handle the given input and run ID.