AIAgent
Types
Properties
Functions
Link copied to clipboard
inline fun <Input, Output> AIAgent<Input, Output>.asTool(agentName: String, agentDescription: String, inputDescription: String? = null, inputSerializer: KSerializer<Input> = serializer(), outputSerializer: KSerializer<Output> = serializer(), json: Json = Json.Default): Tool<AIAgentTool.AgentToolInput<Input>, AIAgentTool.AgentToolResult<Output>>
Converts the current AI agent into a tool to allow using it in other agents as a tool.
Link copied to clipboard
expect abstract fun createSession(sessionId: String? = null): AIAgentRunSession<Input, Output, out AIAgentContext>
Creates a new session for executing the agent with the given input.
actual abstract fun createSession(sessionId: String?): AIAgentRunSession<Input, Output, out AIAgentContext>
Creates a new session for executing the agent with the given input.
actual abstract fun createSession(sessionId: String?): AIAgentRunSession<Input, Output, out AIAgentContext>
Creates a new session for executing the agent with the given input.
Link copied to clipboard
Executes the AI agent with the given input and retrieves the resulting output.
Executes the AI agent with the given input and retrieves the resulting output.
Link copied to clipboard
Executes the AI agent task based on the provided input.