Skip to content

Documentation / @agentick/core / TickSnapshot

Interface: TickSnapshot ​

Defined in: core/src/app/types.ts:1282

TickSnapshot captures everything about a single tick.

This is the atomic unit for time-travel debugging, replay, and DevTools.

Example ​

typescript
// Enable recording when creating session
const session = app.session({ recording: 'full' });

// After some ticks...
const recording = session.getRecording();
const snapshot = recording?.snapshots[2]; // Tick 3's snapshot

console.log(snapshot.model.output.content); // What the model said
console.log(snapshot.tools.calls);          // What tools were called
console.log(snapshot.fiber.summary);        // Component tree stats

Properties ​

com ​

com: object

Defined in: core/src/app/types.ts:1314

Compiled output (what the model "sees")

metadata ​

metadata: Record<string, unknown>

Metadata

modelId ​

modelId: string | null

Model ID being used

sections ​

sections: Record<string, { content: string; priority?: number; }>

System sections

timeline ​

timeline: TimelineEntry[]

Conversation timeline

tools ​

tools: SnapshotToolDefinition[]

Available tools


duration ​

duration: number

Defined in: core/src/app/types.ts:1293

Duration of the tick in milliseconds


execution ​

execution: object

Defined in: core/src/app/types.ts:1377

Execution state at end of tick

error? ​

optional error: SerializedError

Error if tick failed

executionId? ​

optional executionId: string

Execution ID from ALS context (for DevTools linking)

phase ​

phase: "complete"

Phase when snapshot was taken

queuedMessages ​

queuedMessages: Message[]

Messages queued during this tick

shouldContinue ​

shouldContinue: boolean

Should the tick loop continue?

stopReason? ​

optional stopReason: string

Reason for stopping (if applicable)


fiber ​

fiber: object

Defined in: core/src/app/types.ts:1299

Fiber tree state (component tree structure and hooks)

summary ​

summary: object

Summary statistics (always present)

summary.componentCount ​

componentCount: number

summary.hookCount ​

hookCount: number

summary.hooksByType ​

hooksByType: Partial<Record<HookType, number>>

tree ​

tree: SerializedFiberNode | null

Serialized fiber tree (null in 'lightweight' mode)


model ​

model: object

Defined in: core/src/app/types.ts:1331

Model input and output for this tick

input ​

input: object

What was sent to the model

input.formatted ​

formatted: string

Formatted prompt (may be truncated for large prompts)

input.tokenCount? ​

optional tokenCount: number

Token count if available

latency ​

latency: number

Time spent waiting for model response (ms)

output ​

output: object

What the model returned

output.content ​

content: ContentBlock[]

Response content blocks

output.stopReason ​

stopReason: string

Why the model stopped

output.tokenCount? ​

optional tokenCount: number

Output token count


sessionId ​

sessionId: string

Defined in: core/src/app/types.ts:1287

Session ID this snapshot belongs to


tick ​

tick: number

Defined in: core/src/app/types.ts:1289

Tick number (1-indexed)


timestamp ​

timestamp: string

Defined in: core/src/app/types.ts:1291

ISO 8601 timestamp when tick completed


tools ​

tools: object

Defined in: core/src/app/types.ts:1356

Tool calls and results from this tick

calls ​

calls: ToolCall[]

Tool calls made by the model

results ​

results: object[]

Results from tool execution

totalDuration ​

totalDuration: number

Total time spent executing tools (ms)

Released under the ISC License.