Skip to content

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

ChatCompletionDiagnostics

DiagnosticsTimelineEntry.CompletedAt Property

UTC timestamp when the operation finished.

public System.DateTimeOffset CompletedAt { get; init; }

Property Value

System.DateTimeOffset

DiagnosticsTimelineEntry.Kind Property

Whether this entry represents a chat completion or a tool call.

public NexusLabs.Needlr.AgentFramework.Diagnostics.DiagnosticsTimelineEntryKind Kind { get; init; }

Property Value

DiagnosticsTimelineEntryKind

DiagnosticsTimelineEntry.Sequence Property

The invocation sequence within the source collection.

public int Sequence { get; init; }

Property Value

System.Int32

DiagnosticsTimelineEntry.StartedAt Property

UTC timestamp when the operation began.

public System.DateTimeOffset StartedAt { get; init; }

Property Value

System.DateTimeOffset

DiagnosticsTimelineEntry.ToolCall Property

The source tool-call record when Kind is ToolCall; otherwise null.

public NexusLabs.Needlr.AgentFramework.Diagnostics.ToolCallDiagnostics? ToolCall { get; init; }

Property Value

ToolCallDiagnostics