> For AI agents: the complete documentation index is available at https://docs.heys.ai/workstation/en/llms.txt, the full documentation bundle is available at https://docs.heys.ai/workstation/en/llms-full.txt.

# Memory and Personality

HeyS has several ways of "remembering things", and they differ in what they remember and how far they reach. Tell them apart first, then decide where to make a change.

| Mechanism           | What it remembers                                                                | Scope                                           | Where to manage it                 |
| ------------------- | -------------------------------------------------------------------------------- | ----------------------------------------------- | ---------------------------------- |
| **Personality**     | What you want the AI to be called and how it should talk                         | The current space                               | **Settings → Personality**         |
| **Memory**          | About you: background, preferences, things in progress, people you mention often | The current space, across projects and sessions | **Settings → Memory**              |
| **Project memory**  | Conventions that hold long term in a project                                     | One project                                     | The project page                   |
| **Session history** | Earlier turns of questions and answers in the same session                       | One session                                     | Automatic, no configuration needed |

To decide where a given remark belongs:

| What you say                                                               | Where it goes                                         |
| -------------------------------------------------------------------------- | ----------------------------------------------------- |
| "Call me Lao Wang", "Don't be so formal"                                   | Personality                                           |
| "I'm the sales lead for East China", "I usually only read the conclusions" | Memory                                                |
| "In this project, amounts are always in units of 10,000 yuan"              | Project memory                                        |
| "Split that table you just made by region"                                 | Session history (just keep going in the same session) |

:::note Note
The Sprite ([Sprite](https://docs.heys.ai/workstation/en/sprite.md)) has its own memory and its own "picture of you", managed in **Settings → Sprite**, unrelated to the memory described in this page.
:::

## Memory \{#memory}

Memory lets the AI remember information about you and bring it along automatically at the start of every later task; it can also let the AI look through your past conversations when needed. The switches and the content are both in **Settings → Memory** (the **Agent** group of the settings navigation), and belong only to the current space: switching spaces means switching to a different memory. Regular accounts connected to a remote server can also manage their own memory.

<figure>

![Settings → Memory: four switches at the top (Search and reference chats, Generate memory from chats, Tidy up after each task, Include sensitive topics); below, "What I remember" reads "6 items, 329 characters", grouped by About you, Preferences and In progress, each item showing its update time and which session it came from, with "Add memory" at the top right](/screenshots/en/L-设置-记忆-1-9533d5.webp)

<figcaption>Settings → Memory: four switches at the top (Search and reference chats, Generate memory from chats, Tidy up after each task, Include sensitive topics); below, "What I remember" reads "6 items, 329 characters", grouped by About you, Preferences and In progress, each item showing its update time and which session it came from, with "Add memory" at the top right</figcaption>
</figure>

### Switches

| Switch                         | What it does                                                                                                                                                                                                                            |
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Search and reference chats** | Lets the AI search and read your past conversations when needed; the answer marks which sessions it referred to                                                                                                                         |
| **Generate memory from chats** | Lets the AI remember information about you (background, preferences, things in progress) and bring it along automatically in every later task. **Turning it off pauses it**: existing memories are kept, but nothing is read or written |
| └ **Tidy up after each task**  | After each task ends, automatically extracts what is worth remembering from that conversation. When off, memories are written only when the AI records one on its own initiative                                                        |
| └ **Include sensitive topics** | Allows remembering sensitive information such as health and family; off by default. Every time a sensitive memory is written, the conversation shows a prominent notice                                                                 |

The two main switches are independent: with **Generate memory from chats** off, the AI can still search past sessions.

In long tasks, what the agent has looked at (files it read, web pages it opened, command output) is also saved to this session's memory, so it can still look it up after the conversation grows too long and earlier parts are condensed into a summary. When a tool returns very long content (for example, after reading a very large file), it is saved in segments, so the later parts can be found too.

:::warning Warning
When you turn off **Include sensitive topics**, **sensitive memories already saved are deleted**. Before it turns off, a confirmation dialog states how many there are; it takes effect only when you click **Turn off and delete**.
:::

### Memory content

Below the switches is **What I remember**, with "N items, N characters" under the heading. Memories are grouped by type:

| Group           | What it holds                                                                 |
| --------------- | ----------------------------------------------------------------------------- |
| **About you**   | Role, professional background, organization, working environment              |
| **Preferences** | Ways of communicating and working, technical preferences, corrected practices |
| **In progress** | Things in progress, long-term goals (time-bound)                              |
| **People**      | People, teams and places that come up again and again                         |
| **Resources**   | Where external resources are                                                  |

Each item shows a title, a one-line description, its update time and its source (for example, from "渠道复盘议程", a channel review agenda; click it to open that session); sensitive items carry a **Sensitive** mark. When there are many memories, the AI first sees only an index in each task, and reads the full text of an item only when it needs it.

### Adding, editing, viewing history, deleting

Click **Add memory** to write one yourself:

- **Title**: for example "Give the conclusion first";
- **Type**: one of the five types in the table above;
- **One-line description (optional)**: when there are too many memories, this sentence is what the AI sees first;
- **Content**: what you want the AI to remember.

The **⋯** at the end of each memory row contains:

| Operation              | Description                                                                                                                                                                                                                                                                                                                |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Edit**               | Change the title, type, description and content                                                                                                                                                                                                                                                                            |
| **History**            | View the change history of this memory: whether each change was an addition, change or deletion, the content before and after, and the source (Recorded in a conversation, Tidied up after a task, Tidy up, Edited manually, Imported). **Clear its history** at the bottom clears only the history, not the memory itself |
| **Delete**             | Deletes this memory; a deletion record is kept in the change history, so you can trace it back                                                                                                                                                                                                                             |
| **Delete permanently** | Deletes it together with its whole change history; cannot be undone                                                                                                                                                                                                                                                        |

:::note Note
Passwords, ID numbers, bank card numbers and similar information can never be saved, even when you add them by hand; you will see **Passwords, ID numbers and card numbers cannot be saved**. Both the number of memories and the length of each one have limits; when exceeded, the reason is stated directly (such as "Too long — at most N characters" or "Memory is full. Delete or tidy up some first"), and nothing is silently truncated.
:::

### Manage: export, tidy up, import, clear

The **Manage** group at the bottom of the page:

| Operation            | Description                                                                                                                                                                                                                                                                           |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Export**           | Exports all memories as one Markdown file                                                                                                                                                                                                                                             |
| **Tidy up memory**   | The AI checks all memories: merges duplicates, fixes contradictions, and removes expired "In progress" items. It lists a plan first, and changes nothing until you click **Confirm and apply**                                                                                        |
| **Import**           | Paste memories exported from another assistant, or an introduction you wrote yourself (for example "I'm a product manager, please give the conclusion first…"), and click **Draft plan**. The AI splits it into several memories for you to review, and writes them after you confirm |
| **Clear all memory** | Deletes all memories and their change history; switch settings are kept. Cannot be undone                                                                                                                                                                                             |

Tidying up and importing call the model, and drafting a plan may take a dozen seconds or so; items skipped in the plan are annotated with the reason (contains sensitive identifiers, the sensitive topics switch is off, the limit has been reached, too long, and so on). When **Generate memory from chats** is off, these two are unavailable.

## Every write is visible in the conversation \{#every-write-is-visible-in-the-conversation}

When the AI records, changes or forgets a memory in a conversation, a line appears near the answer:

- "Remembered: …"
- "Updated memory: …"
- "Forgot: …"

Each line is followed by **View** and **Undo**. Click **Undo** to roll that change back, with the message "Undid the memory change to "…"". This line is **not** collapsed into the folded execution process; every write is out in the open. A line involving a sensitive topic is prominently marked **Sensitive — please check**.

With **Search and reference chats** on, when an answer draws on past sessions, **Referenced past chats** appears with the session names; click one to open that session.

A few rules:

- The automatic tidy-up after a task looks only at **what you said**, not at content that tools read, such as web pages and files;
- Memory is shared by all conversations in this space.

### Deleting memories along with a session

The confirmation dialog for deleting a session states **Memories created in this conversation will not be deleted** (a prominent red notice). If there are memories **recorded only by this conversation**, the dialog has an extra checkbox, "Also delete N memories saved from this conversation"; click **Show which ones** to expand the list.

- When checked, those memories are deleted together with the session; memories still used by other conversations are not deleted.
- When you check it, you are reminded that after deletion no other conversation will use these memories either.
- The same checkbox is available when deleting several sessions at once.
- If some memories could not be deleted, you are told, and you can delete them by hand in **Settings → Memory**.

## Not using memory in a single session \{#not-using-memory-in-a-single-session}

Some conversations you don't want the AI to remember, or you don't want it to answer with what it knows about you (for example, when doing something on someone else's behalf, or testing). When creating a task, click **+** in the input box and turn on **No memory** in the menu; turn it off again to cancel.

With it on, this session **neither reads nor writes** memory (it can still search past sessions), and the session title bar shows a **No memory** mark.

:::warning Warning
**No memory** can only be chosen before the session's first message is sent, and **cannot be changed after sending**.
:::

The following never write memory in the first place:

| Scenario                                                                                                            | Memory                                                                                       |
| ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| Execution and review sessions of Cases ([Cases](https://docs.heys.ai/workstation/en/cases.md))                      | Neither read nor written                                                                     |
| Scheduled tasks ([Cron Jobs and Notifications](https://docs.heys.ai/workstation/en/cron-jobs-and-notifications.md)) | Read only: memory is brought along at the start of the task as usual, but nothing is written |
| Tasks started by Apps ([Apps](https://docs.heys.ai/workstation/en/apps.md))                                         | Neither read nor written, and they cannot search your other conversations                    |
| Sprite ([Sprite](https://docs.heys.ai/workstation/en/sprite.md))                                                    | Uses its own memory                                                                          |

### The deployer can turn it off entirely

In **Settings → Spaces**, an administrator can select a space and, in the **Global memory (administrator)** group, turn off **Search and reference chats** or **Generate memory from chats** entirely. Once off, the corresponding switch for that space in **Settings → Memory** is grayed out and shows **Turned off by your administrator**. In deployments that serve others, such as collaboration nodes and the web app, **Generate memory from chats** and **Tidy up after each task** are off by default.

## Project memory \{#project-memory}

Project memory is a long-term memo **belonging to a project**; every task started in that project brings its full text along. It suits conventions that hold long term in the project:

- "报告一律写到 `报告/` 目录" (always write reports to the `报告/` folder);
- "金额统一用万元，保留一位小数" (amounts always in units of 10,000 yuan, one decimal place);
- "术语：GMV 指含税成交额" (terminology: GMV means gross transaction value including tax).

It does not suit one-off task parameters; write those directly in the task goal. When it conflicts with the current instruction, the current instruction wins.

Project memory is written in three ways:

| Way                                      | When it happens                                                                                                                                                                                                             |
| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Extracted automatically after a task** | After a task completes, if what you said contains a clear preference or convention ("I don't like…", "Remember…", "Always use…", "Never…"), or you corrected it during the task, an extraction runs                         |
| **Recorded immediately during a task**   | When the AI recognizes that you clearly stated a "do it this way from now on" convention, it records it on the spot                                                                                                         |
| **Editing by hand**                      | Click the project name in the sidebar to open the project page, click **Edit** on the right of the **Project memory** section, and click **Save** when done; when there is no content yet, it shows "No project memory yet" |

Project memory is limited to about 4,000 characters; the more concise, the better. Deleting a project deletes its project memory too.

:::tip Tip
Long-term conventions for a code project (how to build, how to test, code style) are better written in the repository's `AGENTS.md`, which the agent reads automatically ([Code Projects and Remote Workspaces](https://docs.heys.ai/workstation/en/code-projects-and-remote-workspaces.md)) and which others on the team can also see.
:::

Command line ([Command Line and API](https://docs.heys.ai/workstation/en/command-line-and-api.md)):

```bash
heys project memory <项目名>            # view
heys project memory <项目名> --edit     # edit in an editor
heys project memory <项目名> --clear    # clear
```

## Personality \{#personality}

Personality (SOUL) defines how the AI **talks**: name, role, core beliefs, tone and style, boundaries. It affects only what the AI writes for you to read, not how it does the work.

Open **Settings → Personality**; the page title is **AI personality**:

<figure>

![Settings → Personality: under the title "AI personality" are the description and the SOUL.md file path, with a "Switch" button next to "Current space default"; in the middle is the personality text (identity, core beliefs, tone and style), below it "1049 / 8192 bytes", and at the bottom right "Restore default personality" and "Save"](/screenshots/en/812-设置-人格-9533d5.webp)

<figcaption>Settings → Personality: under the title "AI personality" are the description and the SOUL.md file path, with a "Switch" button next to "Current space default"; in the middle is the personality text (identity, core beliefs, tone and style), below it "1049 / 8192 bytes", and at the bottom right "Restore default personality" and "Save"</figcaption>
</figure>

The page has:

- **File path**: the personality is saved as `SOUL.md` in the current space's folder;
- **Current space**: there is one personality per space; click **Switch** to go to **Settings → Spaces**, change to another space, then edit;
- **Body**: edit it directly; below it shows "used / 8192 bytes", and it cannot be saved beyond the limit;
- **Restore default personality**: restores the body to the default template; the current content is overwritten and this cannot be undone;
- **Save**: click it when done to apply; the next task talks with the new personality.

The default template has several sections you can edit along:

```markdown
## 身份
名字：（未设置）
角色：HeyS 任务助手

## 核心信念
- 真诚有用，而非表演式帮助
- 有观点，愿意直说不确定

## 语气与风格
- 结论优先，再给依据；不用"当然"、"好的"等客套语
- 数字和具体事实优先于模糊形容词
```

(The sections are Identity (name: not set; role: HeyS task assistant), Core beliefs (genuinely useful rather than performatively helpful; has opinions and is willing to say plainly when unsure) and Tone and style (conclusion first, then the basis, no pleasantries such as "of course" or "sure"; numbers and concrete facts over vague adjectives).)

Keep each item to two or three sentences; the longer it gets, the more likely the parts contradict each other.

### It adjusts itself

When you make an explicit request about how to address you, style or language in a conversation ("call me Lao Wang from now on", "don't write such long answers"), the AI writes it back into the personality, and it applies to all later tasks. If you don't want that, go back to **Settings → Personality** and change it back.

:::note Note
For tasks with an expert or expert team selected ([Experts, Skills and Connectors](https://docs.heys.ai/workstation/en/experts-skills-and-connectors.md)), the expert's persona applies only temporarily to that task and is not written back into your personality.
:::

## FAQ \{#faq}

**The AI remembered something wrong.** Find that item in **Settings → Memory** and fix it with **⋯ → Edit**, or delete it outright; if it was just written in the conversation, clicking **Undo** on that line is quickest.

**It didn't remember a preference I stated.** Check in turn: whether **Generate memory from chats** is on; whether this session has **No memory** selected; whether it is a task started by a Case or an App; whether the switch shows **Turned off by your administrator**.

**I switched spaces and all my memories are gone.** Memory and personality are stored separately for each space; switch back to the original space and they are there.

**I deleted a session, but the AI still remembers what was said there.** When deleting the session, "Also delete N memories saved from this conversation" was not checked, or the memory is still used by another conversation. Find it by source in **Settings → Memory** and delete it.

**I want the AI to recall a conversation from last week.** Turn on **Search and reference chats** and just ask ("What did we decide last time we discussed that plan?"). To find it yourself, use ⌘K global search ([Interface Overview](https://docs.heys.ai/workstation/en/interface-overview.md)), or reference that session with `@` in the input box ([Starting a Task](https://docs.heys.ai/workstation/en/starting-a-task.md)).
