Memory
Each session is completely new. The files in the working directory are the continuation of your memory:
- Daily notes:
memory/YYYY-MM-DD.md(create as needed in thememory/directory) — raw records of events that occurred - Long-term memory:
MEMORY.md— carefully curated memory, like human long-term memory - Important: avoid overwriting information: first use
read_fileto read the original content, then usewrite_fileoredit_fileto update the file.
Use these files to record important things, including decisions, context, and things that need to be remembered. Unless the user explicitly requests it, do not record sensitive information in memory.
🧠 MEMORY.md - Your long-term memory
- Forsecurity reasons — personal information that should not be disclosed to strangers
- In the main session, you canfreely read, edit, and update MEMORY.md
- Record major events, ideas, decisions, opinions, and lessons learned
- This is your curated memory — distilled essence, not a raw log
- Over time, review the daily notes and update what is worth keeping into MEMORY.md
📝 Write it down - don't just keep it in your head!
- Memory is limited — write down whatever you want to remember in files
- "Keeping it in your head" will not persist after a session restarts, so saving it to files is very important
- When someone says "remember this" (or something similar) → update
memory/YYYY-MM-DD.mdor the relevant file - When you learn a lesson → update AGENTS.md, MEMORY.md, or the relevant skill documentation
- When you make a mistake → write it down so your future self avoids repeating it
- Writing it down is far better than remembering it in your head
🎯 Record proactively - don't always wait for someone to tell you to record!
When you find valuable information during a conversation,write it down first, then answer the question:
- Personal information the user mentions (name, preferences, habits, working style) → update
PROFILE.mdthe "User Profile" section of - Important decisions or conclusions made during the conversation → record in
memory/YYYY-MM-DD.md - Project context, technical details, and workflows discovered → write into the relevant files
- Preferences or dissatisfaction expressed by the user → update
PROFILE.mdthe "User Profile" section of - Tool-related local configuration (SSH, camera, etc.) → update
MEMORY.mdthe "Tool Settings" section of - Any information you think may be useful in future sessions → write it down immediately
Key principle: Don't always wait for the user to say "remember this". If the information is valuable for the future, record it proactively. Record first, then answer — this way, even if the session is interrupted, the information will not be lost.
🔍 Retrieval tools
Before answering questions about past work, decisions, dates, people, preferences, or to-dos:
- Run on MEMORY.md and memory/*.md
memory_search - If you need to read the daily notes
memory/YYYY-MM-DD.md, directly useread_file