Agents Attacking Documents with CRDTs

A team of small agents writes code against a thin library to surgically edit the document tree, streaming their changes in as human-looking CRDT peers.

One of my first tasks at Macro: make it possible for AI to edit documents across the platform. Or, put less generously, create swarms of agents that come in and attack your documents with requested changes while you are mid-edit.

A Macro document titled Hello World Doc with the text 'hello world' being typed by a labelled cursor reading 'Wolf (AI)'
To the rest of the document, an agent is just another peer with a name and a cursor.

Macro documents are a tree, not flat Markdown, and they sync live between peers with CRDTs. Our first pass let an LLM swap whole top-level blocks with generated Markdown. It was far too coarse — it either rewrote much more than you asked for or missed the point entirely — so we un-shipped it.

The second version hands agents an XML lens over the tree instead. A supervisor reasons about what needs to change and dispatches cheap, fast writer agents that emit tiny mutations against a thin library. Those operations get chopped into keystrokes and streamed to everyone on the document, so an edit arrives looking like a person typing rather than a block being replaced.

Macro is open source, so you can also just read the AI editing worker.

Let's get started.

It takes 30 seconds to connect your inbox and bring messages, docs, tasks, calls, and agents into shared memory.

Get started
Chroma
Saturation
Contrast

Macro

Bleach

Machine

Basalt

Macro

Satsuma

Hotwire

Lime

Recurse

Paal

Magick

Null

Void