# Knowledge and memory

Give the AI lasting context. Write project knowledge once, and review what the AI remembers in each project, privately.

Give the AI context that lasts from one conversation to the next. Knowledge is what you tell the AI to remember. Memory is what the AI learns on its own while you work. You can review and correct both.

The Project Knowledge window with example guidelines.

## What you can do

- Write project guidelines the AI keeps in mind on every edit.
- State decisions and preferences in any language, and let the AI remember them.
- See which memories a reply used, in the memory card under it.
- Keep your memories private in a shared project.
- Review, edit and delete the AI's core and archived memories.
- Clear all your memories of a project.

## Project knowledge

Project knowledge holds guidelines that Lyna remembers across all edits: coding conventions, style preferences, product facts and rules for this project.

1. ### Open Project Knowledge

   Open the **+** menu in the composer and choose Knowledge, or type `/knowledge`.
2. ### Write your guidelines

   Keep them short and concrete, for example:

   ```text
   - The brand name is "Casa Verde". Never shorten it.
   - Prices are in euros, with a comma for decimals.
   - Buttons use the primary color and rounded corners.
   - Every form shows a clear success message.
   ```
3. ### Save

   Your knowledge is saved and used from the next message on. If you keep typing while it saves, nothing you type is lost: the dialog stays open with your new text, ready to save again.

> [!NOTE]
>
> **Knowledge or rules?**
>
> Use knowledge for facts and preferences about your product. Use [rules](/features/ai/rules) for technical standards stored as files in your project, including rules that apply only to some files.

## Memory

While you work, the AI saves what is worth keeping: architecture choices, design decisions, business rules, your preferences, constraints, integrations, known bugs, approaches you rejected and workflows. Saving happens in the background and never slows a reply.

### Memory in any language

The AI notices a decision or a preference whatever language you write in. It also notices rules you state as code, such as a naming style or a list of things to do and not to do.

Every few messages, it also looks back over the recent conversation to keep what it knows up to date. It can add a memory or update one, but it never deletes one on its own.

### The memory card under a reply

When a reply uses memories, a memory card shows under it, such as **Recalled 3 memories + 2 core**. Open it to see each memory by name, with its kind (for example **Preference**, **Design decision** or **Business rule**) and up to two lines of its text:

- **Recalled for this reply**: the memories found because they match your message.
- **Saved memories in use**: the core memories the AI reads on every message.

The memory card open under a reply, with each memory's name, its kind and the start of its text.

**Manage memories** opens the memory settings, for editors of the project. After you reload the page, the card shows one row per kind with a count, and says the details stay private.

### Private to you and to one project

Memory belongs to one project. What the AI learns in one project never shows up in another.

In a shared project, each member has their own memories. Teammates never see yours, in the chat or in their own conversations. On a reply you sent, a teammate sees only how many memories of each kind were used.

### Review memories

Open **Settings > AI > Memory**. There are two tabs:

- **Core**: short key and value facts the AI learned in this project. Each shows its scope, its confidence and how often it was used.
- **Archived**: longer knowledge taken from past conversations.

Settings open on AI Memory with the Core tab and a list of memories.

You can **Edit** or **Delete** each memory. **Clear All Memories** deletes all your core and archived memories of this project. This cannot be undone.

> [!NOTE]
>
> **Correct the AI in the chat**
>
> If the AI remembers something wrong, tell it in the chat, or delete the memory in settings. It will stop using it.

## Related

- [Rules](/features/ai/rules): Always-on standards for the AI.
- [Skills](/features/ai/skills): Instructions loaded when a task matches.
- [Mentions and context](/features/ai/mentions-and-context): Context for one message.
- [How Lyna finds the right code](/features/ai/how-lyna-reads-your-project): The project map, the code search and memory together.
