File size: 6,277 Bytes
813575d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | ---
license: mit
tags:
- ai-memory
- i-lang
- ilang-protocol
- claude-code
- cursor
- persistent-memory
pretty_name: Mem-Forever - AI Persistent Memory Protocol
configs:
- config_name: default
data_files:
- split: train
path: data/*.jsonl
---
# Mem-Forever
> **永久记忆 · 跨会话 · 跨模型**
> A persistent memory layer for AI agents, built on the I-Lang protocol.
[](LICENSE)
[](https://ilang.ai)
[](https://github.com/ilang-ai/ilang-spec)
[]()
[中文](docs/README.zh.md) | [日本語](docs/README.ja.md) | [한국어](docs/README.ko.md) | [Español](docs/README.es.md) | [Français](docs/README.fr.md) | [Deutsch](docs/README.de.md) | [Português](docs/README.pt.md) | [Русский](docs/README.ru.md)
## Abstract
Every AI tool forgets you after every session. You close a window, and your preferences, decisions, and lessons vanish. Next session, you start from zero.
**Mem-Forever** is a Git-native memory layer that lets any AI agent remember you permanently. Memories are stored as compact I-Lang structures in your own private repo, readable by humans, parseable by machines, and portable across every tool.
Where context windows forget, **Mem-Forever endures**.
## Why
| | |
|---|---|
| **Persistent** | One memory, surviving every session and every model swap. |
| **Portable** | Plain-text I-Lang shards in `.ilang/`. `git diff`-able, no vendor lock-in. |
| **Automatic** | AI builds your profile from conversation. You never fill a form. |
| **Private** | Your repo, your data. No server, no account, no telemetry. |
## Quick Look
```
.ilang/
soul.md ← who you are (auto-generated from conversation)
memory.md ← what you decided, learned, built (auto-appended)
```
```ilang
::DNA{user}
::CORE{
::CONTEXT{role:fullstack_dev|experience:10yr}
::GENE{style|conf:confirmed}
T:conclusions_first
T:minimal_output|when:simple
A:verbose_without_signal⇒waste
}
::LESSONS{
::LESSON{id:serverless_no_shared_state|conf:confirmed}
}
```
Every preference is **addressable**, **scoped**, **versioned**, and **falsifiable**.
## Setup (seconds)
**Step 1**   Click **"Use this template"** → **Create a new repository** → Set to **Private**.
**Step 2**   There is no step 2.
Open the repo with any AI tool. It reads the instruction files, asks you a few questions, builds your profile. From that point on, it remembers.
## Works With Everything
| Tool | Auto-reads | How |
|---|---|---|
| Claude Code | `CLAUDE.md` | Open repo, start working |
| Cursor | `.cursorrules` | Open repo, start working |
| Codex | `AGENTS.md` | Open repo, start working |
| Copilot | `.github/copilot-instructions.md` | Open repo, start working |
| Gemini CLI | `GEMINI.md` | Open repo, start working |
| ChatGPT | Project knowledge | Upload `soul.md` |
| Claude.ai | Project knowledge | Upload `soul.md` |
| Gemini web | Google Drive | Sync `soul.md` to Drive |
### Working on a different project?
One sentence restores full context:
> *My memory repo is at `https://github.com/YOU/mem-forever`. PAT: `ghp_xxx`. Clone it, read `.ilang/soul.md` and `.ilang/memory.md`, then come back here.*
### Multiple projects?
Use this template again. `mem-forever-work`, `mem-forever-research`, `mem-forever-client-x`. Each repo is an independent memory. Same engine, different context.
## How It Works
```
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ You talk │────▶│ AI reads │────▶│ AI updates │
│ to any AI │ │ .ilang/ │ │ .ilang/ │
│ tool │ │ soul.md │ │ memory.md │
│ │ │ memory.md │ │ soul.md │
└─────────────┘ └──────────────┘ └──────┬──────┘
│
git commit
git push
│
┌──────▼──────┐
│ Your private │
│ GitHub repo │
└─────────────┘
```
**soul.md** is your behavioral profile. Built from conversation, sharpened every session through mutation and decay rules. Think of it as DNA that travels with you.
**memory.md** is your logbook. Decisions, lessons, facts, progress. Append-only. Git history preserves everything.
You never write these files. Your AI does. You can read, edit, or delete them anytime. They are yours.
## Comparison
| | Mem-Forever | Nowledge Mem | Mem0 |
|---|---|---|---|
| Install | Use template | Download app + configure | pip install + API key |
| Config | None | MCP + plugins + LLM | SDK integration |
| Storage | Your GitHub repo | Local SQLite | Cloud vectors |
| Cross-tool | Any tool that reads files | Plugin per tool | API per tool |
| Price | Free forever | Free / Pro | Free / Pro |
| Data ownership | You | You | Theirs |
| Migration | `git clone` | Export | API call |
## Under the Hood
The instruction files contain behavioral rules written in [I-Lang v4.0](https://ilang.ai), a structured protocol that AI models parse natively. These rules tell the AI how to extract preferences, format memories, handle conflicts, and evolve your profile over time.
You don't need to know I-Lang. You just talk to your AI, and it gets better at working with you.
## License
MIT
<sub>Built by <a href="https://ilang.ai">I-Lang Protocol</a> · The native language of artificial intelligence</sub>
|