Zero-config persistent memory for Claude with automatic cost savings. Remembers project context, reduces API token costs by 84%, tracks patterns, and manages memories across sessions with 6x context compression.
MemoryLane provides persistent memory for Claude with proven 84.3% cost savings through intelligent context compression and learning. It remembers information across sessions in 4 categories (patterns, insights, learnings, context), automatically compresses context 6.4x, and learns passively from git commits and file changes.
Activate MemoryLane when the user:
First, check the current state of MemoryLane:
```bash
python3 src/cli.py status
```
This shows memory statistics, category breakdown, and cost savings. If no memories exist, proceed to initial learning (Step 2).
For new projects or first-time use, perform initial learning:
```bash
python3 src/learner.py initial
python3 src/cli.py insights
```
This extracts patterns from the last 20 git commits and scans workspace structure.
When the user asks what you know or remember:
```bash
python3 src/cli.py recall "<query>"
```
Examples:
When asked about cost savings or token usage:
```bash
python3 src/cli.py costs
```
Shows detailed breakdown of token savings and cost reduction (typically 84.3% savings).
**Get a memory:**
```bash
python3 src/cli.py memory get <id>
```
**Delete a memory:**
```bash
python3 src/cli.py memory delete <id>
```
**Update a memory:**
```bash
python3 src/cli.py memory update <id> --content "New content"
```
**IMPORTANT:** Always use these commands instead of editing `memories.json` directly.
**Check if curation is needed:**
```bash
python3 src/cli.py curate
```
**List memories for review:**
```bash
python3 src/cli.py curate --list
```
**Proactive quality check:** When you see MemoryLane context injected in system messages, scan for poor quality memories:
Signs to DELETE:
Signs to KEEP:
**Apply curation decisions:**
```bash
python3 src/cli.py curate --apply '{"decisions": [{"id": "patt-001", "action": "KEEP"}, {"id": "lear-002", "action": "DELETE", "reason": "off-topic"}]}'
```
**Export as markdown:**
```bash
python3 src/cli.py export-markdown --category patterns --output context.md
```
**Create backup:**
```bash
python3 src/cli.py backup --output backup.json
```
**Restore from backup:**
```bash
python3 src/cli.py restore backup.json
```
For low-latency operations, start the sidecar server:
```bash
python3 src/server.py start
python3 src/server.py status
```
To stop:
```bash
python3 src/server.py stop
```
Enable background learning from file changes and commits:
```bash
python3 src/learner.py watch
```
This runs until stopped and automatically learns from project activity.
Key settings in `.memorylane/config.json`:
Update settings:
```bash
python3 src/cli.py config set memory.max_context_tokens 3000
python3 src/cli.py config list
```
**Daily Development:**
1. Start server: `python3 src/server.py start`
2. Check status: `python3 src/cli.py status`
3. Work normally (MemoryLane learns passively)
4. Review insights: `python3 src/cli.py insights`
5. Check savings: `python3 src/cli.py costs`
**Project Onboarding:**
1. Initial learning: `python3 src/learner.py initial`
2. Review patterns: `python3 src/cli.py recall "primary language"`
3. Check insights: `python3 src/cli.py insights`
4. Export context: `python3 src/cli.py export-markdown --output project-context.md`
1. All data stored locally in `.memorylane/` directory (fully private)
2. No external dependencies needed for production (pure Python 3.8+)
3. Automatically excludes `.env`, `secrets/`, and sensitive patterns
4. Always creates backup before destructive operations
5. Server is optional; CLI works standalone
**User asks to remember something:**
```bash
python3 src/cli.py recall "authentication"
```
**User asks about cost savings:**
```bash
python3 src/cli.py costs
```
**User wants to clean up memories:**
```bash
python3 src/cli.py curate --list
python3 src/cli.py curate --apply '<JSON decisions>'
```
Leave a review
No reviews yet. Be the first to review this skill!