Skip to main content
Droid doesn’t have built-in memory between sessions, but you can create a powerful memory system using markdown files, AGENTS.md references, and hooks. This guide shows you how to build memory that persists and grows.
Works with Factory App: These memory patterns work identically in both the Droid CLI and the Factory App—just ensure your working directory is set to your repository root.

The Memory System Architecture

Your memory system consists of three layers:

Setting Up Personal Memory

Personal memory follows you across all projects.

Step 1: Create the Memory File

Create ~/.factory/memories.md:

Step 2: Reference in AGENTS.md

Add to your ~/.factory/AGENTS.md or project AGENTS.md:

Setting Up Project Memory

Project memory captures decisions and context specific to a codebase.

Step 1: Create Project Memory

Create .factory/memories.md in your project root:

Step 2: Reference in Project AGENTS.md

Update your project’s AGENTS.md:

Memory Categories

Organize your memories into useful categories:

Preferences (Personal)

What you like and how you work:

Decisions (Project)

What was decided and why:

Context (Project)

Background information:

History (Both)

What happened when:

Automatic Memory Capture

Create a hook that helps you capture memories as you work.

The “Remember This” Hook

When you say “remember this:” followed by content, automatically append to memories. You can trigger memory capture with either special characters or phrases. Choose based on your preference:
Trigger with # at the start of your message for quick capture.Usage:
  • “#we use the repository pattern”
  • “##I prefer early returns” (double ## for personal)
Create ~/.factory/hooks/memory-capture.py:
Make it executable and configure the hook:
Add to your hooks configuration via /hooks:
With # prefix:
  • “#we decided to use Zustand for state management”
  • “##I prefer early returns” (double ## saves to personal)
With phrase triggers:
  • “Remember this: we decided to use Zustand for state management”
  • “Note: the auth module uses JWT with 24-hour expiration”

Alternative: Memory Capture Skill

Instead of a hook, you can use a skill that Droid invokes when you ask to remember something. This gives you more interactive control over categorization.

Alternative: Custom Slash Command

For quick manual capture, create a custom slash command: Create ~/.factory/commands/remember.md:
Then use /remember we chose PostgreSQL for better ACID compliance to capture memories on demand.
Which approach to choose?
  • Hook — Best for automatic capture without extra steps
  • Skill — Best when you want Droid to help categorize and format
  • Slash Command — Best for quick manual capture with consistent formatting

Memory Maintenance

Keep your memories useful with regular maintenance.

Monthly Review Checklist

Archiving Old Memories

When memories become stale, move them to an archive:

Advanced: Memory-Aware Skills

Create skills that leverage your memory files:

Quick Reference

File Locations

Memory TypeLocationScope
Personal preferences~/.factory/memories.mdAll projects
Project decisions.factory/memories.mdThis project
Team conventions.factory/rules/*.mdThis project

When to Add Memories

EventWhat to RecordWhere
Made an architecture decisionDecision + reasoningProject
Discovered a preferenceWhat you preferPersonal
Learned domain knowledgeBusiness rules, entitiesProject
Changed your workflowNew tool or patternPersonal
Resolved a tricky issueSolution and contextProject

Memory Format Template


Next Steps

Setup Checklist

Complete power user configuration

Rules Guide

Organize team conventions