Module 4: Memory Fundamentals•Lesson 6 of 8
Hands-on: Retrieve Memory
Hands-on: Retrieve Memory
Now let's practice loading memory correctly.
The Session Start Pattern
Every time your agent starts, it should:
## Session Start Checklist
Before doing anything else:
1. Read SOUL.md — this is who you are
2. Read USER.md — this is who you're helping
3. Read MEMORY.md — the INDEX (pointers to everything)
4. Read memory/WORKING.md — current task state
5. Read memory/daily/YYYY-MM-DD.md (today + yesterday)This should be in your AGENTS.md file.
On-Demand Loading Rules
| Trigger | Action |
|---|---|
| Person discussed in detail | Load memory/people/[name].md |
| Project work needed | Load memory/projects/[name].md |
| Lesson/playbook needed | Load memory/knowledge/[topic].md |
| Unclear where info is | Use memory_search tool |
Exercise 1: Practice the Load Sequence
Configure your agent to run this sequence at session start.
In your AGENTS.md or equivalent:
## Every Session
Before doing anything else:
1. Read SOUL.md — this is who you are
2. Read USER.md — this is who you're helping
3. Read MEMORY.md — the INDEX
4. Read memory/WORKING.md — current task state
5. Read memory/daily/[today].md
6. Read memory/daily/[yesterday].md for recent contextExercise 2: Test Memory Search
If your system has semantic search (memory_search tool):
- Store a fact: "My favorite color is blue"
- Search for it: memory_search("color preference")
- Verify it's found
If no semantic search, practice grep:
grep -r "favorite color" memory/Exercise 3: Create a Person File
- Create memory/people/[yourname].md
- Include:
- Basic info
- Goals
- Preferences
- Current projects
- Add a pointer in MEMORY.md
- Test loading it when you mention yourself
Validation
Your agent should be able to:
- Automatically load core files at session start
- Find a specific fact you stored
- Load a person file when that person is mentioned
- Know where to look for project information