Total Recall memory backend — git-branch-based persistent memory store with time-decay relevance.
Total Recall is a git-based memory backend that stores memories as structured markdown files on a dedicated orphan branch (openclaw-memory) within your existing project repository. It requires zero external dependencies beyond git itself, making it the simplest backend to deploy and the most portable across environments. Each memory is a timestamped markdown file in a _memory/ directory, committed with a searchable commit message. Retrieval uses git's built-in search (git log --grep, git grep). Relevance scoring is time-based: recent memories rank higher than older ones. Total Recall is ideal for conversation history, architectural decisions, and context snapshots in any project where installing additional tooling is impractical or undesirable.
Verify with:
git --version
Configuration is stored in config.json alongside this file. The router reads it to understand backend capabilities.
| Key | Type | Default | Description |
|---|---|---|---|
backend | string | "totalrecall" | Backend identifier for the router |
branch | string | "openclaw-memory" | Orphan branch where memories are stored |
memory_dir | string | "_memory" | Directory within the branch for memory files |
file_format | string | "markdown" | File format for stored memories |
relevance.method | string | "time_decay" | Relevance scoring method |
relevance.formula | string | "max(0.2, 1.0 - (days_ago * 0.043))" | Continuous decay formula |
relevance.today | float | 1.0 | Score for memories from today |
relevance.this_week | float | 0.7 | Score for memories from this week |
relevance.this_month | float | 0.4 | Score for memories from this month |
relevance.older | float | 0.2 | Floor score for older memories |
search.max_results | int | 20 | Maximum results per query |
store.commit_prefix | string | "memory:" | Prefix for commit messages |
All operations target the openclaw-memory orphan branch. The agent reads and writes memory files on this branch using git show and git checkout commands, avoiding disruption to the working tree. Alternatively, use git worktree for a persistent second checkout.
To store a memory with key auth-decision:
# Save current branch
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
# Switch to memory branch
git checkout openclaw-memory
# Create memory file with structured content
TIMESTAMP=$(date -u +"%Y-%m-%dT%H-%M-%S")
FILENAME="_memory/${TIMESTAMP}_auth-decision.md"
cat > "$FILENAME" << 'MEMORY_EOF'
---