Skip to content

Memory tool (`save_memory`)

The save_memory tool allows the Gemini agent to persist specific facts, user preferences, and project details across sessions.

This tool appends information to the ## Gemini Added Memories section of your global GEMINI.md file (typically located at ~/.gemini/GEMINI.md).

  • fact (string, required): A clear, self-contained statement in natural language.
  • Storage: Appends to the global context file in the user’s home directory.
  • Loading: The stored facts are automatically included in the hierarchical context system for all future sessions.
  • Format: Saves data as a bulleted list item within a dedicated Markdown section.
  • Persisting user preferences (for example, “I prefer functional programming”).
  • Saving project-wide architectural decisions.
  • Storing frequently used aliases or system configurations.