ReplRunner

open class ReplRunner(agent: BaseAgent) : InMemoryRunner

A runner for Kotlin agents that provides a simple REPL for debugging.

Constructors

Link copied to clipboard
constructor(agent: BaseAgent)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class PendingInputRequest(val callId: String, val toolName: String, val options: List<String>?)

A paused long-running call awaiting a user-provided response (not a confirmation).

Properties

Link copied to clipboard
override val agent: BaseAgent
Link copied to clipboard
override val appName: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

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

Applies the provided stateDelta to the given event.

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): ERROR CLASS: Symbol not found for Flow<com/google/adk/kt/events/Event>

Main entry method to run the agent in this runner.

Link copied to clipboard
fun start()