Package-level declarations

Types

Link copied to clipboard
interface Agent

An agent in the event-driven agent system.

Link copied to clipboard
abstract class AsyncAggregatorAgent(eventTypesNeeded: List<KClass<out Event>>) : Agent

Buffers events by Event.correlationId until every event-type in eventTypesNeeded has been observed, then hands the collected list to processEvents.

Link copied to clipboard
class AsyncDispatcher(router: Router, tracer: Tracer = NullTracer, batchSize: Int = 5, pollDelayMs: Long = 10)

Coroutine-driven event dispatcher.

Link copied to clipboard
open class BaseAgent : Agent

Convenience open base class for agents that do not need to suspend.

Link copied to clipboard
open class BaseAsyncLlmAgent(val broker: LlmBroker, val model: String, var behaviour: String = "You are a helpful assistant.", tools: List<LlmTool> = emptyList(), val config: CompletionConfig = CompletionConfig()) : Agent

LLM-backed agent. Subclasses override receiveEvent to map incoming events to prompts and feed the LLM response back into the event stream.

Link copied to clipboard
open class BaseAsyncLlmAgentWithMemory(broker: LlmBroker, model: String, val memory: SharedWorkingMemory, behaviour: String, val instructions: String, config: CompletionConfig = CompletionConfig()) : BaseAsyncLlmAgent

LLM-backed agent that remembers facts in a SharedWorkingMemory.

Link copied to clipboard
open class Event(val source: KClass<*>? = null, var correlationId: String? = null)

Domain event exchanged between agents through an AsyncDispatcher.

Link copied to clipboard
data class GoalState(val goal: String, val iteration: Int = 0, val maxIterations: Int = 5, val solution: String? = null, val isComplete: Boolean = false)

Goal state captured for each turn of a SimpleRecursiveAgent.

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

Loop-based problem solver backed by a ChatSession.

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

Single-class reasoning-and-acting (ReAct) agent.

Link copied to clipboard
data class ReActStep(val iteration: Int, val response: String, val toolCalls: List<String>, val final: Boolean)

One iteration of a ReActAgent solve loop.

Link copied to clipboard
class Router(routes: Map<KClass<out Event>, List<Agent>> = emptyMap())

Maps event types to the agents that should receive them.

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

Link copied to clipboard
sealed interface SolverEvent

A snapshot of a solver iteration, surfaced to observers.

Link copied to clipboard
open class TerminateEvent(source: KClass<*>? = null) : Event

Sentinel event that terminates the surrounding AsyncDispatcher loop when dispatched. Agents emit this to signal "all work is done — shut the dispatcher".

Link copied to clipboard
class ToolWrapper(agent: BaseAsyncLlmAgent, toolName: String, toolDescription: String) : LlmTool

Adapts a BaseAsyncLlmAgent so it can be passed as a tool to another LLM.