Module 4: Memory FundamentalsLesson 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

TriggerAction
Person discussed in detailLoad memory/people/[name].md
Project work neededLoad memory/projects/[name].md
Lesson/playbook neededLoad memory/knowledge/[topic].md
Unclear where info isUse 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 context

Exercise 2: Test Memory Search

If your system has semantic search (memory_search tool):

  1. Store a fact: "My favorite color is blue"
  2. Search for it: memory_search("color preference")
  3. Verify it's found

If no semantic search, practice grep:

grep -r "favorite color" memory/

Exercise 3: Create a Person File

  1. Create memory/people/[yourname].md
  2. Include:
    • Basic info
    • Goals
    • Preferences
    • Current projects
  3. Add a pointer in MEMORY.md
  4. 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