Table of Contents

Interface IAgentOutput

Namespace
JD.AI.Core.Agents
Assembly
JD.AI.Core.dll

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

bool

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

toolName string
args string

Returns

bool

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

triggeringTool string

Returns

bool

EndStreaming()

void EndStreaming()

EndThinking()

void EndThinking()

EndTurn(TurnMetrics)

Called when a turn completes. Render elapsed time, tokens, data size.

void EndTurn(TurnMetrics metrics)

Parameters

metrics TurnMetrics

RenderError(string)

void RenderError(string message)

Parameters

message string

RenderInfo(string)

void RenderInfo(string message)

Parameters

message string

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

toolName string
args string
result string

RenderWarning(string)

void RenderWarning(string message)

Parameters

message string

WriteStreamingChunk(string)

void WriteStreamingChunk(string text)

Parameters

text string

WriteThinkingChunk(string)

void WriteThinkingChunk(string text)

Parameters

text string