Runner

interface Runner : AutoCloseable

The Runner interface defines the contract for running agents.

Inheritors

Properties

Link copied to clipboard
abstract 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
abstract val appName: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open 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
abstract override fun close()

Releases resources held by this runner, such as its plugins and the toolsets its agents own.

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

Rewinds the session to before the specified invocation.

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