Skip to main content
Use standard git commands to diff what changed last session, revert a bad write, or audit the full history. memory/MEMORY.md is the primary file. It’s loaded automatically into every conversation.

Directory Structure

memory/
├── MEMORY.md          # Primary memory (versioned)
├── mood.md            # Per-session mood log
├── photos/            # Camera captures
│   └── 2025-08-28-moment.jpg
├── journal/           # Session reflections
│   └── 2025-08-28.md
└── archive/           # Auto-archived old entries
    └── 2025-07-archive.md

Memory Layers

# memory/memory.yaml
layers:
  - name: working
    path: memory/MEMORY.md
    max_lines: 1000
    format: markdown
  - name: technical
    path: memory/technical.md
    max_lines: 500
    format: markdown

archive_policy:
  max_entries: 500
  compress_after: 30d
When a layer exceeds max_lines, old entries are auto-archived to memory/archive/<YYYY-MM>.md.

Other Memory Files

GitAgent also writes to a few other files automatically:
FeaturePathDescription
Mood Logmemory/mood.mdSession mood tracking (happy, frustrated, curious, excited, calm)
Photosmemory/photos/Captured memorable moments with INDEX.md
Journalmemory/journal/<date>.mdAuto-generated session reflections
Learning.gitagent/learning/Task history and learned skills (JSON)

Memory Commands

# View current memory in REPL
/memory

# Full git history of every memory write
git log --oneline memory/MEMORY.md

# Diff what changed last session
git diff HEAD~1 memory/MEMORY.md

# Undo a specific memory commit
git revert a3f2e91

# Read yesterday's mood log
git show HEAD:memory/mood.md

# Save something to memory via SDK
query({ prompt: "Remember that the API base URL is https://api.example.com", dir: "./my-agent" })

Rolling Back Memory

git revert HEAD                          # undo last memory write
git revert HEAD~3..HEAD                  # undo last 3 writes
git checkout a3f2e91 -- memory/MEMORY.md # restore to specific point
git commit -m "Restore memory to known good state"
Use git revert rather than git reset --hard — revert preserves the audit trail while reset destroys it.

Browsing the Archive

ls memory/archive/
cat memory/archive/2025-07-archive.md
git log -p memory/ | grep "search term"

Schedules & Cron

Automate agent runs on a cron schedule or as one-time tasks

Integrations

Connect GitAgent to Composio, Telegram, WhatsApp, and Twilio

Compliance & Audit

Audit logging and human-in-the-loop approval for regulated workflows

GitAgent Overview

Identity, memory, rules, and skills as plain files in a repo