SimpleRecursiveAgent

class SimpleRecursiveAgent(broker: LlmBroker, model: String, availableTools: List<LlmTool> = emptyList(), maxIterations: Int = 5, systemPrompt: String? = null, config: CompletionConfig = CompletionConfig())

Recursive problem solver — like IterativeProblemSolver, but exposes per- iteration state via a kotlinx.coroutines.flow.SharedFlow for observability and applies an overall wall-clock timeout via solve.

Mirrors the Python reference's SimpleRecursiveAgent. The Kotlin port collapses the EventEmitter pubsub pattern into a single SharedFlow.

Constructors

Link copied to clipboard
constructor(broker: LlmBroker, model: String, availableTools: List<LlmTool> = emptyList(), maxIterations: Int = 5, systemPrompt: String? = null, config: CompletionConfig = CompletionConfig())

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Read all events emitted during the most recent solve call.

Link copied to clipboard
suspend fun solve(problem: String, timeoutMs: Long = DEFAULT_TIMEOUT_MS): String