GraphAIAgent
Represents an implementation of an AI agent that provides functionalities to execute prompts, manage tools, handle agent pipelines, and interact with various configurable strategies and features.
The agent operates within a coroutine scope and leverages a tool registry and feature context to enable dynamic additions or configurations during its lifecycle. Its behavior is driven by a local agent strategy and executed via a prompt executor.
Parameters
Type of agent input.
Type of agent output.
Unique identifier for the agent. Random UUID will be generated if set to null.
Constructors
Initializes the AI agent instance and prepares the feature context and pipeline for use.
Types
The context for adding and configuring features in a Kotlin AI Agent instance.
Properties
Configuration details for the local agent that define its operational parameters.
Lambda for installing additional features within the agent environment.
Executor used to manage and execute prompt strings.
The execution strategy defining how the agent processes input and produces output.
Registry of tools the agent can interact with, defaulting to an empty registry.
Functions
Converts the current AI agent into a tool to allow using it in other agents as a tool.
Retrieves a feature from the StatefulSingleUseAIAgent.pipeline associated with this agent using the specified key.
Retrieves a feature from the StatefulSingleUseAIAgent.pipeline associated with this agent using the specified key or throws an exception if it is not available.
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.