// HACKER NEWS — CYBERSECURITY
Looks promising for document editing with your agent
Today, we release Paper Office, a suite of Python packages that allow agents to manipulate Word, PowerPoint, and Excel files with added safety, correctness and breadth, building on legacy open source packages: python-docx, python-pptx and OpenPyxl. Across five models and 61 tasks, Paper packages plus guidance passed 92.5% of trials, versus 80.7% for upstream packages without skills and 69.5% with Anthropic's comparable Office skills. Agents also wrote code to edit Office file internals directly in just 1.6% of Paper runs, compared with 78.7% without skills and 50.5% with Anthropic skills. We note that basic software, in addition to prompt, skills, and tools, remains an important lever for harness optimization.
Agents still have low penetration in the daily work of consultants, lawyers, bankers, and operators. We believe the bottleneck to professional adoption is fidelity to real workflows. Agents dont manipulate existing documents with the same techniques that humans do, and the resulting decks, sheets, and documents sit in an uncanny valley that aren't fit for client consumption.
DOCX, PPTX, and XLSX files use Office Open XML (OOXML): each is a ZIP archive containing XML files, images, and other resources linked together, rather than a single text file. Editing them means keeping those parts and their relationships consistent, so even a small visible change can require updates in several places.
The standard Python Office libraries (python-docx, python-pptx, and openpyxl) are mature construction tools with years of accumulated edge cases, and most production agents often rely on these libraries for doc manipulation. However, they haven't seen updates in several years and, for many important workflows, lack feature breadth and correctness contracts. In some cases, models opt for other Javascript based packages or HTML-to-document processes to more easily represent and manipulate classic office documents, but these intermediate representations are lossy and often corrupt existing, brownfield work.
We forked, patched, and reworked the APIs of the standard Python Office libraries to support a variety of agent-first use cases, improving correctness and expanding feature completeness.
When the package cannot express those operations, the model falls through to wrapper scripts and raw OOXML, polluting its context with package mechanics. This frequently leads to silent regressions in comment anchors, chart workbooks, fields, custom XML, formula dependencies and so on.
Paper Office keeps the familiar imports and extends the packages underneath them. Existing model priors remain useful: import docx, from pptx import Presentation, and import openpyxl still work.
The additions expose hidden structure as typed, machine-readable data, validate targets before supported edits, provide package-preserving save paths, report bounded changes, and refuse explicitly when an operation cannot be handled safely.
paper-docx extends python-docx with document-wide search, tracked edits, comments, composition, and reversible redlines, allowing agents to revise and review existing Word documents using Word's native review model.
The fork also traverses body text, headers, footers, footnotes, endnotes, comments, tracked insertions, content controls, and text boxes through docx.story, with revision views and counts of blind regions it cannot read.