Memory and rules

Applies to: StablEdge 0.4.4 and later

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.

WayScopeWhat to write
Long-term memoryAccount-level memory spans all projects; project memory covers the current project onlyYour own preferences, hard project constraints, things you have done and pitfalls you have hit
Chat memoryThe current chat onlyAgreements made on the fly in this chat
Project rules (AGENTS.md)This project only, and it can be versioned with the codeBuild commands, directory conventions, code style, things that are not allowed
System prompt supplementEvery chat of one chat categoryTone, output format, fixed working habits
None of these can extend the Agent's permissions or get around safety rules.

Long-term memory

Long-term memory comes in two kinds:

Deep memoryExperience memory
What to writeFacts or constraints that stay true over time and apply to every chat, in one sentenceApproaches, pitfalls, and diagnostic conclusions from one task
How it is usedCarried into every chat for the AgentThe Agent sees the title only and fetches the full text when needed
LengthAt most 200 characters eachAt most 4000 characters each, with a title of at most 30 characters
QuotaAt most 20 entries per scope, 1500 characters in totalNo limit on the number of entries

Managing long-term memory

  1. Open Settings → Memory and prompts and find Long-term memory.
  2. Use the scope filter and Search memory to find the entry you want.
  3. Select New memory, pick the kind, and fill in the content (experience memory also needs a title).
  4. 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.

Every time the Agent wants to write to long-term memory, a card asks you to confirm, even when safety confirmation is off for this chat.

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.

  1. Open Settings → Memory and prompts, find Project rules, and pick a project.
  2. The list shows the rule files of that project and whether each one is In effect. Select Open to view or edit one.
  3. 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.
On this page