createAgentAndRun
open suspend fun createAgentAndRun(agentInput: Input, id: String? = null, additionalToolRegistry: ToolRegistry = this.toolRegistry, agentConfig: AIAgentConfig = this.agentConfig, clock: Clock = Clock.System): Output(source)
Creates an AI agent with the specified configuration and runs it using the provided input.
Return
The output generated by the agent after processing the input.
Parameters
agentInput
The input data to be processed by the agent.
id
An optional unique identifier for the agent. If null, a default identifier will be generated.
additionalToolRegistry
The tool registry to be used by the agent. Defaults to the service's tool registry.
agentConfig
The configuration parameters for the AI agent. Defaults to the service's agent configuration.
clock
The clock instance used for managing time-related operations. Defaults to the system clock.