Skip to main content
This is where the things you want remembered go in, and where they come back out. base learn and base decision log write; base recall and base decision search read. base changes is the append-only log of every successful write. base graph is the maintenance layer underneath all of it, plus the natural-language and node-walking retrieval built on top.
Four commands on this page remove data: base decision delete, base memory purge, base graph purge and base graph compact. base graph move rewrites two graphs. Read each one’s note before you run it, and use the preview where there is one.

base learn

Store a note in the graph, linked to a domain and optionally to a project or an entity. This is the general-purpose write: an insight, a correction, a commitment, a change of direction.
--mention is the one people miss. It records that a note came up again, incrementing its mention count and stamping when it last happened, which is useful for spotting the things you keep running into. It does not protect a note from base graph purge --stale. That reads lastRead, and only an explicit base recall writes it. Verified from source at 0ace1ba.

The memory block at session start

Session start shows Claude your active notes in a <base-memory> block: corrections first, then the rest by type, newest first in each. These are the notes base learn --list lists, from the workspace you are in. The block has its own budget, [budget] memory_chars, 4,000 characters by default. It prints whole notes only and stops at the first one that does not fit, so no note arrives cut in half. When some are left out, the last line counts them and names the command that lists them all:
The 0.15 installer wrote [signal] max_chars = 2000, which held these notes, with a few other items, to 2,000 characters. 0.16 does not read that setting, so the update removes the installer’s value and Claude gets up to 4,000. A different value you set yourself moves to [budget] memory_chars. To set a lower limit again, run base config set budget.memory_chars 2000.

base recall

Search stored notes by text, by domain, or by exact slug.
Run this before assuming something was never written down. It searches notes only, and decisions have their own search.
base recall writes, despite being a search. It stamps lastRead on every note it returns, and that timestamp is the one base graph purge --stale measures against. So recalling a note protects it from the next purge. Injection during a turn does not do this: only the explicit command writes, deliberately, so the hot path never pays for a graph write.

Decisions

A decision is a note with a reason attached and a stable address. It is the right shape for anything you will be asked to justify later. base decision carries -g / --global on the command itself, before the verb. base d is the short alias.

base decision log

Record a decision and the reasoning behind it.
The rationale is not optional, and that is deliberate. A decision without its reasoning cannot be revisited, only obeyed or ignored. Find prior decisions by keyword, with their reasoning.

base decision show

Show one decision by its {domain}.{decision} slug: its name, domain, rationale, recall text, status, keywords and dates.
A slug it cannot find exits 1 and names what it tried.

base decision update

Change a decision in place, addressed by its slug.
The argument is the {domain}.{decision} slug, or the exact decision text. Updating in place is almost always better than deleting and re-logging: it keeps the address, and the edges pointing at it. Keywords decide when a global decision reaches a prompt. A decision filed under an always-on domain such as GLOBAL used to ride every prompt, whatever the prompt was about. Now it reaches a prompt only when the prompt contains one of its keywords, as whole words with case ignored (so port does not match support), and then once per session. A global decision with no keywords is shown at session start only. Decisions of ordinary domains are unchanged: they come with their domain. A superseded decision is never served.

base decision delete

Destructive, no preview. Delete every decision matching a keyword.
There is no dry-run. Run base decision search --keyword "docs" first and read what comes back, because that is the set this will remove.

base changes

Read the change log: every successful graph write, as JSON.
The cursor is a byte offset into the log, not a sequence number. That is why it needs no separate counter, survives several writers appending at once, and is the exact value a reader resumes from: take the cursor, do your work, then ask for everything since.

Graph maintenance and retrieval

base graph is the layer under the graph itself. The maintenance verbs are atomic and take a snapshot before they write. Never hand-edit graph.nq.

base graph compact

Destructive. Deduplicate and canonicalize the workspace graph, as a single atomic rewrite. It snapshots first.
There is no preview. The snapshot is the safety net, and a snapshot you have not checked is not a plan, so know why you are compacting before you do.

base graph supersede

Record that one record replaces another: base graph supersede <old> <new>.

base graph migrate

Give every covered record a domain link, once, per tier. It normally runs itself at session start; run it by hand when base doctor reports a tier “not migrated”, after repairing that tier.
Without --yes it writes only the domain links and prints the repair plan. The repair moves records that belong to another workspace, links each correction to the one record it names (a correction that names no single record stays a correction), compacts the graph and keeps the newest three backups ([graph] keep_backups). See base doctor.

base graph purge

Destructive. Preview by default. Remove notes that have gone unread past a threshold.
The clock is recency only: a note’s age resets every time it is recalled. So this removes what you have not needed, not what is old.

base graph move

Destructive. Preview by default. Move a subgraph from one registered workspace’s graph to another. It rewrites the stamp that says which graph a node belongs to, backs up both tiers, and rolls back if anything fails.
--no-ast is usually what you want when the destination will be synced anyway: code entities regenerate from source in seconds, and moving them carries stale paths across.

base graph apply-ops

Apply inbound fact operations, read as JSON on standard input. This is the receiving half of syncing a graph from somewhere else.
It accepts either a bare array of operations or an object with an ops key, applies every assert and retire in one transaction, and prints how many were applied, skipped as duplicates, and skipped as unknown. If any operation is invalid it exits nonzero having applied none of them, so a partial write is not a state you can end up in.

base graph extract

Run a language-model pass over a corpus of documents and write the concepts and edges it finds into the graph.
Markdown only, by default. PDF, image, audio and video need multimodal enabled, either permanently with base config set multimodal.enabled true or for one run with --multimodal. The one-shot flag bootstraps the tools it needs the first time it is used.

base graph query

Ask the graph a question in plain language. It retrieves the relevant subgraph and synthesizes an answer.
Use --raw when you want to check the retrieval rather than read the summary. If the right nodes are not in the raw output, the answer was never going to be right, and the fix is a wider --depth or a better question.

base graph analyze

Show the emergent structure of the graph: the nodes everything connects to, the clusters, and the connections you would not have predicted.

base graph get-node

Show one node in full: its label, type, source, summary and edges.
The argument can be a node label, a concept slug, or a substring unique enough to identify one node.

base graph neighbors

Show a node’s neighborhood as edge lines, expanded a given number of hops.

base graph path

Show the shortest path between two nodes.
Both arguments take a label, a slug, or a unique substring. This answers “how are these two things related at all”, which is a different question from either node’s neighborhood.

Flat-file memories

Some memories live as files rather than in the graph. These two commands are for reviewing them and cleaning up the ones the graph already holds.

base memory list

List the flat-file memories on this machine: name, type, description and path.

base memory purge

Destructive. Remove flat-file memories that have been confirmed as present in the graph.
Run base memory list first. This only removes files whose content the graph already has, but it removes them without asking.