AbstractRunner

abstract class AbstractRunner : Runner

An abstract base class for Runner implementations that provides common orchestration logic.

Inheritors

Constructors

Link copied to clipboard
constructor(appName: String, agent: BaseAgent, sessionService: SessionService, artifactService: ArtifactService?, memoryService: MemoryService?, pluginManager: PluginManager, resumabilityConfig: ResumabilityConfig = ResumabilityConfig())

Creates a runner from explicit fields, not using an App.

constructor(app: App, sessionService: SessionService, artifactService: ArtifactService?, memoryService: MemoryService?, skipClosingPlugins: Boolean = false)

Creates a runner from an App, deriving its App.appName, App.rootAgent, App.plugins, and App.resumabilityConfig.

Properties

Link copied to clipboard
override val agent: BaseAgent

The agent this runner runs. For a node-rooted runner this is a NodeViewAgent over the running node.

Link copied to clipboard
override val appName: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override val node: Node?

The node this runner runs, set when rooted on a node graph. The go-forward field; once agent is removed it holds the running unit for every runner.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()

Closes this runner, releasing the resources it owns.

Link copied to clipboard
open suspend override fun rewindAsync(userId: String, sessionId: String, rewindBeforeInvocationId: String)

Rewinds the session to before the specified invocation.

Link copied to clipboard
open override fun run(userId: String, sessionId: String, newMessage: Content, runConfig: RunConfig? = null): Iterator<Event>

Sync interface for local testing and convenience purpose.

Link copied to clipboard
open override 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.