Skip to main content

Conversation history

The Kapa Website Widget keeps a local history of past conversations, so users can reopen an earlier conversation and continue it where they left off.

Overview​

A history button in the widget header opens a list of the user's past conversations. Selecting one restores the full transcript, including answers, sources, file attachments, and feedback votes. Any follow-up question continues the same conversation thread, so the AI keeps the earlier context.

Each conversation is titled with its first question and grouped by recency (Today, Yesterday, Previous 7 days, Older). A search field filters conversations by title and question text. The list is ordered by most recent activity, where only a new answer counts as activity: opening a conversation or voting on an existing answer does not change its position.

The history button and dropdown follow the widget's configured language, like the rest of the UI.

Where history is stored​

History is stored entirely in the user's browser using localStorage. Kapa does not store any additional data server-side for this feature.

  • History is kept per browser and per integration. Users do not see their conversations on another device or in another browser.
  • The widget keeps up to 50 conversations and about 1 MB of data, and removes the oldest conversations first when either limit is reached.
  • When the widget requires consent with data-consent-required, history is only stored and shown once the user has consented.
  • Clearing the browser's site data removes the history.
  • Like all localStorage data, the stored transcripts are readable by JavaScript running on the page and persist until removed.

Disable conversation history​

Conversation history is enabled by default. If you do not want the widget to store conversations in the browser, set the data-conversation-history-enabled configuration parameter to "false":

<script async
src="https://widget.kapa.ai/kapa-widget.bundle.js"
data-website-id="XXX-XXX-XXX"
…
data-conversation-history-enabled="false"
></script>

This also hides the history button in the widget header and deletes any history already stored in the user's browser.

Styling​

The history button can be styled like any other widget component using data-conversation-history-button-* attributes. See Component styles for details.