Skip to content

NexusLabs.Foundry.MicrosoftAgentFramework.Progress

NexusLabs.Foundry.MicrosoftAgentFramework

NexusLabs.Foundry.MicrosoftAgentFramework.Progress Namespace

Classes
AgentCompletedEvent An agent has completed its turn.
AgentFailedEvent An agent run failed.
AgentHandoffEvent An agent handed off to another agent.
AgentInvokedEvent An agent has been invoked (turn started).
AgentResponseChunkEvent A chunk of streaming response text from an agent.
BudgetExceededEvent A token budget limit has been exceeded.
BudgetUpdatedEvent Token budget usage has been updated.
ChannelProgressReporter Bounded, backpressured IProgressReporter that pushes events to a System.Threading.Channels.Channel<> and drains them to sinks on a background task. Use this when sinks do I/O (database, network) and you want production decoupled from consumption while capacity is available, without letting an unbounded backlog of undelivered events accumulate in memory.
CompositeDisposable Composite System.IDisposable that owns a fixed set of child disposables and releases them in reverse order on NexusLabs.Foundry.MicrosoftAgentFramework.Progress.CompositeDisposable.Dispose.
HarnessApprovalApprovedEvent An ordinary (non-standing) tool-approval response approved the pending request. Emitted once per approved request; a standing ("always approve") response is reported via HarnessApprovalStandingReauthorizedEvent instead, never both.
HarnessApprovalRejectedEvent An ordinary (non-standing) tool-approval response rejected the pending request. Emitted once per rejected request. A rejected request results in zero invocations of the underlying tool.
HarnessApprovalRequestedEvent A tool-approval request surfaced to the caller. Emitted once per distinct request identifier when the composed agent's response contains a ToolApprovalRequestContent item (MAF's approval-required tool-call surface). The MAF content type itself is never exposed; only stable identifiers are carried.
HarnessApprovalStandingReauthorizedEvent A standing ("always approve") tool approval -- newly supplied this run, or implied by continuing a session that could carry one from a prior turn -- was submitted for the required host reauthorization check. Emitted exactly once per reauthorization attempt, whether the host granted or declined it; a declined reauthorization fails the run closed with zero tool invocations.
HarnessArtifactOffloadDecisionEvent One explicit tool-result offload decision made by the shared, caller-agnostic offload transform. Emitted exactly once per Transform call that produces a decision — including an Inline decision, so threshold behavior remains inspectable even when nothing is written to the workspace. Never emitted when the transform throws before reaching a decision (for example a pre-canceled token or a stale execution binding), because no decision was made in that case.
HarnessArtifactRehydrationDecisionEvent One explicit artifact rehydration decision made by resolving a caller-supplied artifact reference. Emitted exactly once per explicit rehydration request/outcome — every resolution status, not only Resolved. Never emitted when resolution throws before reaching a decision (for example a pre-canceled token or a stale execution binding), because no decision was made in that case.
HarnessContextCompactionCompletedEvent One hybrid context compaction/assembly attempt completed successfully — Diagnostics's outcome is WithinLimit, Reduced, or PreservationFallback. Emitted at most once per assembly attempt that reached the started state, as one of exactly two mutually exclusive terminal events alongside HarnessContextCompactionTerminatedEvent — never both for the same attempt. Never emitted for an attempt whose classifier or snapshot-construction phase threw before the HarnessContextCompactionStartedEvent was emitted. Emitted immediately once the decision is known, before the outer execution-binding revalidation that precedes dispatch, so an already-successful compaction decision remains observable even if that later revalidation itself fails.
HarnessContextCompactionStartedEvent One hybrid context compaction/assembly attempt has started. Emitted exactly once per assembly attempt that reaches the assembly phase — after message adaptation, snapshot integration, and assembler construction have all succeeded, immediately before AssembleAsync is called — while an experimental HarnessHybridProfile is configured. Never emitted for a call made while compaction is absent, and never emitted when a classifier or snapshot-construction exception aborts before assembly begins. Carries no size observation yet, only the configured measurement unit and thresholds, because the original size is only known once the assembler captures its own snapshot.
HarnessContextCompactionTerminatedEvent One hybrid context compaction/assembly attempt terminated without reaching a dispatchable context — Diagnostics's outcome is Irreducible or ConcurrentMutationLimit. Emitted at most once per assembly attempt that reached the started state, as one of exactly two mutually exclusive terminal events alongside HarnessContextCompactionCompletedEvent — never both for the same attempt. Never emitted for an attempt whose classifier or snapshot-construction phase threw before the HarnessContextCompactionStartedEvent was emitted, and never emitted for exceptional failures (cancellation, binding invalidation, or reducer exception) that propagate directly without producing a structured Irreducible or ConcurrentMutationLimit result. Never carries raw message text, exception text, or classifier output — only the categorical termination reached.
HarnessContextComposedEvent The final bounded context for one provider call is composed and ready for dispatch. Emitted only on success — immediately after HarnessContextCompactionCompletedEvent for the same attempt, once execution-binding revalidation has also passed and the bounded messages are about to be handed to the real provider client — never emitted for a terminated attempt. Carries the exact same Diagnostics instance as the preceding HarnessContextCompactionCompletedEvent, so its final category attribution and FinalSequenceValid flag are inspectable at the ready-for-dispatch point without a second, independently-built snapshot.
LlmCallCompletedEvent An LLM response has been received.
LlmCallFailedEvent An LLM call failed.
LlmCallStartedEvent An LLM request has been sent.
PhaseCompletedEvent A pipeline phase has completed execution.
PhaseStartedEvent A pipeline phase has started execution.
ReducerNodeInvokedEvent A reducer node in a DAG workflow was invoked. Reducer nodes are deterministic functions (no LLM calls) that aggregate branch outputs during fan-in convergence.
SuperStepCompletedProgressEvent A workflow control-flow step (SuperStep) has completed.
SuperStepStartedProgressEvent A workflow control-flow step (SuperStep) has started. Represents one cycle of the orchestration loop: send work to agents → collect results → decide next.
ToolCallCompletedEvent A tool invocation has completed.
ToolCallFailedEvent A tool invocation failed.
ToolCallStartedEvent A tool invocation has started.
WorkflowCompletedEvent Workflow execution has completed.
WorkflowStartedEvent Workflow execution has started.
Interfaces
IProgressEvent Base interface for all progress events emitted during agent/workflow execution. Every event carries correlation context enabling hierarchical trace reconstruction.
IProgressReporter Emits progress events to registered sinks. Carries hierarchical context (workflow ID, agent ID, depth) so events are automatically correlated.
IProgressReporterAccessor Provides ambient access to the IProgressReporter for the current async flow. Follows the IHttpContextAccessor pattern — backed by System.Threading.AsyncLocal<> so concurrent orchestrations see their own reporters.
IProgressReporterErrorHandler Receives callbacks when an IProgressSink throws while handling an event. Without a handler, sink exceptions would be silently swallowed.
IProgressReporterFactory Creates IProgressReporter instances scoped to a specific orchestration run.
IProgressSequence Provides globally-ordered sequence numbers for progress events across all concurrent orchestrations. Registered as a singleton in DI so all IProgressReporter instances share a single monotonic counter.
IProgressSink Receives progress events as they occur during agent/workflow execution. Implement this interface to build SSE streams, console displays, trace diagrams, etc.