RAG Remember — Store to Personal Knowledge Graph
Store a specific fact, decision, or observation into your personal LightRAG knowledge graph. Use mid-session when something worth remembering comes up.
Formatting rules
Format each entry as:
[TYPE] Title — YYYY-MM-DD
What: Brief description of the fact or decision
Why: The reasoning or context behind it
Files: Relevant file paths (if applicable)
Entry types
| Type |
Use for |
DECISION |
Architecture choices, tool selections, approach decisions |
FEEDBACK |
User corrections, preferences, "do this / don't do that" |
CONFIG |
Server settings, env vars, ports, credentials (NO actual secrets) |
PROJECT |
Project status, goals, deadlines, stakeholders |
PERSON |
People, roles, contact preferences, working styles |
REFERENCE |
URLs, docs, external resources, where to find things |
INSIGHT |
Debugging lessons, performance findings, non-obvious learnings |
How to store
node -e "
const BASE = process.env.LIGHTRAG_SERVER_URL || 'http://YOUR_LIGHTRAG_HOST:YOUR_PERSONAL_PORT';
(async () => {
const auth = await fetch(BASE + '/auth-status').then(r => r.json());
const token = auth.access_token;
const res = await fetch(BASE + '/documents/text', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + token
},
body: JSON.stringify({
file_source: '[TYPE] Title — YYYY-MM-DD',
text: 'Full content here with What/Why/Files structure'
})
});
const data = await res.json();
console.log('Status:', res.status);
})();
"
After inserting
- Confirm to the user: "Stored: [TYPE] Title"
- Do NOT dump the raw API response
- If the insert fails, tell the user and suggest trying again
What NOT to store
- Ephemeral task details — current conversation context, in-progress work steps
- Code from the codebase — it's already in the repo; store the decision, not the code
- Duplicates — query first if unsure whether something is already stored
- Credentials or secrets — never store API keys, passwords, tokens
- Git history — use
git log / git blame instead
Infrastructure
- Server:
YOUR_LIGHTRAG_HOST:YOUR_PERSONAL_PORT
- Auth: Bearer token from
/auth-status (guest/disabled mode)
- Env var:
LIGHTRAG_SERVER_URL
1---2name: rag-remember3description: Store a fact, decision, or observation into the personal LightRAG knowledge graph immediately4---56# RAG Remember — Store to Personal Knowledge Graph78Store a specific fact, decision, or observation into your personal LightRAG knowledge graph. Use mid-session when something worth remembering comes up.910## Formatting rules1112Format each entry as:1314```15[TYPE] Title — YYYY-MM-DD1617What: Brief description of the fact or decision18Why: The reasoning or context behind it19Files: Relevant file paths (if applicable)20```2122### Entry types2324| Type | Use for |25|------|---------|26| `DECISION` | Architecture choices, tool selections, approach decisions |27| `FEEDBACK` | User corrections, preferences, "do this / don't do that" |28| `CONFIG` | Server settings, env vars, ports, credentials (NO actual secrets) |29| `PROJECT` | Project status, goals, deadlines, stakeholders |30| `PERSON` | People, roles, contact preferences, working styles |31| `REFERENCE` | URLs, docs, external resources, where to find things |32| `INSIGHT` | Debugging lessons, performance findings, non-obvious learnings |3334## How to store3536```bash37node -e "38const BASE = process.env.LIGHTRAG_SERVER_URL || 'http://YOUR_LIGHTRAG_HOST:YOUR_PERSONAL_PORT';39(async () => {40 const auth = await fetch(BASE + '/auth-status').then(r => r.json());41 const token = auth.access_token;42 const res = await fetch(BASE + '/documents/text', {43 method: 'POST',44 headers: {45 'Content-Type': 'application/json',46 'Authorization': 'Bearer ' + token47 },48 body: JSON.stringify({49 file_source: '[TYPE] Title — YYYY-MM-DD',50 text: 'Full content here with What/Why/Files structure'51 })52 });53 const data = await res.json();54 console.log('Status:', res.status);55})();56"57```5859## After inserting6061- Confirm to the user: "Stored: [TYPE] Title"62- Do NOT dump the raw API response63- If the insert fails, tell the user and suggest trying again6465## What NOT to store6667- **Ephemeral task details** — current conversation context, in-progress work steps68- **Code from the codebase** — it's already in the repo; store the *decision*, not the code69- **Duplicates** — query first if unsure whether something is already stored70- **Credentials or secrets** — never store API keys, passwords, tokens71- **Git history** — use `git log` / `git blame` instead7273## Infrastructure7475- **Server**: `YOUR_LIGHTRAG_HOST:YOUR_PERSONAL_PORT`76- **Auth**: Bearer token from `/auth-status` (guest/disabled mode)77- **Env var**: `LIGHTRAG_SERVER_URL`