v1.9.0 — Your chat conversations know who was asking

1.9.0New featureDenis Povarov

Until now every conversation in AI Chat → Conversations was Anonymous. The widget knew the browser tab, not the person. You could see what was asked, but never whether the same customer had asked it four times.

Your site can now tell the widget who is signed in.

Identify a visitor

From a script tag:

JavaScript
// after your own login completes
KookeeChat.identify({ id: user.id, email: user.email, name: user.name });

// on logout
KookeeChat.reset();

Or in React:

tsx
<KookeeChatWidget
  clientOptions={{ projectId }}
  visitor={user ? { id: user.id, email: user.email, name: user.name } : null}
/>

All three fields are optional. identify() works before init(), so the order of the two does not matter.

What changed in the dashboard

  • The conversation list has a Visitor column, showing the name, or the email when there is no name, and Anonymous otherwise.

  • The conversation detail page shows all three fields under the title.

  • Search now matches the visitor's name and email as well as titles and message text, so looking up everything one customer ever asked is a single search.

A different person means a new conversation

A conversation belongs to whoever was identified while it was written. Identifying somebody else, or calling reset(), discards it and starts a fresh session. That is what stops the next person at a shared computer from reading the previous one's chat.

An anonymous visitor who signs in keeps their conversation and becomes its owner, so nobody loses the two questions they asked before logging in.

It is a label, not a login

The identity is asserted by your page and is never verified, so it must not gate anything. When the assistant needs to answer from a specific person's data, use a tool: the handler runs in the visitor's own browser with their own session, and your server authenticates the request as it already does.

It is also never sent to the model. Anything the assistant should actually know still goes in appContext, which keeps personal data out of the model request by default.

The visitor is stored with the conversation and deleted with it after 90 days. If you pass an email, mention it in your privacy policy.

Getting it

The script tag at kookee.dev/chat/latest.js already has it. On npm it needs @kookee/react 1.7.0 with @kookee/sdk 1.7.0.

Full rules, including exactly when a conversation is discarded, are in Identify who is chatting.

Also in this release

A conversation discarded while an answer was still streaming could be re-attached to the old conversation by the in-flight response, so the next question landed in the previous transcript. That affected the New chat button too, and is now fixed.

Learn more