-
Notifications
You must be signed in to change notification settings - Fork 0
Long Term Memory
In a standard AI session, once you close the window or run /clear, the AI forgets everything. Gemma CLI solves this with a Persistent Fact Storage system, allowing Gemma to learn about you, your preferences, and your projects over time.
Gemma CLI manages memory through two distinct actions: Storing and Recalling.
Gemma is instructed to proactively use the remember tool whenever you state a clear fact or preference.
- Example: "I prefer using dark mode for my code blocks."
-
Action: Gemma calls
remember(fact='User prefers dark mode for code blocks', category='preference'). -
Storage: The fact is saved to
%APPDATA%\GemmaCLI\memory.json.
Because token budgets are limited, the CLI does not load your entire life story on every launch. Instead, you can use the /recall command to inject your saved history into the current session.
- Launch the CLI: Start a fresh session.
-
Type
/recall: The CLI scans your memory file and displays a beautiful summary box of everything it knows. - Injection: The facts are automatically appended to the conversation history as a "MEMORY CONTEXT" block.
- Acknowledgment: Gemma acknowledges the context and begins using your preferences immediately.
Your memories are stored locally in a simple, human-readable JSON format.
Location: C:\Users\YourUser\AppData\Roaming\GemmaCLI\memory.json
Example Entry:
[
{
"date": "2026-03-01 14:20",
"category": "personal",
"fact": "The user is working on a GitHub organization privilege audit."
},
{
"date": "2026-03-01 15:45",
"category": "preference",
"fact": "The user prefers Pester for PowerShell unit testing."
}
]- Be Explicit: If you want Gemma to never forget something, say "Gemma, remember that I use Node.js version 20 for this project."
-
Categories: Gemma uses categories (e.g.,
personal,project,preference) to organize your memories. You can see these groupings when you run/recall. -
Cleanup: To delete a memory, currently you must manually edit the
memory.jsonfile in a text editor.
Next Steps: Check out the Interactive Commands reference for other advanced utilities.