Skip to content

Documentation / @agentick/shared / ContextInfo

Interface: ContextInfo ​

Defined in: context.ts:5

Context utilization information. Updated after each tick with current token usage and model info.

Properties ​

cacheCreationTokens? ​

optional cacheCreationTokens: number

Defined in: context.ts:25

Tokens written to KV cache this tick (provider-dependent)


cachedInputTokens? ​

optional cachedInputTokens: number

Defined in: context.ts:23

Input tokens served from KV cache (provider-dependent)


cacheHitRatio? ​

optional cacheHitRatio: number

Defined in: context.ts:27

Ratio of cached to total input tokens (0-1). Undefined when no cache data.


contextWindow? ​

optional contextWindow: number

Defined in: context.ts:13

Context window size in tokens


cumulativeUsage? ​

optional cumulativeUsage: object

Defined in: context.ts:39

Cumulative usage across all ticks in this execution

inputTokens ​

inputTokens: number

outputTokens ​

outputTokens: number

ticks ​

ticks: number

totalTokens ​

totalTokens: number


estimatedContextTokens? ​

optional estimatedContextTokens: number

Defined in: context.ts:35

Estimated total context tokens (from token estimation, pre-model-call)


inputTokens ​

inputTokens: number

Defined in: context.ts:15

Input tokens used this tick


isReasoningModel? ​

optional isReasoningModel: boolean

Defined in: context.ts:33


maxOutputTokens? ​

optional maxOutputTokens: number

Defined in: context.ts:29

Max output tokens for this model


modelId ​

modelId: string

Defined in: context.ts:7

Model ID (e.g., "gpt-4o", "claude-3-5-sonnet-20241022")


modelName? ​

optional modelName: string

Defined in: context.ts:9

Human-readable model name


outputTokens ​

outputTokens: number

Defined in: context.ts:17

Output tokens generated this tick


provider? ​

optional provider: string

Defined in: context.ts:11

Provider name (e.g., "openai", "anthropic")


supportsToolUse? ​

optional supportsToolUse: boolean

Defined in: context.ts:32


supportsVision? ​

optional supportsVision: boolean

Defined in: context.ts:31

Model capabilities


tick ​

tick: number

Defined in: context.ts:37

Current tick number


totalTokens ​

totalTokens: number

Defined in: context.ts:19

Total tokens this tick


utilization? ​

optional utilization: number

Defined in: context.ts:21

Context utilization percentage (0-100)

Released under the ISC License.