MemoryGraph provides memory tools, but your AI assistant won't use them automatically. You need to configure memory directives to encourage storage and retrieval.
Why Configuration Is Needed
MemoryGraph is an MCP tool provider, not an autonomous agent. This means:
- Your AI needs to be prompted to use memory tools
- You control what gets stored - nothing is saved without instruction
- Configuration is key for consistent behavior
Quick Setup
Add this to your ~/.claude/CLAUDE.md (or AGENTS.md for other tools):
## Memory Protocol
### REQUIRED: Before Starting Work
You MUST use `recall_memories` before any task. Query by project, tech, or task type.
### REQUIRED: Automatic Storage Triggers
Store memories on ANY of:
- **Git commit** β what was fixed/added
- **Bug fix** β problem + solution
- **Version release** β summarize changes
- **Architecture decision** β choice + rationale
- **Pattern discovered** β reusable approach
### Timing Mode (default: on-commit)
`memory_mode: immediate | on-commit | session-end`
### Memory Fields
- **Type**: solution | problem | code_pattern | fix | error | workflow
- **Title**: Specific, searchable (not generic)
- **Content**: Accomplishment, decisions, patterns
- **Tags**: project, tech, category (REQUIRED)
- **Importance**: 0.8+ critical, 0.5-0.7 standard, 0.3-0.4 minor
- **Relationships**: Link related memories when they exist
Do NOT wait to be asked. Memory storage is automatic. Trigger Phrases
Your AI responds well to explicit memory requests:
For Storing
- "Store this for later..."
- "Remember that..."
- "Save this pattern..."
- "Record this decision..."
- "Create a memory about..."
For Recalling
- "What do you remember about...?"
- "Have we solved this before?"
- "Recall any patterns for..."
- "What did we decide about...?"
For Session Management
- "Summarize and store what we accomplished today"
- "Store a summary of this session"
- "Catch me up on this project"
Memory Types
Choose the right type for better organization:
| Type | Use For | Example |
|---|---|---|
solution | Working fixes | "Fixed N+1 query with eager loading" |
problem | Issues encountered | "Database deadlock under high concurrency" |
code_pattern | Reusable patterns | "Repository pattern for database access" |
decision | Architecture choices | "Chose PostgreSQL over MongoDB" |
task | Work completed | "Implemented user authentication" |
error | Specific errors | "ImportError: module not found" |
fix | Error resolutions | "Added missing import statement" |
Relationship Types
Link related memories with these relationship types:
# Causal relationships
problem --CAUSES--> error
change --TRIGGERS--> bug
# Solution relationships
solution --SOLVES--> problem
fix --ADDRESSES--> error
pattern --IMPROVES--> code
# Context relationships
pattern --APPLIES_TO--> project
solution --REQUIRES--> dependency
pattern --WORKS_WITH--> technology
# Learning relationships
new_approach --BUILDS_ON--> old_approach
finding --CONTRADICTS--> assumption Example Workflows
Debugging Workflow
1. Encounter error β Store as type: error
2. Find root cause β Store as type: problem, link: error TRIGGERS problem
3. Implement fix β Store as type: solution, link: solution SOLVES problem
4. Result: Complete chain for future reference Feature Development Workflow
1. Start: "Recall any patterns for user authentication"
2. Implement: [Work on feature]
3. Store: "Store this authentication pattern" β type: code_pattern
4. Link: pattern APPLIES_TO project
5. End: "Store summary of authentication implementation" Project-Specific Configuration
For team projects, add a .claude/CLAUDE.md to the repository:
## Project Memory Protocol
This project uses MemoryGraph for team knowledge sharing.
### When to Store
- Solutions to project-specific problems
- Architecture decisions and rationale
- Deployment procedures and gotchas
- Performance optimizations
- Bug fixes and root causes
### Tagging Convention
Always include these tags:
- Project name: "my-app"
- Component: "auth", "api", "database", etc.
- Type: "fix", "feature", "optimization", etc.
### Example
When fixing a bug:
1. Store the problem (type: problem)
2. Store the solution (type: solution)
3. Link them: solution SOLVES problem
4. Tag both with component and "bug-fix"