TerminationContext
NexusLabs.Needlr.AgentFramework¶
NexusLabs.Needlr.AgentFramework¶
TerminationContext Class¶
Provides context to an IWorkflowTerminationCondition when evaluating whether a workflow should stop after an agent's response.
Inheritance System.Object 🡒 TerminationContext
Properties¶
TerminationContext.AgentId Property¶
Gets the executor ID of the agent that produced this response.
Property Value¶
TerminationContext.ConversationHistory Property¶
Gets the accumulated conversation history up to and including this turn. Each entry corresponds to one completed agent response.
public System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.AI.ChatMessage> ConversationHistory { get; init; }
Property Value¶
System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.AI.ChatMessage>
TerminationContext.ResponseText Property¶
Gets the complete response text emitted by the agent for this turn.
Property Value¶
TerminationContext.TurnCount Property¶
Gets the number of agent turns completed so far (1-based).
Property Value¶
TerminationContext.Usage Property¶
Gets token usage for this turn, if reported by the model. May be null when the model does not return usage metadata.