Documentation / @agentick/shared / ContextUpdateEvent
Type Alias: ContextUpdateEvent ​
ContextUpdateEvent =
object&StreamEventBase
Defined in: streaming.ts:663
Context update event - provides real-time context utilization info.
Emitted after each tick with context window usage, model capabilities, and cumulative token usage. Enables React UIs to show context utilization bars.
Type Declaration ​
cacheCreationTokens? ​
optionalcacheCreationTokens:number
Tokens written to KV cache this tick (provider-dependent)
cachedInputTokens? ​
optionalcachedInputTokens:number
Input tokens served from KV cache (provider-dependent)
cacheHitRatio? ​
optionalcacheHitRatio:number
Ratio of cached to total input tokens (0-1)
contextWindow? ​
optionalcontextWindow:number
Context window size in tokens
cumulativeUsage? ​
optionalcumulativeUsage:object
Cumulative usage across all ticks in this execution
cumulativeUsage.inputTokens ​
inputTokens:
number
cumulativeUsage.outputTokens ​
outputTokens:
number
cumulativeUsage.ticks ​
ticks:
number
cumulativeUsage.totalTokens ​
totalTokens:
number
inputTokens ​
inputTokens:
number
Input tokens used this tick
isReasoningModel? ​
optionalisReasoningModel:boolean
maxOutputTokens? ​
optionalmaxOutputTokens:number
Max output tokens
modelId ​
modelId:
string
Model ID (e.g., "gpt-4o", "claude-3-5-sonnet-20241022")
modelName? ​
optionalmodelName:string
Human-readable model name
outputTokens ​
outputTokens:
number
Output tokens generated this tick
provider? ​
optionalprovider:string
Provider name
supportsToolUse? ​
optionalsupportsToolUse:boolean
supportsVision? ​
optionalsupportsVision:boolean
Model capabilities
totalTokens ​
totalTokens:
number
Total tokens this tick
type ​
type:
"context_update"
utilization? ​
optionalutilization:number
Context utilization percentage (0-100)