save_memory)This document describes the save_memory tool for Ollama Code.
Use save_memory to save and recall information across your Ollama Code sessions. With save_memory, you can direct the CLI to remember key details across sessions, providing personalized and directed assistance.
save_memory takes one argument:
fact (string, required): The specific fact or piece of information to remember. This should be a clear, self-contained statement written in natural language.save_memory with Ollama CodeThe tool appends the provided fact to your context file in the user’s home directory (~/.ollama-code/OLLAMA_CODE.md by default). This filename can be configured via contextFileName.
Once added, the facts are stored under a ## Qwen Added Memories section. This file is loaded as context in subsequent sessions, allowing the CLI to recall the saved information.
Usage:
save_memory(fact="Your fact here.")
save_memory examplesRemember a user preference:
save_memory(fact="My preferred programming language is Python.")
Store a project-specific detail:
save_memory(fact="The project I'm currently working on is called 'ollama-code'.")