createAgentAndRun
open suspend fun createAgentAndRun(agentInput: Input, id: String? = null, clock: Clock = Clock.System): Output(source)
Creates a new AI agent with the specified optional parameters (id, clock), executes it with the given input, and retrieves the resulting output.
Return
The output produced by the agent after processing the input.
Parameters
agentInput
The input to be processed by the AI agent.
id
An optional unique identifier for the agent. If null, a default identifier will be generated.
clock
The clock instance used to manage time-related operations. Defaults to the system clock.