AIAgentBase

Represents a basic interface for AI agent.

Inheritors

Properties

Link copied to clipboard
abstract val id: String

Represents the unique identifier for the AI agent.

Functions

Link copied to clipboard
inline fun <Input, Output> AIAgentBase<Input, Output>.asTool(agentName: String, agentDescription: String, inputDescriptor: ToolParameterDescriptor, inputSerializer: KSerializer<Input> = serializer(), outputSerializer: KSerializer<Output> = serializer(), json: Json = Json.Default): Tool<AIAgentTool.AgentToolArgs, AIAgentTool.AgentToolResult>

Converts the current AI agent into a tool to allow using it in other agents as a tool.

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

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