Building an Agent for Complex Document Drafting and Editing – Harvey

How we designed an agent that iteratively builds a Word document in memory.

Epigram

Much of legal work happens inside Microsoft Word documents. Lawyers draft, revise, and circulate .docx files, often exchanging multiple rounds of redlines before a document is finalized. For Harvey to fit naturally into this workflow, its edits must be high-quality, low-latency, and preserve the document’s formatting and structure.

In September 2025, we shipped full document editing in the Harvey for Word Add-In. As we pushed to support more complex editing capabilities, we reached clear limitations with the existing full document editing system. This post explains what broke in the original system, the architectural shift we made, and the key capabilities it unlocked.

To read the article in full, click here.

At Harvey, we’re transforming how legal and professional services operate end-to-end — and we’re just getting started.