You can have the Agent remember your preferences and project conventions in three ways: long-term memory, project rules, and a system prompt supplement. All of them are managed under Settings → Memory and prompts. Secrets you need to hand the Agent go in Secret environment variables instead.
| Way | Scope | What to write |
|---|---|---|
| Long-term memory | Account-level memory spans all projects; project memory covers the current project only | Your own preferences, hard project constraints, things you have done and pitfalls you have hit |
| Chat memory | The current chat only | Agreements made on the fly in this chat |
| Project rules (AGENTS.md) | This project only, and it can be versioned with the code | Build commands, directory conventions, code style, things that are not allowed |
| System prompt supplement | Every chat of one chat category | Tone, output format, fixed working habits |
Long-term memory
Long-term memory comes in two kinds:
| Deep memory | Experience memory | |
|---|---|---|
| What to write | Facts or constraints that stay true over time and apply to every chat, in one sentence | Approaches, pitfalls, and diagnostic conclusions from one task |
| How it is used | Carried into every chat for the Agent | The Agent sees the title only and fetches the full text when needed |
| Length | At most 200 characters each | At most 4000 characters each, with a title of at most 30 characters |
| Quota | At most 20 entries per scope, 1500 characters in total | No limit on the number of entries |
Managing long-term memory
- Open Settings → Memory and prompts and find Long-term memory.
- Use the scope filter and Search memory to find the entry you want.
- Select New memory, pick the kind, and fill in the content (experience memory also needs a title).
- Experience memory can be Set as deep memory, and deep memory can be Converted to experience memory. When the deep memory quota is full, you need to delete, merge, or convert existing entries first.
New chats pick up a change immediately; chats already under way update after the context is compacted.
Chat memory
Agreements that hold only for the current chat are kept by the Agent in chat memory, and they survive context compaction.
- Select Chat memory (N items) in the chat to view, edit, or delete it.
- To keep something for longer, choose Promote to project memory; the promotion needs your approval.
Project rules
The AGENTS.md in a project holds the project rules written for the Agent, and the Agent reads them by directory level while it works in that project.
- Open Settings → Memory and prompts, find Project rules, and pick a project.
- The list shows the rule files of that project and whether each one is In effect. Select Open to view or edit one.
- To create a rule, fill the path of a rule file into the input box (for example
services/api/AGENTS.md), select New / open, and Save once you have written it. The directory it lives in must already exist.
Rules in the project root take effect in a new chat or after context compaction; rules in a subdirectory take effect the next time the Agent works in that directory. When the Agent wants to change rules itself, an approval card appears in the chat.
System prompt supplement
Under System prompt supplement you can add your preferences to each of the four chat categories, Chat, Agent, Complex task, and Subagent, for example "give the conclusion first, then the reasoning".
- The supplement is appended after the built-in role definition and does not replace it; a supplement that conflicts with safety rules does not take effect.
- From the next message on, a saved supplement applies, including in chats already under way.
- Select Clear my supplement to go back to the default.
Secret environment variables
Secrets such as API keys and AccessKeys are kept in the system keychain on this machine. They are injected into commands the Agent runs by variable name, so the Agent never sees the value, and the secret is never sent to the model or shown in the chat.
- Entering one in a chat: when the Agent needs a secret, an Enter secret card appears; paste the secret value and save. If you would rather not, choose Not now.
- Managing them by hand: open Settings → Secret environment variables, fill in Variable name (for example
OPENAI_API_KEY), Purpose, and Value, and select Add. For an existing variable you can Show value (it hides itself again after 30 seconds), Edit value, or Delete it.