Skip to content

Documentation / @agentick/core / SessionRecording

Interface: SessionRecording ​

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

SessionRecording is the complete history of a session.

Contains all tick snapshots and metadata for replay/forking.

Example ​

typescript
const session = app.session({ recording: 'full' });
await session.render({ query: "Hello!" });
await session.render({ query: "Tell me more" });

const recording = session.getRecording();
console.log(recording.summary.tickCount);        // 2
console.log(recording.summary.totalUsage);       // Token usage
console.log(recording.snapshots[0].model.output); // First response

Properties ​

config ​

config: object

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

How the session was created

componentName ​

componentName: string

Component name

initialProps ​

initialProps: Record<string, unknown>

Initial props (first tick)

maxTicks ​

maxTicks: number

Max ticks setting

mode ​

mode: RecordingMode

Recording mode


endedAt? ​

optional endedAt: string

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

When recording ended (if session closed)


inputs ​

inputs: RecordedInput[]

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

All inputs during the session


sessionId ​

sessionId: string

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

Session ID


snapshots ​

snapshots: TickSnapshot[]

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

Tick-by-tick history


startedAt ​

startedAt: string

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

When recording started


summary ​

summary: object

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

Summary statistics

finalStatus ​

finalStatus: "running" | "completed" | "error" | "aborted" | "max_ticks"

How the session ended

finalStopReason? ​

optional finalStopReason: string

Final stop reason

tickCount ​

tickCount: number

Number of ticks completed

totalDuration ​

totalDuration: number

Total session duration (ms)

totalUsage ​

totalUsage: UsageStats

Total token usage

Released under the ISC License.