LlmBroker
Coordinator above an LlmGateway that handles tool execution and provides a Kotlin-idiomatic chat surface.
The broker is the primary integration point for application code. It:
Forwards single-shot, streaming, and structured-output requests to the gateway.
Dispatches tool calls through a ToolRunner (serial by default) and recursively re-prompts the LLM with the tool results.
Honours CompletionConfig.maxToolIterations as a hard recursion ceiling.
Records observability hooks to a Tracer (no-op by default).
The broker is stateless from the caller's point of view: each call carries its own message list. Use ChatSession (Phase 2) when you want managed conversation state.
Constructors
Functions
Return one native response without dispatching tools or changing context.
Stream one turn as CompletionStreamEvents with terminal completion evidence.