> ## Documentation Index
> Fetch the complete documentation index at: https://docs.peeve.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Customer Brain

> The Customer Brain is the private memory Peeve keeps for each customer: who they are, recurring issues and how past issues were resolved.

The Customer Brain is a private memory Peeve keeps for **each customer**, layered
on top of the workspace's App Brain. Where the App Brain knows your product, the
Customer Brain knows one person: who they are, the issues they keep hitting,
their preferences, and how their past issues were resolved.

It is built automatically from that customer's own conversations. Nobody writes
it, and there is nothing to configure.

## What it remembers

Each item is one short fact, tagged with a kind:

| Kind | Example |
| - | - |
| `issue` | A problem this customer has raised, especially a recurring one |
| `preference` | Something they have said they want, or want avoided |
| `fact` | A durable account detail worth carrying between conversations |
| `resolution` | How one of their issues was actually resolved |

Items are distilled as conversations resolve, then periodically merged so the
working memory stays small and current — duplicates folded together, obsolete
items dropped.

## Plans

The Customer Brain is on every plan, Starter included. There is nothing to
enable and nothing to buy.

## Where it applies

The Customer Brain is read in the **in-app widget** for identified (signed-in)
customers, on Peeve's inbound channels (email, WhatsApp, Messenger and
Instagram), and on [`POST /v1/answer`](https://docs.peeve.ai/api/v1/ask/ask-the-agent-a-question)
from your backend.

> [!NOTE]
>
> The widget has one extra condition: the id must be **signed**. A page can
> claim any `userId` and the publishable key is public, so a widget turn reads
> memory only when `identify` also carries a `userHash` your backend computed.
> See [Signed identity](https://docs.peeve.ai/widget/identity-and-context.md#signed-identity).
> Unsigned, the widget works exactly as before — it just reads no memory.

## Identity

Memory is read only for an **identified** contact — a user your product told
Peeve about. An anonymous visitor's conversations do produce memory, but nothing
reads it: it is held only so it can follow them if they sign up, and deleted if
they don't. See [Retention](#retention).

In the widget, the signature decides both directions. An unsigned turn neither
reads the memory nor teaches it, because a conversation planted under a claimed
id would otherwise be read back on every channel as fact about the real
customer. On the channels that prove who the sender is — email, WhatsApp,
Messenger, Instagram — no signature is involved.

See [Identity and context](https://docs.peeve.ai/widget/identity-and-context.md) for how to identify a
user from the browser, and [`POST /v1/users`](https://docs.peeve.ai/api/v1/users/create-or-update-a-user)
for the server-side equivalent.

## Privacy

* **Encrypted at rest** under your workspace's own key, the same envelope that
  protects identity fields. See [Data handling](https://docs.peeve.ai/reference/data-handling.md).
* **Isolated to your workspace.** It is reachable only by the service role with
  row-level security on, and it is never surfaced in any Peeve UI or returned by
  any API.
* **Support memory only.** It exists so the agent can answer a returning
  customer well. It is not a marketing or ad-targeting profile.
* **Never used to train outside AI models.**
* **Conversation text is treated as untrusted.** Instructions embedded in a
  customer's message are never followed when memory is extracted — only facts
  are taken.

## Retention

Three lifetimes, depending on whose memory it is and which layer:

| Layer | Kept |
| - | - |
| Raw items | Every distilled item is appended and **retained** — the durable, granular record. There is no expiry today. |
| Working memory | Merged and **bounded**, so the agent reads a small current set rather than a growing log |
| A visitor's memory | Deleted **30 days** after it was written, by a daily job |

For an identified customer, raw items are retained with no cap, and the working
set is kept small by merging rather than by deleting the record behind it.

A visitor is the exception. Their memory is never read; it is kept so it can
follow them if they sign up, and whatever is still sitting on the visitor when
the 30 days are up was never claimed. Signing in moves it onto the customer —
but only when that sign-in is **signed**, so a visitor who merely names a
customer can plant nothing in that customer's memory. Once moved, it keeps the
lifetimes above.

> [!NOTE]
>
> There is **no endpoint** for reading, editing or deleting the Customer Brain.
> It is internal to the agent. If you need a customer's memory removed, that is a
> support request today, not an API call.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.