Skip to content

BlogEngineering

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

Column chart of mean task score by app, 0 to 100, 30 tasks per app. PowerPoint: Verra 89.6, Claude Code 81.4, ChatGPT 87.6, Antigravity 60.3, Reducto Office 80.6, Genspark 62.0. Excel: Verra 91.9, Claude Code 86.4, ChatGPT 77.4, Antigravity 55.5, Reducto Office 82.9, Genspark 73.3. Word: Verra 89.9, Claude Code 89.3, ChatGPT 88.9, Antigravity 63.2, Reducto Office 84.6, Genspark 81.3.

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

Architecture diagram, How the Pieces Fit. Browser: Word and PowerPoint editors (the engine in WebAssembly, painting on a canvas, holding a replica of the shared state) and the Excel grid (sends edits to the server; charts drawn in WebAssembly). Document pool: a document host per open file, holding its live copy, with a Word and PowerPoint replica that merges every edit or a spreadsheet session that puts every edit in one order. Agent sandbox: the agent's Python script, the same engines through Python bindings, and an edit report that renders, recalculates and checks what changed. Storage: versions and diffs, every save kept and compared with the one before, and PDF export. Backend: the agent loop, with model calls, tools and permission prompts. Arrows: browser tabs to the document host over a WebSocket, the sandbox's agent edits to the pool, the pool's checkpoints to versions, and the agent loop running the sandbox's commands.

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:

Diagram, Inside the Word and PowerPoint Engine. Top to bottom: file in (.docx and .pptx; old .doc and .ppt converted by our own importers); package layer (zip parts and relationships; every chart keeps its own embedded workbook); document model (text as shared state, so edits from anyone merge; tracked changes and comments live on it); layout (shaping, line breaking, pagination and autofit, measured against Word and PowerPoint); display list (positioned text, shapes and images); then three outputs: a canvas in the browser, a raster on the server and PDF export. Built on it: a diff engine that compares two versions and drives version history and Compare, and the edit report, which checks each agent save for text past its shape, text over text and pictures over text.

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:

Bar chart comparing our Word and PowerPoint engine with desktop Word and PowerPoint, time per operation, lower is better, each row scaled to Office's time. PowerPoint, 100 slides: open, Office 197 ms and ours 127 ms, 1.6 times faster; export to PDF, 4.25 s and 370 ms, 11.4 times; export every slide as PNG, 2.48 s and 1.43 s, 1.7 times; open, edit one text box and save, 356 ms and 273 ms, 1.3 times. Word, 23 pages: export to PDF, 1.06 s and 350 ms, 3.0 times. Word, 322 pages: export to PDF, 16.48 s and 9.21 s, 1.8 times. Median of five runs on the same files.

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:

Diagram, Inside the Spreadsheet Engine. Three clients send requests to the engine: the agent sandbox (a Python client, one command per batch of edits), the live editing session (one per open workbook, shared by every tab) and previews and renders (read-only opens). Inside the engine: import (.xlsx and old .xls read once into the store) feeds the workbook store (cells, formulas and styles; each batch of edits is a new revision), which feeds export (rewrites only what changed; everything else stays as it was). Changed cells go from the store to the dependency graph (which cells read which, kept in memory between edits), then to the scheduler and evaluator (recalculates only what an edit affects; results tested against Excel), whose new values go back to the store. Beside them, what-if: data tables rerun through only the cells that depend on their input.

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:

Bar chart comparing our spreadsheet engine with the library it replaced, in seconds, lower is better, on 100,000 rows by 20 columns. Read every value: the library 12.4, our engine 7.3, 1.7 times faster. Write and save: 11.7 and 5.0, 2.3 times. Open, edit 1,000 cells and save: 21.5 and 6.5, 3.3 times. Open and save a 30 MB workbook: 98.4 and 28.8, 3.4 times. Our engine also recalculates on every save, and is slower at styling 10,000 cells, 0.39 seconds against 0.17.

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.

Sequence diagram, Co-Editing, Step by Step, for a Word or PowerPoint file open in two tabs while the agent edits it. Lifelines: browser tabs, document host, agent sandbox. 1: a person types, and each keystroke goes to the host as a small update. 2: the host merges it and sends it to every other open tab. 3: a command starts in the sandbox, and the file it opens includes everyone's typing so far. 4: the command ends, and the script's saves arrive at the host as the same kind of update. 5: the host merges them as the Assistant's and sends them to the tabs, with a marker where it edited. 6: the host saves a version per agent turn or editing burst, compared with the one before. Excel follows the same steps, except that the host is a spreadsheet session that puts edits in order and rewrites an edit made against an older revision through the row, column and sheet moves since then.

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:

The PowerPoint editor beside the chat: a four-slide Kittredge revenue quality deck in the Kensal Row template, with slide thumbnails, a ribbon and version 1, and the agent's summary saying it checked the plotted figures and the rendered layout.

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:

Our spreadsheet editor with the Wicklow investment committee model open, five co-author markers in the header and a saving status.

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.

Column chart of mean task score by app, 0 to 100, 30 tasks per app. PowerPoint: Verra 89.6, Claude Code 81.4, ChatGPT 87.6, Antigravity 60.3, Reducto Office 80.6, Genspark 62.0. Excel: Verra 91.9, Claude Code 86.4, ChatGPT 77.4, Antigravity 55.5, Reducto Office 82.9, Genspark 73.3. Word: Verra 89.9, Claude Code 89.3, ChatGPT 88.9, Antigravity 63.2, Reducto Office 84.6, Genspark 81.3.Dot chart, Consistency Between Runs: each product's four run means on the same 10 tasks, and its consistency, 100 minus the gap between its best and worst run, higher is steadier: Verra 98.7, ChatGPT 97.7, Claude Code 97.1, Antigravity 96.7, Genspark 88.8, Reducto Office 88.7.

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.

More Posts

See What Verra Can Do for Your Firm

Request a Demo