Record Class HarnessEvent.WindowUsage
java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.common.ai.HarnessEvent.WindowUsage
- Record Components:
used- size in tokens of the conversation that was sent on the most recent request (system prompt + every retained message). Already cumulative; do not sum across events.budget- the model's context window — the denominator the fullness meter dividesusedby.
- All Implemented Interfaces:
HarnessEvent
- Enclosing interface:
HarnessEvent
public static record HarnessEvent.WindowUsage(int used, int budget)
extends Record
implements HarnessEvent
Emitted at most once after each
HarnessEvent.TurnFinished, reporting how full the orchestrator's
conversation is as of the request that produced the final reply. This is a snapshot of the
whole conversation's size at that moment — not a per-turn delta — and grows monotonically as
the conversation accumulates messages. Compare used against budget to decide
whether the conversation is near the input cap. Suppressed when the provider's chat response
does not report an input token count, since the snapshot value is sourced from that report.-
Nested Class Summary
Nested classes/interfaces inherited from interface HarnessEvent
HarnessEvent.ModelMessage, HarnessEvent.ModelThinking, HarnessEvent.ReplyRejected, HarnessEvent.ResponseTruncated, HarnessEvent.SubagentFinished, HarnessEvent.SubagentStarted, HarnessEvent.TokenSpend, HarnessEvent.ToolCallCompleted, HarnessEvent.ToolCallFailed, HarnessEvent.ToolCallRequested, HarnessEvent.TurnFinished, HarnessEvent.TurnStarted, HarnessEvent.WindowUsage -
Constructor Summary
ConstructorsConstructorDescriptionWindowUsage(int used, int budget) Creates an instance of aWindowUsagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbudget()Returns the value of thebudgetrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intused()Returns the value of theusedrecord component.
-
Constructor Details
-
WindowUsage
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
used
-
budget
-