IDagNodeResult
NexusLabs.Needlr.AgentFramework¶
NexusLabs.Needlr.AgentFramework.Diagnostics¶
IDagNodeResult Interface¶
Diagnostics for a single node within a DAG workflow execution, including edge connectivity, timing offsets relative to the workflow start, and the NodeKind discriminator that distinguishes agent nodes from reducer nodes.
Example¶
var dagResult = (IDagRunResult)pipelineResult;
foreach (var (nodeId, node) in dagResult.NodeResults)
{
Console.WriteLine($" {nodeId}: {node.Kind}, " +
$"offset={node.StartOffset.TotalMilliseconds}ms, " +
$"duration={node.Duration.TotalMilliseconds}ms");
}
Remarks¶
Access node results via NodeResults after a DAG workflow run completes. Reducer nodes (Reducer) will have null diagnostics because they do not execute LLM calls.
Properties¶
IDagNodeResult.AgentName Property¶
Gets the agent or reducer name for the node.
Property Value¶
IDagNodeResult.Diagnostics Property¶
Gets the captured diagnostics for the node's execution, or null for reducer nodes or when diagnostics were not enabled.
Property Value¶
IDagNodeResult.Duration Property¶
Gets the wall-clock duration of the node's execution.
Property Value¶
IDagNodeResult.FinalResponse Property¶
Gets the final Microsoft.Extensions.AI.ChatResponse produced by this node, or null if the node is a reducer or produced no text response.
Property Value¶
Microsoft.Extensions.AI.ChatResponse
IDagNodeResult.InboundEdges Property¶
Gets the node IDs that feed into this node.
Property Value¶
System.Collections.Generic.IReadOnlyList<System.String>
IDagNodeResult.Kind Property¶
Gets whether this node is an LLM-backed agent or a deterministic reducer.
Property Value¶
IDagNodeResult.NodeId Property¶
Gets the unique identifier of the node within the graph.
Property Value¶
IDagNodeResult.OutboundEdges Property¶
Gets the node IDs that this node feeds into.
Property Value¶
System.Collections.Generic.IReadOnlyList<System.String>
IDagNodeResult.StartOffset Property¶
Gets the wall-clock offset from the workflow start to the node's start.