AIConversationState

constructor(transport: AIConversationTransport<M>, scope: CoroutineScope, approver: AIToolApprover? = null, replyTimeout: Duration? = DefaultReplyTimeout)

Parameters

transport

How the state reaches the agent and learns what the conversation holds. The state connects to it straight away.

scope

Where requests, stops and the reply timeout run.

approver

Who answers tool calls' questions and sign-ins on this device, which the conversation asks them.

replyTimeout

How long the state waits, once the agent has a request, for the agent to start its reply or say what it is doing, before it shows an AIAgentError. While the agent says it is working, such as thinking, it waits as long as that takes. Null or Duration.INFINITE waits as long as it takes.