runAsync

abstract fun runAsync(userId: String, sessionId: String, invocationId: String? = null, newMessage: Content? = null, stateDelta: Map<String, Any>? = null, runConfig: RunConfig? = null): Flow<Event>

Main entry method to run the agent in this runner asynchronously.

Return

The events generated by the agent.

Parameters

userId

The user ID of the session.

sessionId

The session ID of the session.

invocationId

The invocation ID of the session, set this to resume an interrupted invocation.

newMessage

A new message to append to the session.

stateDelta

Optional state changes to apply to the session.

runConfig

The run config for the agent.