Creates a new Runner instance.
The configuration for the runner.
Readonly[ReadonlyagentReadonlyappOptional ReadonlyartifactOptional ReadonlycredentialOptional ReadonlymemoryReadonlypluginOptional ReadonlyresumabilityReadonlysessionRuns the agent with the given message, and returns an async generator of events.
OptionalabortSignal?: AbortSignalOptionalcustomMetadata?: Record<string, unknown>A new message to append to the session.
OptionalrunConfig?: RunConfigThe run config for the agent.
The session ID of the session.
OptionalstateDelta?: Record<string, unknown>An optional state delta to apply to the session.
The user ID of the session.
Runs the agent with a new, ephemeral session.
OptionalcustomMetadata?: Record<string, unknown>A new message to append to the session.
OptionalrunConfig?: RunConfigThe run config for the agent.
OptionalstateDelta?: Record<string, unknown>An optional state delta to apply to the session.
The user ID of the session.
Orchestrates agent execution for a given application.
The Runner manages the full lifecycle of an agent invocation: it loads the session, invokes plugin callbacks, runs the root agent, and yields the resulting events. Use InMemoryRunner for quick prototyping without external services.
Example: