BlogEngineering
In-Housing the Microsoft Office Suite for Agentic-Native Development

A good deck, model or memo asks a lot of an agent. It has to read everything in the file it was handed: the speaker notes, the data behind each chart, the comment thread and the tracked change from the last round. It has to see the page the way the reader will, so it knows when a title runs out of its box. And it has to change one number while leaving everything else exactly as it was, keep every formula live, stay inside the firm's template, and show where each figure came from.
Our early harnesses gave the agent fixed tools, and later code against existing Office libraries. Each one reached part of the format and hid the rest, and the agent's work was only as good as the part it could reach. The only solution we found was to rebuild Office ourselves, from the file format up: engines that read, lay out, render, calculate, compare and save Word, Excel and PowerPoint files, with every one of those steps exposed as code the agent can call.
The same engines run the editors inside Verra, so a person can open a deck the agent is working on, type in it, and watch both sets of edits merge. We wanted that too, but it came second. We built the engines so the agent would have every tool it needs, and a way to check its own work.
This post covers how the pieces fit, what we built on them, and how our agent did against five other AI tools on 95 consulting tasks.
How the Pieces Fit

There are two engines: one for Word and PowerPoint, and one for Excel. Both are written in Rust, so the same code runs everywhere a file is touched. In the browser, the Word and PowerPoint engine is compiled to WebAssembly and powers the editor. In the agent's sandbox, the agent reaches both engines from Python and edits a file by writing a short script against them. Between the two sits a pool of document hosts, which keeps one live copy of each open file and merges edits from every browser tab and from the agent. Every save becomes a new version, compared with the one before.
The main design decision is that each format has a single implementation. The editor a person types in, the render the agent checks, the PDF the client receives and the diff in version history all come from the same code, so they can't disagree about what's in the file.
Word and PowerPoint
Word and PowerPoint files are both zip packages of XML parts with much of their structure in common, so they share one engine:

The engine is a pipeline. It reads the package into a document model, lays the model out into pages or slides, and turns each one into a display list: a flat list of positioned text, shapes and images. The display list is the contract between the engine and everything that draws. The browser paints it, the server rasterizes it and PDF export writes it out, so the page the agent checks is the page the reader sees.
That also makes the agent's self-check cheap. After every save, the engine looks at the slides that changed and reports anything the edit broke, such as text running out of its box or a picture covering text. Problems that were already in the file aren't reported, so the agent fixes its own mistakes, not the template's.
Layout is where matching Office is hardest, so Office itself is our test oracle: we export test files from Word and PowerPoint, measure where everything lands, and pin each rule we find with a test. Layout is also incremental. An edit lays out again only the content around it, which keeps typing responsive even at the end of a long document.
Review state is part of the document model, not a layer on top of it. A tracked deletion is text marked deleted, and a comment is anchored to a range of text, so Accept, Reject and undo behave the same for every editor, the agent included. Compare builds on the same model: it diffs two versions and writes the result as tracked changes, the way desktop Word does.
We timed the engine against desktop Word and PowerPoint on the same files. It was faster than PowerPoint at every operation we measured, and faster than Word at exporting PDFs:

Our Spreadsheet Engine
A workbook is closer to a program than a document: thousands of formulas that have to stay correct after every edit, from every editor at once. So Excel got its own engine, built around a dependency graph instead of a layout pipeline:

The engine runs as its own process, and everything that touches a workbook goes through it: the agent's Python client, the live session behind each open grid, and previews. A workbook is read once into the engine's store, and each batch of edits is applied atomically as a new revision. That gives everyone editing a workbook, people and the agent, one agreed order of changes.
The dependency graph records which cells read which and stays in memory between edits, so a change recalculates only what's downstream of it. That's what lets the agent change an input and see every total it moved before it answers, the check a library that writes formulas without calculating them can't give. Excel is the oracle here too: we test our function results against Excel's on tens of thousands of cases.
On export, the engine rewrites only the parts of the workbook that changed and leaves the rest alone, so everything an edit didn't touch comes back exactly as it was. Against the library it replaced:

Co-Editing With the Agent
With the engines owning the file, we could add multiplayer editing like Google Docs: everyone in the same file at once, with the agent as one more editor.

Word and PowerPoint documents are CRDTs, data structures whose copies converge on the same state whatever order edits arrive in. Each browser tab and the document host hold a copy. A keystroke goes to the host as a small update, and the host merges it and passes it on to every other tab, so two people can type in the same paragraph without losing each other's characters.
Spreadsheets use a different model. A single session per workbook puts every edit in one order, the same order as the engine's revisions, and adjusts an edit made against an older revision for the rows, columns and sheets that moved since, in the style of operational transform.
The agent doesn't get a separate path. Its saves reach an open file as the same kind of update a browser tab sends, so they merge with people's typing and appear live, attributed to the Assistant, with a marker showing where it's editing. Open files live on their own pool of hosts rather than on the API servers, so a backend deploy doesn't reconnect every open document.
One Request, End to End
Here's how the pieces combine on one request: a four-slide revenue quality deck for Kittredge, in the Kensal Row template. The agent opens the template through the engine and builds the slides from its layouts and theme. Charts go in as native chart parts, each with its own embedded workbook, so they stay editable in PowerPoint. After each save it gets the edit report and renders the slides, and its summary says it checked the plotted figures and the rendered layout. The save becomes version 1, and the deck opens in the editor beside the chat:

A model goes through the spreadsheet engine instead. Here the Wicklow investment committee model is open with five co-authors. When the agent edits it, the session puts the agent's batch in order with everyone else's edits, the dependency graph recalculates what the batch affects, and every open tab gets the new values:

Benchmarks
We wrote our own benchmark, so the tasks would look like consulting work and no product could have trained on them. It has 95 tasks at a fictional firm, Kensal Row: 30 each for PowerPoint, Excel and Word (10 create, 15 edit and 5 read), and 5 that carry one change through a model, a deck and a report. Most start from dense files, such as a 30-slide deck with 10 charts or a 13-sheet business case model.
Each product got the same files and instructions in a fresh session, and our agent ran on the production release. We opened every delivered file in desktop Office and ran deterministic checks on it: that it opens without a repair prompt, that its figures match the source, that its formulas recalculate when an input changes, and that nothing outside the requested change moved. Two AI graders from different vendors, Claude Opus 5.5 and gpt-6-astra, scored renders of each file blind, with a weighted kappa of 0.84 between them. A task's score is half checks and half graders, out of 100.
Ten tasks ran four times for every product, which gives each product a run-to-run range, and we count a gap between two products as real only when it's bigger than both ranges. Claude Code and ChatGPT both ran on gpt-6.1-sol at medium reasoning effort, so the difference between them is the harness. We also ran Antigravity (Gemini 3.1 Pro), Reducto Office (inside ChatGPT, at its default low effort) and Genspark. Gamma finished only part of the PowerPoint set, so it isn't in the charts.


Summary
Owning the formats end to end gave our agent what the libraries couldn't: the whole file as an object model, every page rendered the way the reader will see it, and a check after every save. The same engines gave people full editors, where they work alongside the agent in real time. On our benchmark, that came out as the highest mean score of the six products in all three apps, and the most consistent from run to run.
There's plenty left to do, from layout rules we haven't matched yet to more of Excel's functions, and the engines change every week. But the foundation is in place for what we set out to build: an agent that does real work in the files a firm already runs on, and hands back something ready for the client.


