The basic agent memory guide puts it simply: memory is “literally a set of text files”. While there is one agent and one task, that is enough. When there are several agents and they run for months, text files turn into a dump: nobody — including the agent itself — remembers what lives where, what is outdated, or how a decision relates to a conclusion. Advanced practitioners run memory through Obsidian — a local knowledge base with cross-links and instant search. This piece breaks down the anatomy of such a memory using a 24/7 loop as the example: vault structure, the agent’s work cycle, git-based backup, and knowledge-base hygiene.
Why Obsidian and not just a folder of files
Obsidian is a local knowledge base built on markdown files: wiki links between notes, tags, search across the entire vault, and a graph of connections. The app is free for personal use, and the data is ordinary files in a folder, with no proprietary format. For agent memory that means three advantages. First: files stay files — the agent reads and writes them with its standard file tools, no integration required. Second: structure and connections — a human makes sense of the memory visually, via backlinks and the graph. Third: search finds what you need in seconds; the path:, tag: and file: operators narrow the selection to a folder, a tag, or a file name.
No cloud dependency: the base sits on your machine or your server, and the privacy of the full loop is preserved. The rules for handling sensitive data in a local loop are collected in the piece on local tools for sensitive data.
Tina Huang’s practice: “experienced users upgrade their memory system with programs like Obsidian” — that is the standard of an advanced around-the-clock agent loop. The knowledge base of an agent stack is kept in the same tool as personal notes: one space where an insight from the agent’s work is findable with your usual search.
Vault structure: five memory folders
A working structure from practice — five folders with clearly assigned roles:
Vault/agent-memory/
├─ profile/ # who I am, how to work with me (for the agent)
│ ├─ user.md
│ └─ rules.md
├─ projects/
│ ├─ project-A/ # state, decisions, open questions
│ └─ project-B/
├─ processes/ # workflows and skills in text form
├─ journal/ # dated session entries
└─ insights/ # accumulated findings and patternsThe agent writes to the journal and the insights folder on its own: after each session — a dated entry covering what was done, what was decided, and what was taken into account. The human edits the profile and the rules — slowly changing documents, and precisely the ones that set the agent’s frame. Wiki links tie the entries together: a decision on project A references an insight pattern, the pattern references a source. A month later the graph shows the evolution of decisions — a history that bare session context does not have: context resets, the graph stays.
File names are part of the mechanics, not aesthetics. Journal entries start with a date in the “2026-11-21” format: sorting by name yields a chronology, and the agent can tell how fresh an entry is from the file name alone. A note template keeps entries uniform: three headings — “What was done”, “What was decided”, “Open questions” — plus a link to the project page. Uniform entries can be compared: a month in, you can see which open questions have been hanging for weeks — a ready-made topic for a retrospective task.
The agent’s work cycle: read, write, retro, search
- Read before the task: profile + project page + the latest insights — the “head” of the context is assembled from the base, not from what the model happens to remember. The session prompt references specific vault files.
- Write after the task: a journal entry and an update of the project page — the memory.md/task.md pattern from the Productivity Cowork plugin: the agent maintains a memory file and a task file for every project.
- Update insights: a weekly retrospective task — the agent itself proposes process improvements. The cycle “does — records — analyzes — proposes” turns months of work into accumulated experience instead of a pile of logs.
- Search when questions come up: “what did we decide about X?” — the agent searches the base instead of straining to recall from memory. The path: and tag: operators narrow the selection to the right folder or tag.
The prompt that starts the cycle is short: “Open the profile and the project page in the vault, carry out the task, then add a journal entry and update the open questions.” Everything else — permissions, schedule, entry format — is configured once; every day the agent starts by reading the base and ends by writing to it. That is how memory stops depending on what the model “remembers”: a session always starts from the same state of the base, not from scraps of past context.
For automatic selections, the Dataview plugin comes in handy: the query goes into a code block with the dataview language, and the plugin turns it into a table right inside the note. A query for a journal digest:
TABLE file.mtime AS "updated"
FROM "agent-memory/journal"
SORT file.mtime DESC
LIMIT 10Such a note always shows the ten latest journal entries with their edit dates — the morning digest assembles itself, with no agent involved.
Backup: git instead of the cloud
A vault is an ordinary folder, so the backup is three git commands, run once and then on a schedule:
cd ~/vault/agent-memory
git init
git add -A
git commit -m "Knowledge base state"Automation is one line in crontab on Linux or macOS — a nightly commit at 22:00:
0 22 * * * cd ~/vault/agent-memory && git add -A && git commit -m "auto-backup"On Windows, Task Scheduler does the same job with a git commit command — the mechanism is identical. The commit history is version control for memory: a failed reorganization that the agent carried out on its own initiative is rolled back like an ordinary commit. Sync between machines goes through a private repository on your server or in your own cloud; Obsidian also offers a paid official sync. The main rule: the knowledge base lives only on your servers or private clouds — no “convenient public options”.
Knowledge-base hygiene: five rules
- One note, one topic: an “everything-in-one” dump kills both search and the agent’s context — instead of structured information it gets unconnected text.
- Dates in journal names: the format “2026-11-21 billing review” gives you a chronology without any effort.
- Page size limit: a long page is unstructured context for the agent; split it into child notes and connect them with links.
- Secrets stay out of the base: keys and passwords do not live in markdown memory — they get a secrets manager. What goes into which “bucket” under this division is covered in the piece on the rules file, skills, and hooks.
- Backup: the base in git or on a sync — losing the vault means losing months of the agent’s work.
Frequently asked questions
Can an agent handle Obsidian? The agent does not need Obsidian: it works with the vault files directly, as with an ordinary markdown folder. The shell with the graph and search is for the human; the agent sees the same files you do, so no divergence arises.
Obsidian or just a folder of files? One agent with one task — a folder is enough. Several agents and months of work — Obsidian pays for itself with structure, links, and search. The move is reversible: a vault is an ordinary folder, nothing needs converting.
Do agents conflict when writing? With sequential work and a backup, conflicts are rare. For parallel agents — separate subfolders by role and git merges where they overlap: the commit history shows who wrote what, and when. Persistent write conflicts are a sign that the team needs a coordination model, not a different editor.
What about privacy? The vault is local — the full privacy loop is preserved; sync goes only to your servers or private clouds. If your loop calls cloud APIs, check in advance which providers log prompts: memory in a vault does not protect you from logs on the API side.
Obsidian turns agent memory from a file dump into a managed knowledge base: folder structure, wiki links, search with operators, history in git. For a 24/7 loop with several agents this is the advanced-level standard. Action for today: create a vault with the five folders from the diagram, move the profile and the rules into it, and add one line to the agent’s system prompt — “after the task, write an entry in the memory journal”. The practice is current as of fall 2026.
