Skip to content
providerkit
GitHub

SessionTurn

Defined in: agents/src/types.ts:188

What a run asks its session to append once it settles.

after: string | null;

Defined in: agents/src/types.ts:194

The revision the history was loaded at, or null when the session was empty.


messages: AgentMessage[];

Defined in: agents/src/types.ts:196

The new user turn and the run’s settled rounds, never the system prompt.


runId: string;

Defined in: agents/src/types.ts:192

The logical run id, which is the idempotency key. Repeating the same turn (same runId, after and messages) must succeed without writing; the same runId with anything else must throw SessionConflictError.