Memory

Kilo Memory lets Kilo remember useful details about a project across sessions, so you do not have to repeat decisions, constraints, environment setup, or corrections. It is opt-in and scoped to one project.

â„šī¸Opt-in and project-only

Memory is disabled by default. Enable it per project. Kilo stores project memory only; personal or user-level memory is not supported.

📝Not the deprecated Memory Bank

Kilo Memory is separate from the deprecated memory bank. The memory bank used rule files under .kilo/rules/memory-bank/ and is replaced by AGENTS.md.

What memory stores

Kilo keeps memory in three Markdown source files plus saved session digests:

SourceContains
project.mdProject facts, decisions, constraints, and open questions
environment.mdCommands, paths, and tooling details
corrections.mdCorrections to earlier memory
Session digestsShort summaries of prior sessions

Each entry is a saved key-value note. Memory is saved per repository, so linked git worktrees share the same project memory.

These files live in a per-project folder under Kilo's global data directory: <data>/memory/<project-slug>-<sha1-12>/. On typical systems <data> is ~/.local/share/kilo (respecting XDG_DATA_HOME if set), so the folder is ~/.local/share/kilo/memory/<project-slug>-<sha1-12>/.

Alongside the three source files, the folder holds a sessions/ directory with saved session digest Markdown files, plus internal index and state files that Kilo manages automatically and that you should not edit by hand.

Enable memory

Enable project memory in Settings → Context with the Project memory switch. The same section shows the storage location, an Inspect button, and an Auto-save project memory switch.

You can also run /memory on in chat, or use the Command Palette command Kilo Code: Toggle Project Memory.

Automatic memory (auto-save)

When memory is enabled and auto-save is on, Kilo reviews completed turns and saves project facts and session digests automatically. Auto-save is on by default.

  • Auto-save sends best-effort-redacted turn context to your configured model provider. Disable it with /memory auto off or the Auto-save project memory switch.
  • Automatic saves only add or update memory. They never delete it.
  • Secret-like content is filtered before it is written. Session digests are redacted, and project memory entries that match common secret patterns are discarded.
  • Kilo throttles auto-save, so not every turn triggers a save.

Explicit saves are not throttled.

Explicit memory

Use explicit commands when you want to control what is stored:

CommandEffect
/memory remember <text>Save a project memory note
/memory correct <text>Save a correction to project memory
/memory forget <query>Remove matching project memory

Kilo can also manage memory itself through two tools:

ToolPurpose
kilo_memory_saveSave, correct, or forget memory when you ask Kilo to remember or update something
kilo_memory_recallSearch saved memory for details that are not in the injected index

Both tools ask for approval by default. Recall can be allowed always; saving asks each time.

How memory is used

At the start of a session, Kilo injects a compact memory index that summarizes what is stored. The index is a summary, not the full memory store, so Kilo can call kilo_memory_recall to fetch exact details on demand.

Recall supports four modes:

ModeUse
searchSearch saved project memory and session digests
typedSearch saved project memory only
digestRead saved session digests
catalogList stored memory entries and session digests

Memory is context, not instruction. Current messages, repository files, and AGENTS.md take precedence over saved memory.

Command reference

The /memory command is also available as /mem.

CommandDescription
/memory onEnable project memory
/memory offDisable project memory
/memory statusShow the storage location and a stored memory overview
/memory showShow stored project memory
/memory remember <text>Save a project memory note
/memory correct <text>Save a correction to project memory
/memory forget <query>Remove matching project memory
/memory auto on|offTurn automatic memory saves on or off
/memory inspectReveal the project memory folder
/memory rebuildRebuild the memory index from source files
/memory purge confirmDelete all project memory files

Storage and maintenance

Kilo stores project memory outside your repository, under Kilo's global data directory in a per-project folder (see What memory stores). Run /memory inspect to reveal the exact folder for the current project.

  • Rebuild regenerates the memory index from the source files. Use it if the index looks stale or incomplete.
  • Purge permanently deletes all project memory files. It requires the explicit confirm argument: /memory purge confirm.

Privacy

  • Memory is stored locally and scoped to one project. Personal or user-level memory is not supported.
  • Secret-like content is filtered before it is written. Session digests are redacted, and project memory entries that match common secret patterns are discarded.
  • Auto-save sends best-effort-redacted turn context to your configured model provider. Turn it off with /memory auto off if you do not want automatic captures.
  • Disabling memory stops injection, recall, and automatic capture. It does not delete stored memory.