Interface IAgentOutput
Abstraction for agent output rendering — allows Core agent logic to emit UI messages without depending on Spectre.Console or any specific TUI framework.
public interface IAgentOutput
Properties
IsJsonOutputMode
True when output is configured for strict JSON emission. Agent fallback logic can use this to avoid interpreting model JSON responses as executable tool call envelopes.
bool IsJsonOutputMode { get; }
Property Value
Methods
BeginStreaming()
void BeginStreaming()
BeginThinking()
void BeginThinking()
BeginTurn()
Called when a turn starts (before first LLM call). Show a spinner.
void BeginTurn()
ConfirmToolCall(string, string?)
Render a tool confirmation prompt. Returns true if the user approves. Pauses any active spinner/progress indicator to avoid interleaved output.
bool ConfirmToolCall(string toolName, string? args)
Parameters
Returns
ConfirmWorkflowPrompt(string)
Prompts the user to start a workflow when an ad-hoc tool call is detected. Returns true if the user wants to create a workflow, false to continue ad-hoc.
bool ConfirmWorkflowPrompt(string triggeringTool)
Parameters
triggeringToolstring
Returns
EndStreaming()
void EndStreaming()
EndThinking()
void EndThinking()
EndTurn(TurnMetrics)
Called when a turn completes. Render elapsed time, tokens, data size.
void EndTurn(TurnMetrics metrics)
Parameters
metricsTurnMetrics
RenderError(string)
void RenderError(string message)
Parameters
messagestring
RenderInfo(string)
void RenderInfo(string message)
Parameters
messagestring
RenderToolCall(string, string?, string)
Render a tool invocation with optional arguments summary and result. Pauses any active spinner/progress indicator to avoid interleaved output.
void RenderToolCall(string toolName, string? args, string result)
Parameters
RenderWarning(string)
void RenderWarning(string message)
Parameters
messagestring
WriteStreamingChunk(string)
void WriteStreamingChunk(string text)
Parameters
textstring
WriteThinkingChunk(string)
void WriteThinkingChunk(string text)
Parameters
textstring