Skip to main content
Distinct from the existing per-thread threadHistory config (which exists to backfill thread context for adapters that lack server-side history APIs). The Transcripts API is keyed by a resolved cross-platform user key and is intended for transcript-style use cases (LLM context building, audit).

Methods

append()

Persist a Message (or AppendInput) under the user key.
  • For Message: userKey is read from the Message instance (set by the SDK during inbound dispatch via the configured IdentityResolver). No-op if the Message has no userKey (resolver returned null).
  • For AppendInput: options.userKey is required.

Parameters

Postable<TState, TRawMessage>
required
Type: Postable
Message<unknown> | AppendInput
required

Returns

TranscriptEntry

count()

Total stored count for a user key.

Parameters

required

Returns

Promise<number>

delete()

GDPR / DSR delete — wipes every stored message under the user key.

Parameters

required

Returns

Promise<{ deleted: number }>

list()

Returns the most recent entries in chronological order (oldest first), capped at query.limit (default 50). Pagination is intentionally not supported — the store keeps at most transcripts.maxPerUser entries per user. To widen the window, raise maxPerUser; to fetch a different slice, narrow with threadId / platforms / roles.

Parameters

required

Returns

TranscriptEntry