Why We Rebuilt Microsoft Office From Scratch for AI Agents - Yijia Liang, Compound AI

Read the talk

Why We Rebuilt Microsoft Office From Scratch for AI Agents

A deal team needs an agent that can take direction in Outlook, work through a data room, and deliver files colleagues can open in Office. Compound rebuilt the Office engines to run long jobs reliably in parallel. Owning the renderers also lets agents check how the finished files will look.

From a talk by Yijia Liang

At a glance

Ideas worth remembering

  • A shared deal agent has to check each participant’s access. Delaying acknowledgments also gives several colleagues room to reply without flooding the thread.

  • Headless engines let independent Office jobs run in parallel. Rendering serves two further purposes. Office gives coding agents a reference while they build the engines, and the finished renderers let analyst agents inspect and correct their output.

  • Directory size and workbook complexity call for different tools. Parallel workers search across files and return citations. Spreadsheet APIs let an agent work inside one large model without printing its contents into a conversation.

What counts as a background task on a deal team?

Yijia Liang spent about three years as a vice president at Coatue investing in late-stage private software companies, with plenty of late nights in Excel and PowerPoint. When he asked the audience who knew a finance analyst who fully delegated their work to AI, one hand went up. The assignment he wanted to hand off helps explain why.

  • Background work. A personal agent can book a restaurant while its user does something else. The buy-side equivalent starts with a data room full of company files and ends with financial models, slides, and memos ready for the investment committee (IC). Compound’s ambition was to compress four weeks of preparation and review into a few days.
  • Initiative. An agent that remembers an anniversary and buys flowers can save its user a chore. On a deal, a managing director wants a chance to give direction before an agent spends time and tokens pursuing the wrong question.
  • Context. Email, Drive, and Calendar give a personal agent much of what it needs. A single deal can bring 15,000 files. The firm may also have forty years of unstructured material in SharePoint or Box, amounting to petabytes.
0:120:36
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:12 · section reference included

Give the agent an inbox on the deal thread

An analyst working alone in a plug-in or chat can produce a draft. The moment a colleague needs to review it, the analyst downloads the file, attaches it to an email or uploads it to Teams, and asks for feedback. The feedback now lives outside the conversation that produced the file. Compound gives each agent an inbox so everyone working on the assignment can address the same agent in Outlook, where a deal team might already have twenty or more email chains running.

Putting an address on the thread creates two design problems. First, deal materials are confidential. Compound has to authenticate participants and check that everyone on the thread has read and write access to that agent. Second, a fast response can make the conversation worse. If several colleagues reply in quick succession, an immediate acknowledgment of each message floods everyone’s inbox. Compound deliberately adds a delay so colleagues have time to weigh in.

3:123:42
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:12 · section reference included

Use Microsoft Office as the reference implementation

Once the team had given its instructions, the agent needed somewhere to do the work. Compound tried desktop plug-ins for Excel, PowerPoint, and Word. It tried running native Office in virtual machines so more agents could use it at once. It also evaluated libraries such as openpyxl and commercial engines. The team wanted to run many jobs in parallel and still deliver files colleagues could download and send. Improving coding agents made building its own engines a plausible choice, albeit a substantial one. Liang puts the effort at 1.5 trillion input and output tokens combined and over 8 million lines of code.

For Excel, the starting point was IronCalc, an open-source spreadsheet engine. Given the same workbook, how should Compound’s engine behave? Excel itself supplied the reference. Compound repeatedly benchmarked its implementation against Office on workbooks collected online and examples created in-house. Differences gave the coding agents concrete behavior to reproduce on the next pass. Liang reports that the spreadsheet effort alone accounted for 800,000 lines of Rust.

Compound applied the same method to PowerPoint and Word, comparing the output of its Rust renderers with Office. Pixel-for-pixel parity was the target. The reason was practical. A slide a colleague approved in Compound needed to look the same when the recipient opened the downloaded presentation in PowerPoint.

The engine could run headless, without an agent driving an open desktop app. Independent tasks could run in parallel without competing for the resources of one desktop. There was a gain within a single job, too. Liang reports four times the recalculation speed of desktop Excel on 20 MB workbooks. That figure applies to recalculation, just one part of preparing a deal model.

2:355:28
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

5:28 · section reference included

Review a draft where the agent can act on it

How do you tell an agent what makes a good slide? Liang made the talk’s own deck by asking Compound for a first draft and leaving formatting comments in the editor. The draft gave him something specific to point at. Each comment turned a preference learned in consulting or investing into a revision the agent could make.

The same interaction works across a team. Several reviewers can leave instructions on the shared deck as they read it. Liang’s example is five people working through a hundred-page deck in an afternoon, a way to divide a review that might otherwise stretch across weeks of meetings.

A renderer gives the agent a way to review its own work, too. Consider a workbook that takes hours to build. With openpyxl, an agent can write the file and read back a cell’s font or color. Those properties tell it what it set. To check how the sheet actually looks, it needs a renderer. Microsoft’s interface limits the check to what that interface exposes. With its own engine, Compound can write the workbook, render it, inspect the result, change the formatting, and render it again before the analyst opens the file.

8:088:38
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

8:08 · section reference included

Split the directory and keep the citations

A data room poses two different scaling problems. It can contain more than 15,000 files, and one of those files can be a 30 MB workbook with two million formulas and five sensitivity tables. In Liang’s example, recalculating that one workbook takes five minutes. Dividing up the directory helps with the file count. It takes a different tool to work efficiently inside the workbook.

How can the research fan out without losing track of where a number came from? A lead agent divides the directory among workers. Each worker searches and reads its assigned files, using tools such as grep, and returns findings with citations to the source documents. The lead can send workers back for another pass if the results leave the question open. This approach lets Compound reserve vector indexing for cases that need it. An analyst reading the combined findings can still follow an individual number back to its source.

Where the work splits and the findings come back together

Lead agentDivides the file directory into assignments.
Worker on one sliceParallel reads — Searches and reads its assigned files.
Worker on another sliceParallel reads — Searches a different part of the same directory.
Findings for reviewEach finding points back to the document that supports it.
Two representative workers show how assignments go out and evidence comes back. The lead can repeat the search while the analyst retains a source for each finding.
Read the diagram as text
  • Lead agent. Divides the file directory into assignments.
  • Worker on one slice. Parallel reads — Searches and reads its assigned files.
  • Worker on another slice. Parallel reads — Searches a different part of the same directory.
  • Findings for review. Each finding points back to the document that supports it.
  • Lead agent → Worker on one slice: Assigns files.
  • Lead agent → Worker on another slice: Assigns other files.
  • Worker on one slice → Findings for review: Returns cited findings.
  • Worker on another slice → Findings for review: Returns cited findings.
  • Findings for review → Lead agent: Informs another pass if needed.
9:5510:05
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

9:55 · section reference included

Give the agent tools for the 30 MB workbook

Even after a worker finds the right workbook, the language model still needs to understand it. In the general-purpose chat workflow Liang describes, the assistant writes code using a package such as openpyxl, then prints workbook details for the model to read. A large workbook becomes a large and costly exchange of text. Compound’s spreadsheet engine processes the file and presents the result in a form the model can read. Its APIs give the agent tools for workbook operations it would otherwise have to reconstruct in code.

Knowing where the numbers came from still leaves a practical question. How does this firm build a model? SharePoint and Outlook connectors supply the material, citations let analysts check findings, and the team supplies its modeling and presentation conventions. Encoding those preferences saves an analyst from explaining the same formatting decision on every deal. It also leaves more time to consider whether the investment itself makes sense.

10:0511:17
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:17 · section reference included

Which analyst tasks can move from copilot to autopilot?

Spreading comps, or laying out figures for comparable companies, is a bounded assignment that Liang considers a good fit for off-the-shelf tools. A fifty-page IC presentation asks more. So does building a financial model the way a particular private equity or hedge fund professional expects it. With ordinary plug-ins, the analyst still has to guide those assignments along the way. For Liang, moving to autopilot means being able to delegate the whole assignment and return to work the team knows how to check.

The analogy is to programmers who began handing larger tasks to coding agents once they had tests they trusted. The finance equivalents answer different questions. Does the number trace to a source? Does the downloaded file look like the draft the team reviewed? Did the agent follow the firm’s modeling conventions? Liang’s tenfold ambition is about the number of deals a team could examine if it could hand over a data room and trust the resulting work. The investment decision still belongs to the people reviewing it.

13:1113:41
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

13:11 · section reference included

Resources

From the talk

  • Try the editors Liang describes. The product page also explains how to trace a number from a deck to its model cells and from a cell to the relevant filing passage.