$mdflow agent --write

Let the agent do the filing

It researches, drafts, and files. You stay the editor.

The MDflow Document Log listing recent events, several rows labelled automated with the writing token's name alongside rows attributed to you.
Every automated write, labelled with the token that made it.
$cat the-problem.txt
Every knowledge base rots, because updating it is nobody's job.

It is not that people are lazy. It is that writing the document is the fifth thing on a list of four, and the person who knows the answer has already moved on to the next problem. So the wiki describes a system that stopped existing in March.

An agent is genuinely good at exactly this part: reading what is there, noticing what changed, drafting the update, and putting it where it belongs. It is much worse at deciding what is true. So give it the filing and keep the judgement.

$mdflow agent --loop

The loop

  1. 01

    It reads what exists

    Before writing anything, the agent pulls the current documents so it is revising your knowledge base rather than inventing a parallel one.

  2. 02

    It drafts and files

    New documents go into the folders you defined, named the way the folder description implies. Renames and moves happen as things change.

  3. 03

    You edit

    You read the Log, diff what changed, fix what is wrong, and restore anything you would rather not keep.

$cat folder-description.txt

The folder description is the instruction

There is no separate configuration for what an agent should file where. You describe the folder for humans, and the agent reads the same sentence.

  • The description is the instruction. You write what belongs in a folder. The agent reads that when deciding where a new document goes — the same sentence that makes retrieval work is what makes filing work.
  • One place to change the rules. Filing going somewhere you did not intend? Edit the description. You are not maintaining a separate prompt that has to stay in sync with a folder structure it cannot see.
  • It can reorganise, not just append. Renaming documents and moving them between folders are ordinary operations, so the structure can follow the content instead of calcifying around the first month's guesses.
  • Readable by a human at every step. The output is markdown in folders. If the agent stops, gets switched, or turns out to be bad at this, what is left behind is a perfectly ordinary set of documents.
$mdflow log --actor automated

Why you can hand over write access

Letting software write into the place you keep what you know is a reasonable thing to be uneasy about. MDflow does not answer that with promises about model quality — it answers it by making every automated write visible, diffable and reversible, and access revocable in one click.

  • Every automated write is logged. The Document Log at /log records created, edited, shared and deleted events, with the actor on every row — you for browser actions, automated · <token name> for anything arriving over the API or MCP. Name your tokens and you can tell which agent did what.
  • Click any edit for the diff. An edited row opens a side-panel diff of exactly what that write changed, sourced from version history. You are never left guessing what an agent touched inside a long document.
  • Restore, non-destructively. Version history captures the previous version on every save, whatever wrote it. “Set as latest version” brings an old one forward without discarding the current text — that becomes a history entry of its own, so undoing is never destructive either.
  • An agent can't silently overwrite you. Saves are conflict-aware: a write only replaces the copy it was based on. If you edited the document in the browser meanwhile, the agent's write does not quietly win.
  • Revoke instantly. Access is a Personal Access Token. Do not like what you are reading in the Log? Delete the token and that agent is out — no per-document cleanup, no waiting for a session to expire.
  • Deletions leave a record. A deleted document keeps its who, what and when in the Log even though the document is gone — including documents removed indirectly by deleting a folder.
Clicking an automated edit in the MDflow Document Log opens a side panel showing a line-by-line diff of exactly what that write changed.
Click any automated edit to see exactly what it changed.
$cat example-wiki.md

A small wiki that grew itself

What this looks like over a month, when it works.

  1. Week 1Four folders with descriptions: Architecture decisions, Runbooks, Vendor notes, Meeting notes. Two documents in each, written by hand. The agent gets a token.
  2. Week 2After each design discussion the agent drafts the decision record and files it in Architecture decisions. You rewrite the first two — the third is close enough to keep.
  3. Week 3A vendor changes their auth flow. The agent finds the two runbooks that mention it, updates both, and the Log shows two automated edits. You diff them in about a minute.
  4. Week 4Meeting notes has grown past browsing, so the agent splits it into subfolders by quarter. You publish Runbooks as a shared knowledgebase for the on-call rota.
$mdflow guardrails

Guardrails

The defaults that stop an ordinary mistake becoming an expensive one.

  • Empty writes are refused. Replacing a body with an empty one requires an explicit confirmEmpty=true. A truncated generation cannot blank a document by accident.
  • 500 KiB per document. A runaway write hits a ceiling rather than filling your workspace.
  • Names are disambiguated. A document written into a folder that already has that name becomes (2) rather than overwriting its namesake.
  • 60 requests per minute. A loop that goes wrong is throttled instead of running until it has rewritten everything.
$cat limitations.txt

What it doesn't do

Read this before you rely on the audit trail:

  • Version history is Pro. Without it there is no diff to open and nothing to restore — which removes most of the safety net above.
  • Free accounts see 24 hours of the Log. Events are recorded for everyone and kept 30 days, but only Pro can look back over the full retained history.
  • No approval workflow.An agent's write lands immediately. Review is after the fact, in the Log — there is no queue of pending changes to accept.
  • Token scope is the whole account. A Personal Access Token reaches every workspace. You cannot yet give an agent one folder and nothing else.
$man mdflow-agent --faq

Questions

Is it safe to give an AI agent write access to my notes?
It is a real risk, and MDflow answers it with visibility rather than restrictions. Every write arriving over the API or MCP is recorded in the Document Log labelled automated with the token's name; clicking an edited row shows a diff of exactly what changed; version history restores any previous version non-destructively; conflict-aware saves stop an agent silently overwriting an edit you made in the browser; and deleting the token revokes access immediately.
Can an agent wipe a document by accident?
Emptying a document body is refused unless the caller passes confirmEmpty=true explicitly, so a truncated generation or an empty string does not blank a document by accident. And because version history captures the previous version on every save, a bad write is recoverable on Pro.
How does the agent know where to file something?
From the folder description. You write a sentence or two describing what belongs in each folder, and that description is both the filing rule the agent reads and the ranking signal retrieval uses. Changing where things get filed means editing that description, not rewriting a prompt.
What do I need to pay for?
The API and MCP server require Pro (€4.99/mo), so agent write access is a Pro capability. Version history is Pro too. The Document Log records events for every account and retains them for 30 days, but free accounts can only view the last 24 hours — which is the main practical gap if you run this on the free plan.
Which agents can do this?
Anything that speaks MCP or can make HTTP calls: Claude and the ChatGPT app over OAuth, Claude Code, Cursor, VS Code and the OpenAI Responses API with a Personal Access Token, plus n8n workflows through the community node. Setting each of them up is covered on Share context across agents.
Will the agent read my encrypted documents?
No. Encrypted documents are stored as ciphertext and the key never leaves your browser, so an agent cannot read them, cannot rewrite them, and will not include them in anything it drafts.
$mdflow token --new

Give it the filing. Keep the judgement.

Describe four folders, issue a named token, and read the Log for a week. If you do not like what you see there, deleting the token ends it — and every document it wrote is still ordinary markdown.

Agent write access and version history need Pro, from €4.99/mo. The Document Log records events on every plan; free accounts view the last 24 hours.