Bricks can remember short, durable notes between sessions. Memory is off by default. When enabled, Bricks injects a compact index of active notes into the system prompt at the start of each run and gives the agent tools to list, search, write, update, and delete notes.
The implementation lives in crates/bricks-memory/src/file_store.rs. Conversation history (saved transcripts) is separate and stays in JSONL files (session_storage.rs).
- Markdown files on disk. Each note is stored as a
<id>.mdfile with minimal YAML frontmatter (id,created_at,updated_at, and optionalproject_id/session_id) followed by the note text. Ids look likenote_3f9c1a2b4d5e. - Generated index (
MEMORY.md). Every write, update, or delete atomically regeneratesMEMORY.mdin that scope directory so you can inspect your notes in any editor. - Prompt index. At the start of each run, Bricks injects a compact list of active project and global notes (with their
ids) within the configured token and note limits. Notes beyond those limits stay on disk and are reached withmemory_searchormemory_list. - In-place editing. Updating a note keeps its
idandcreated_attimestamp intact. Deleting a note removes its file and updatesMEMORY.md. - Limits. A note holds at most 280 characters. Writing text that already exists in the same scope returns the existing note instead of adding a copy.
- No automatic capture. Conversations are not recorded into memory. Notes are saved by the agent (
memory_write) or by you, in the desktop app.
Bricks Desktop keeps two scope directories under the Bricks home folder (~/.bricks/memory/):
| Scope | Path |
|---|---|
| Global (shared across all projects) | ~/.bricks/memory/global/ |
| Project | ~/.bricks/memory/projects/<project_id>/ |
Outside Desktop (CLI / SDK), enabling [memory] in bricks.toml stores project notes in <workspace>/.bricks/memory/ and shares ~/.bricks/memory/global/.
When memory is enabled for a run, the agent receives five dedicated tools:
memory_list(read-only): lists saved notes (newest first) with theirids, with optional substring filtering and pagination (20 notes by default, 50 at most).memory_search(read-only): finds notes that contain any of the query's words (case and accents ignored), best matches first, up to 20 results.memory_write(write): saves a concise atomic note (max 280 characters) and returns itsid.memory_update(write): updates an existing note in place byid.memory_delete(write): deletes an obsolete note byid.
Each tool takes a scope (project, the default, or global).
Sub-agents follow their profile's memory setting. By default ([agents] subagent_memory_write = false), a sub-agent only gets memory_search and memory_list. Set subagent_memory_write = true to let sub-agents write by default, or set memory: read_write in a profile. A profile with memory: off gets no memory tools.
Memory can be configured in the [memory] section of bricks.toml:
[memory]
enabled = false
max_index_notes = 200
max_index_tokens = 1500enabledturns the CLI's memory on or off. The desktop app has its own switch, soenableddoes not affect it.max_index_notesandmax_index_tokenslimit the index injected into the prompt. The desktop app reads these two limits frombricks.tomltoo.
In Bricks Desktop, turn memory on or off in Settings > Memory. Its View buttons open the memory view, where you can search notes, edit them in place, and delete them, for either scope. Clearing a scope deletes its notes.