HarnessContextCompactionStartedEvent
NexusLabs.Foundry.MicrosoftAgentFramework¶
NexusLabs.Foundry.MicrosoftAgentFramework.Progress¶
HarnessContextCompactionStartedEvent Class¶
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.
public sealed record HarnessContextCompactionStartedEvent : NexusLabs.Foundry.MicrosoftAgentFramework.Progress.IProgressEvent, System.IEquatable<NexusLabs.Foundry.MicrosoftAgentFramework.Progress.HarnessContextCompactionStartedEvent>
Inheritance System.Object 🡒 HarnessContextCompactionStartedEvent
Implements IProgressEvent, System.IEquatable<HarnessContextCompactionStartedEvent>
Constructors¶
HarnessContextCompactionStartedEvent(DateTimeOffset, string, string, string, int, long, Guid, HarnessContextMeasurementUnit, int, int) Constructor¶
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.
public HarnessContextCompactionStartedEvent(System.DateTimeOffset Timestamp, string WorkflowId, string? AgentId, string? ParentAgentId, int Depth, long SequenceNumber, System.Guid AssemblyId, NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessContextMeasurementUnit MeasurementUnit, int HardLimit, int TriggerThreshold);
Parameters¶
Timestamp System.DateTimeOffset
When the assembly attempt started.
WorkflowId System.String
Top-level workflow correlation ID.
AgentId System.String
Which agent emitted this event, or null for workflow-level events.
ParentAgentId System.String
Parent agent ID for sub-agent runs, enabling tree reconstruction.
Depth System.Int32
Nesting depth: 0 = workflow, 1 = agent, 2 = sub-agent, etc.
SequenceNumber System.Int64
Globally ordered sequence number for event ordering.
AssemblyId System.Guid
A privacy-safe, opaque per-assembly correlation ID generated exactly once for this attempt, immediately after message adaptation, snapshot integration, and assembler construction have all succeeded — the same instant this Started event is emitted — and threaded identically to whichever terminal event (HarnessContextCompactionCompletedEvent or HarnessContextCompactionTerminatedEvent) and, on success, the subsequent HarnessContextComposedEvent follow for this same attempt. Never reused across two different assembly attempts, even for the same agent within the same workflow, so two concurrently-running provider calls on the same agent remain pairable despite their SequenceNumbers being interleaved.
MeasurementUnit HarnessContextMeasurementUnit
The explicit unit every size on the eventual terminal event is expressed in.
HardLimit System.Int32
The hard limit in force for this assembly, in MeasurementUnit.
TriggerThreshold System.Int32
The trigger threshold (hard limit minus trigger margin) in force for this assembly, in MeasurementUnit.
Properties¶
HarnessContextCompactionStartedEvent.AgentId Property¶
Which agent emitted this event, or null for workflow-level events.
Implements AgentId
Property Value¶
HarnessContextCompactionStartedEvent.AssemblyId Property¶
A privacy-safe, opaque per-assembly correlation ID generated exactly once for this attempt, immediately after message adaptation, snapshot integration, and assembler construction have all succeeded — the same instant this Started event is emitted — and threaded identically to whichever terminal event (HarnessContextCompactionCompletedEvent or HarnessContextCompactionTerminatedEvent) and, on success, the subsequent HarnessContextComposedEvent follow for this same attempt. Never reused across two different assembly attempts, even for the same agent within the same workflow, so two concurrently-running provider calls on the same agent remain pairable despite their SequenceNumbers being interleaved.
Property Value¶
HarnessContextCompactionStartedEvent.Depth Property¶
Nesting depth: 0 = workflow, 1 = agent, 2 = sub-agent, etc.
Implements Depth
Property Value¶
HarnessContextCompactionStartedEvent.HardLimit Property¶
The hard limit in force for this assembly, in MeasurementUnit.
Property Value¶
HarnessContextCompactionStartedEvent.MeasurementUnit Property¶
The explicit unit every size on the eventual terminal event is expressed in.
public NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics.HarnessContextMeasurementUnit MeasurementUnit { get; init; }
Property Value¶
HarnessContextCompactionStartedEvent.ParentAgentId Property¶
Parent agent ID for sub-agent runs, enabling tree reconstruction.
Implements ParentAgentId
Property Value¶
HarnessContextCompactionStartedEvent.SequenceNumber Property¶
Globally ordered sequence number for event ordering.
Implements SequenceNumber
Property Value¶
HarnessContextCompactionStartedEvent.Timestamp Property¶
When the assembly attempt started.
Implements Timestamp
Property Value¶
HarnessContextCompactionStartedEvent.TriggerThreshold Property¶
The trigger threshold (hard limit minus trigger margin) in force for this assembly, in MeasurementUnit.
Property Value¶
HarnessContextCompactionStartedEvent.WorkflowId Property¶
Top-level workflow correlation ID.
Implements WorkflowId