AIAgentBase

interface AIAgentBase(source)

Represents a basic interface for AI agent.

Inheritors

Functions

Link copied to clipboard
fun AIAgentBase.asTool(agentDescription: String, name: String? = null, requestDescription: String = "Input for the task"): Tool<AIAgentTool.AgentToolArgs, AIAgentTool.AgentToolResult>

Converts the current AI agent into a tool that can be utilized with the specified parameters.

Link copied to clipboard
abstract suspend fun run(agentInput: String)

Initiates the execution of the AI agent based on the provided input prompt.

Link copied to clipboard
abstract suspend fun runAndGetResult(agentInput: String): String?

Executes the AI agent with the given prompt and retrieves the resulting output.