Docs menuMemory

Docs / Memory

Memory

Save decisions and constraints so a later session can find them.

What it is

Flanner Memory stores decisions, constraints and facts about your project so a later agent session can find them without asking you again. For example: why you chose a database, which approach was rejected, or how the staging environment is set up.

Each memory is a Markdown file under .flanner/memory/, which you can read and diff. The first save adds that folder to .gitignore, so memories stay out of commits unless you remove the line. The database is an index over those files. If it is lost, flanner mem rebuild restores it from the files. See also Flanner Memory.

Commands

flanner mem remember "Postgres over SQLite: we need concurrent writers" --category decision

Saves one memory as a Markdown file, titled from its first line. --category is required.

flanner mem recall "why postgres"

Searches memory and says why each result matched.

flanner mem mode

Shows this project's capture mode and where it came from. Give a mode to change it.

flanner mem pending

Shows what is waiting on you, with the id to approve or reject.

flanner mem rebuild

Rebuilds the catalog and the search index from the files. The files are the record.

The full list is in the CLI reference.

Tags and related memories

New in flanner 0.13.0.

A tag says what a memory is about, such as auth or billing. Add tags when you save, or change them later. Changing a tag keeps the memory's id and text, and the change is recorded in its history.

flanner mem remember "Tokens rotate daily" --category fact --tag auth

Saves the memory with a tag.

flanner mem tag ID billing --remove auth

Adds and removes tags on a memory you already have.

flanner mem list --tag auth

Shows only memories with that tag. recall takes --tag as well.

flanner mem show ID --related

Lists connected memories and why each is there.

A memory is related when it corrected this one or was corrected by it, when it comes from the same file or plan, or when it shares tags. Only memories from the same project, or your personal ones, are shown.

A normal search also matches tags. Tags stay on your machine: sharing a memory sends its text, not its tags. Your agent can do all of this with memory_tag, memory_tags and memory_get.

Capture modes

off

Nothing is captured. Recall still works on whatever is already there.

explicit

Only what you ask for, by hand or by telling the agent to remember it.

suggest

An agent proposes what it thinks is worth keeping. Nothing is stored until you approve it. The default.

auto_safe

The agent stores decisions and constraints on its own, still refusing secrets. Only where the machine-wide policy allows it: a project cannot turn it on by itself.

Set with flanner mem mode <mode>, which writes the project's .flanner/memory-policy.yml. That file may only tighten the machine-wide ~/.flanner/memory-policy.yml, never loosen it, and flanner says so when a mode you set does not take effect.

What your agent can do

16 of the 21 memory operations are MCP tools, so your agent can save and search memories while it works. The rest stay with you.

ActionAgent

Save a memory

memory_remember

Takes topic tags as it saves.

MCP

Search memories

memory_recall

Can be narrowed to memories carrying given tags.

MCP

Read one memory in full

memory_get

Can list related memories, each with the reason it is related.

MCP

Browse memories

memory_list

MCP

Correct a memory

memory_supersede

MCP

Tag a memory, or change its tags

memory_tag

MCP

See the tags in use

memory_tags

MCP

Stop recalling a memory

memory_forget

MCP

Suggest a memory for approval

memory_consider

What an agent noticed itself. It waits for a person unless policy keeps it.

MCP

See suggestions waiting

memory_pending

MCP

Approve or reject a suggestion

memory_decide

An agent relays what the user decided. Categories the policy says a person must approve are refused through the agent.

MCP

Read the capture policy

memory_policy

MCP

Write a policy file

flanner mem policy init

The file decides what your agent may keep. The agent must not write its own limits.

You

Change the capture mode

flanner mem mode

Decides how much your agent may capture. Letting it widen its own permission defeats the setting.

You

Attach or remove a file

memory_attach · memory_detach

MCP

Open an attachment

flanner mem open

Opens a file in your own applications, which only makes sense where you are.

You

Share a memory with the team

memory_share

MCP

Ask peers to stop recalling a shared memory

memory_withdraw

MCP

Bring back a forgotten memory

request_action

An agent only asks, with a preview. You apply it with `flanner actions apply`.

MCP

Rebuild the index from the memory files

flanner mem rebuild

A repair over your whole store. It belongs where you can watch it run.

You

Delete unreferenced attachments

flanner mem gc

Removes files from disk. Nothing that deletes runs unattended.

You

The split follows three rules: an agent never authorises itself, anything that deletes or repairs files stays where you can watch it, and everything an agent needs mid-task is exposed. The full tool list is on the agents page.

What it will not store

Secrets. Anything that looks like an API key, token, private key or password is refused before it is written, whether you typed it or an agent proposed it. The same check runs on anything a teammate sends you.

Anything you did not approve. In suggest mode, an agent proposes and you approve. Personal memory is never shared with anyone.

Memories are context an agent reads, not instructions it follows.