createAgent

suspend override fun createAgent(id: String?, additionalToolRegistry: ToolRegistry, agentConfig: AIAgentConfig, clock: Clock): TAgent(source)

Creates and registers a new managed AI agent with the specified configuration and tool registry.

Return

A new instance of AIAgent initialized with the specified parameters.

Parameters

id

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

additionalToolRegistry

A tool registry with additional tools available to the AI agent.

agentConfig

The configuration for the AI agent, including settings for its behavior and capabilities.

clock

The clock instance used for managing time-related operations.