MockAgentBackend

class MockAgentBackend(tools: List<AgentTool> = BuiltinTools, approver: ToolApprover = ToolApprover.AlwaysApprove, chunkDelayMs: Long = 18) : ChatBackend(source)

An offline agent that exercises every part type — reasoning, a real tool call (executed through tools), sources, and a Markdown answer with a table, code and a Mermaid diagram — so the full UI can be demoed without a network. Naming a tool in the prompt (e.g. notes__show_notes_board) calls it; a JSON object after the name is its arguments (notes__book_table {"restaurant": "Sora"}).

Parameters

chunkDelayMs

pause between streamed chunks; 0 in tests.

Constructors

Link copied to clipboard
constructor(tools: List<AgentTool> = BuiltinTools, approver: ToolApprover = ToolApprover.AlwaysApprove, chunkDelayMs: Long = 18)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun stream(history: List<Message>): Flow<ChatEvent>