# runAsync

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

Main entry method to run the agent in this runner.

#### 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.