DiagnosticsTimelineEntry
NexusLabs.Needlr.AgentFramework¶
NexusLabs.Needlr.AgentFramework.Diagnostics¶
DiagnosticsTimelineEntry Class¶
A single entry in an agent run's ordered timeline of chat completions and tool calls.
public sealed record DiagnosticsTimelineEntry : System.IEquatable<NexusLabs.Needlr.AgentFramework.Diagnostics.DiagnosticsTimelineEntry>
Inheritance System.Object 🡒 DiagnosticsTimelineEntry
Implements System.IEquatable<DiagnosticsTimelineEntry>
Remarks¶
Timeline entries are constructed by GetOrderedTimeline(this IAgentRunDiagnostics), which merges and orders the ChatCompletions and ToolCalls collections by wall-clock time. Use the ChatCompletion or ToolCall property corresponding to Kind to access the original diagnostics record.
Constructors¶
DiagnosticsTimelineEntry(DiagnosticsTimelineEntryKind, int, DateTimeOffset, DateTimeOffset, ChatCompletionDiagnostics, ToolCallDiagnostics) Constructor¶
A single entry in an agent run's ordered timeline of chat completions and tool calls.
public DiagnosticsTimelineEntry(NexusLabs.Needlr.AgentFramework.Diagnostics.DiagnosticsTimelineEntryKind Kind, int Sequence, System.DateTimeOffset StartedAt, System.DateTimeOffset CompletedAt, NexusLabs.Needlr.AgentFramework.Diagnostics.ChatCompletionDiagnostics? ChatCompletion, NexusLabs.Needlr.AgentFramework.Diagnostics.ToolCallDiagnostics? ToolCall);
Parameters¶
Kind DiagnosticsTimelineEntryKind
Whether this entry represents a chat completion or a tool call.
Sequence System.Int32
The invocation sequence within the source collection.
StartedAt System.DateTimeOffset
UTC timestamp when the operation began.
CompletedAt System.DateTimeOffset
UTC timestamp when the operation finished.
ChatCompletion ChatCompletionDiagnostics
The source chat-completion record when Kind is ChatCompletion; otherwise null.
ToolCall ToolCallDiagnostics
The source tool-call record when Kind is ToolCall; otherwise null.
Remarks¶
Timeline entries are constructed by GetOrderedTimeline(this IAgentRunDiagnostics), which merges and orders the ChatCompletions and ToolCalls collections by wall-clock time. Use the ChatCompletion or ToolCall property corresponding to Kind to access the original diagnostics record.
Properties¶
DiagnosticsTimelineEntry.ChatCompletion Property¶
The source chat-completion record when Kind is ChatCompletion; otherwise null.
public NexusLabs.Needlr.AgentFramework.Diagnostics.ChatCompletionDiagnostics? ChatCompletion { get; init; }
Property Value¶
DiagnosticsTimelineEntry.CompletedAt Property¶
UTC timestamp when the operation finished.
Property Value¶
DiagnosticsTimelineEntry.Kind Property¶
Whether this entry represents a chat completion or a tool call.
Property Value¶
DiagnosticsTimelineEntry.Sequence Property¶
The invocation sequence within the source collection.
Property Value¶
DiagnosticsTimelineEntry.StartedAt Property¶
UTC timestamp when the operation began.
Property Value¶
DiagnosticsTimelineEntry.ToolCall Property¶
The source tool-call record when Kind is ToolCall; otherwise null.