# InMemoryRunner

open class InMemoryRunner(val agent: BaseAgent, val appName: String = "InMemoryRunner", val sessionService: SessionService = InMemorySessionService(), val artifactService: ArtifactService? = InMemoryArtifactService(), val memoryService: MemoryService? = InMemoryMemoryService(), val pluginManager: PluginManager = PluginManager(), val resumabilityConfig: ResumabilityConfig = ResumabilityConfig()) : AbstractRunner

An in-memory implementation of a Runner that manages the lifecycle of a BaseAgent execution.

It provides default in-memory implementations for session, artifact, and memory services.

#### Inheritors

ReplRunner

## Constructors

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

## Properties

agent
Link copied to clipboard
open override val agent: BaseAgent
appName
Link copied to clipboard
open override val appName: String
artifactService
Link copied to clipboard
open override val artifactService: ArtifactService?
memoryService
Link copied to clipboard
open override val memoryService: MemoryService?
pluginManager
Link copied to clipboard
open override val pluginManager: PluginManager
resumabilityConfig
Link copied to clipboard
open override val resumabilityConfig: ResumabilityConfig
sessionService
Link copied to clipboard
open override val sessionService: SessionService

## Functions

applyStateDelta
Link copied to clipboard
fun applyStateDelta(event: Event, stateDelta: Map<String, Any>?)

Applies the provided stateDelta to the given event.

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

Sync interface for local testing and convenience purpose.

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