StatefulSingleUseAIAgent
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.
Inheritors
Constructors
Properties
Functions
Converts the current AI agent into a tool to allow using it in other agents as a tool.
Retrieves a specific agent feature of type Feature from the AI agent's storage. If the requested feature is not found, throws an IllegalStateException
.
Retrieves the current state of the AI agent during its lifecycle.
Checks whether the AI agent has reached a finished state.
Prepares and initializes the agent context required to handle the given input and run ID.