Skip to content

.agent-mem.json

A file named .agent-mem.json in a project’s root changes how agent-mem treats that one project. It can be committed, so everyone who uses agent-mem in the repository gets the same behaviour.

.agent-mem.json
{
"capture": false,
"exclude": ["fixtures/customers/**", "*.sqlite"]
}
KeyTypeEffect
captureboolfalse: nothing from this project is recorded; the project is not even registered
excludelist of globs (at most 100)added to the global exclude_globs for this project: content of matching files is never stored

Nothing else is read. Budgets, models, providers and every other setting can only be changed in the user’s own config.json. A repository you clone must not be able to switch on blocking rules, point the observer at another model or raise limits on your machine.

The project root is the git repository root (the git rev-parse --show-toplevel of the working folder), or the folder itself outside git. A nested repository has its own root and its own .agent-mem.json. See how a folder becomes a project.

WayScope
.agent-mem.json {"capture": false}this repository, for everyone using agent-mem in it
"excluded_projects": ["/path/to/repo"] in config.jsonthis path and everything below it, on your machine
agent-mem pause [--for 2h]everything, for a while
<private>…</private> in a prompt or filethat text
AGENT_MEM_DISABLE=1 in the agent’s environmentevery hook of that agent process

Already recorded data stays until you delete it: agent-mem purge --project <root>.