createAgentAndRun

expect abstract 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.

fun createAgentAndRun(agentInput: Input, id: String?, additionalToolRegistry: ERROR CLASS: Symbol not found for ToolRegistry = ToolRegistry.EMPTY, agentConfig: AIAgentConfig = this.agentConfig, executorService: ExecutorService? = null, clock: ERROR CLASS: Symbol not found for Clock): Output(source)

Creates an AI agent using the specified parameters and immediately runs it with the provided input.

Return

The output produced by running the agent with the provided input.

Parameters

agentInput

The input data to be processed by the agent.

id

An optional identifier for the agent. If null, a default identifier may be used.

additionalToolRegistry

A registry of additional tools available to the agent. Defaults to an empty registry.

agentConfig

Configuration settings for the agent. Defaults to the current agent configuration of the service.

executorService

An optional executor service to be used for running the agent. If null, a default executor may be used.

clock

The clock instance to be used for time-based operations within the agent.


actual abstract suspend fun createAgentAndRun(agentInput: Input, id: String?, additionalToolRegistry: ERROR CLASS: Symbol not found for ToolRegistry, agentConfig: AIAgentConfig, clock: ERROR CLASS: Symbol not found for Clock): Output(source)
actual abstract suspend fun createAgentAndRun(agentInput: Input, id: String?, additionalToolRegistry: ToolRegistry, agentConfig: AIAgentConfig, clock: Clock): 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.