createAgent

expect abstract suspend fun createAgent(id: String? = null, additionalToolRegistry: ToolRegistry = ToolRegistry.EMPTY, agentConfig: AIAgentConfig = this.agentConfig, clock: Clock = Clock.System): TAgent(source)

Creates a new AI agent with the specified configuration, tool registry, and optional parameters.

Return

The newly created AI agent.

Parameters

id

An optional unique identifier for the agent. If null, a default identifier will be generated.

additionalToolRegistry

The registry of tools to be used by the agent. Defaults to an empty registry.

agentConfig

The configuration settings for the AI agent. Defaults to the service's agent configuration.

clock

The clock instance to manage time-related operations, defaulting to the system clock.

fun createAgent(id: String? = null, 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 = Clock.System): TAgent(source)

Creates a new agent with the specified configuration and settings.

Return

The created agent instance.

Parameters

id

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

additionalToolRegistry

The additional tool registry to be associated with the agent. Defaults to an empty registry.

agentConfig

The configuration to use for the agent. Defaults to the service's agent configuration.

executorService

The executor service to use for asynchronous operations. If null, a default executor may be used.

clock

The clock instance to be used for time-based functionalities. Defaults to the system clock.


actual abstract suspend fun createAgent(id: String?, additionalToolRegistry: ERROR CLASS: Symbol not found for ToolRegistry, agentConfig: AIAgentConfig, clock: ERROR CLASS: Symbol not found for Clock): TAgent(source)
actual abstract suspend fun createAgent(id: String?, additionalToolRegistry: ToolRegistry, agentConfig: AIAgentConfig, clock: Clock): TAgent(source)

Creates a new AI agent with the specified configuration, tool registry, and optional parameters.

Return

The newly created AI agent.

Parameters

id

An optional unique identifier for the agent. If null, a default identifier will be generated.

additionalToolRegistry

The registry of tools to be used by the agent. Defaults to an empty registry.

agentConfig

The configuration settings for the AI agent. Defaults to the service's agent configuration.

clock

The clock instance to manage time-related operations, defaulting to the system clock.