Skip to content

AIDK API Reference / aidk/component / TickState

Interface: TickState ​

Defined in: packages/core/src/component/component.ts:92

Properties ​

PropertyTypeDescriptionDefined in
channels?ChannelServiceChannel service for bidirectional communication (optional). Components can publish/subscribe to channels for UI integration.packages/core/src/component/component.ts:152
current?COMOutputThe COMOutput from the last tick (what was produced by model execution and tool execution). Contains new timeline entries, tool calls, and tool results. On tick 1, before model execution, this contains userInput (timeline, sections) to allow components to render purely from previous + current.packages/core/src/component/component.ts:111
error?EngineErrorError information if an error occurred during execution. Components can use this to handle errors and potentially recover.packages/core/src/component/component.ts:129
previous?COMInputThe COMInput from the previous tick (what was sent to model.fromEngineState). This is the compiled state that was passed to the model.packages/core/src/component/component.ts:102
queuedMessagesExecutionMessage[]Messages queued since the last tick. Messages are delivered immediately to onMessage hooks when they arrive, then queued here for availability during render. This allows components to access all messages received since the last tick in their render logic. The queue is cleared after each tick completes.packages/core/src/component/component.ts:146
stop(reason: string) => voidSignal the engine to stop execution after this tick.packages/core/src/component/component.ts:135
stopReason?StopReasonInfoStop reason information from the last model execution. Components can use this to handle graceful recovery, retries, etc.packages/core/src/component/component.ts:117
ticknumberCurrent tick number (1-indexed).packages/core/src/component/component.ts:96
usage?TokenUsageToken usage from the last model execution. Contains inputTokens, outputTokens, totalTokens, and optional reasoning/cache tokens.packages/core/src/component/component.ts:123

Released under the MIT License.