Ask ChatGPT or Claude for "a deck of this" or "put it in Excel" and you get a real file back. Behind that is more than a model: it's a harness. The model writes the file, looks at the result, fixes what's wrong and checks it again before you ever see it.
Many of us are now building our own AI apps: an internal assistant over company data, or a team of agents in Google ADK or LangGraph. When users ask those apps for a deck or a spreadsheet, there's no harness like that to plug in. You end up writing python-pptx scripts and hoping the model gets the layout right.
I spent the last months building that harness as an open-source toolkit, Artiwright. This post is about what a document harness actually needs, shown on a real agent run, and how to plug it into your own stack.
TL;DR: Artiwright gives your own agents (Google ADK, LangGraph, any MCP client) the make → look → lint → fix → finalize loop for real PowerPoint and Excel files. Apache-2.0, runs on your servers, never calls a model.
Quickest try:claude mcp add --transport stdio --scope user artiwright -- npx -y artiwright@latest mcp

From a real agent run, explained below: the agent's first draft, what lint told it, and the slide after its fix.
bvenu17 / artiwright
Native, editable PowerPoint and Excel files for AI agents
Give your agent an office.
An open-source toolkit for AI agents that create, edit and check native PowerPoint and Excel files, with live charts, tables and formulas, on your own templates
Website · Docs · Integrations · Use cases · Changelog
launch.mp4Made by Artiwright, as PowerPoint and Excel show them. The charts, the table and the formulas are native and editable.
Artiwright plugs into the agent you already have. Your app and your agents stay as they are; Artiwright joins them as tools, or as one more agent, and hands back files your app already knows how to serve. The agent builds the deck or workbook, looks at every page, fixes what lint finds (text running out of its box, overlaps, broken formulas) and saves a file that opens cleanly in PowerPoint and Excel. It works with your framework and the model you choose, on your own servers.
Get
…What goes wrong when an agent makes Office files on its own?
If you've tried letting an agent make Office files directly, you've probably seen some of these:
- Text running out of its box or sitting on top of a table. The model can't see the slide, so it can't know.
- Charts as pictures. Nobody can edit the numbers in PowerPoint afterwards.
- Spreadsheets with typed-in results instead of formulas, so nothing updates when an input changes.
- Columns too narrow, so Excel shows
####. - Files PowerPoint offers to "repair" when you open them.
- Numbers on a slide that don't match the spreadsheet they supposedly came from.
None of these are model problems. They're feedback problems: the model never finds out.
What does a document harness do?
Five steps, and the agent gets something specific back at every one:
- Make. The agent writes short code against a document model (or sends JSON operations): native charts, real tables, live formulas.
- Look. Every slide and sheet comes back as an image the model can see.
- Check. Lint runs 35 rules (26 for decks, 9 for workbooks) and returns each finding with the exact shape or cell and a suggested fix.
- Fix. The agent changes only what was flagged, then renders and lints again.
- Finalize. Microsoft's Open XML validator, plus checks on what you asked for. Finalize refuses a file that still has errors.
What does that look like in a real run?
Here's one run from start to finish. A LangGraph agent (on an OpenAI model) gets a billing export of 1,473 MRR movements and a short note from finance, and is asked for a board metrics workbook (ARR bridge, net and gross retention, cohorts, CAC payback) and a seven-slide board deck. It took 33 turns and about 9 minutes. The interesting part is what the checks caught.
1. The workbook: 25 cells too narrow. The first lint on the workbook came back with 25 errors like this one:
{ "rule": "cell/too-narrow", "sheet": "ARR History", "range": "G11", "message": "ARR History!G11 shows #### in Excel: \"11741796\" needs 69 px but column G is 64 px.", "fix": "sheet.setColumnWidth(\"G\", 80) or sheet.autofitColumns()." } The agent widened the columns, linted again, and got a clean result.
2. The deck: a takeaway sitting on the table. This is the slide at the top of the post. The first render had a problem that's easy to miss in a thumbnail, and lint named it: two text/overflow errors and one layout/overlap warning, each naming the shape. In one call, the agent shortened the takeaway to one line and moved the box below the table. Then it rendered the slides again and lint came back clean.
3. Finalize: numbers that weren't in the workbook. This is my favourite. Lint was clean, but finalize refused the deck:
{ "code": "numbers/untraced", "message": "10 of the 28 numbers in the table on slide 2 are not in the session's workbooks (28.95, 30.98, 34.32, ...). Read the figures from the workbook rather than typing them." } The agent had typed rounded millions into the slide's table. Instead of waiving the check, it added a Board Data sheet that rounds the figures with formulas, saved the workbook again, and the deck passed. Every number on that slide now traces back to a cell.
You can read the whole run, every call and every image the agent saw, on the use case page.
How do I plug it into my own agents?
Artiwright joins the agent you already have, as tools or as one more agent. It doesn't call a model itself, so you keep your framework, your model and your servers.
Google ADK: a ready-made sub-agent for your router:
from artiwright.adk import artiwright_agent from google.adk.agents import LlmAgent docs = artiwright_agent(root="/srv/artiwright-sessions", model=MODEL, theme="ledger") root_agent = LlmAgent(name="router", model=MODEL, sub_agents=[docs, research]) LangGraph / LangChain: the tools and the instruction, one session per thread:
from artiwright.langgraph import INSTRUCTION, agent_tools, get_tools from langgraph.prebuilt import create_react_agent tools = agent_tools(await get_tools(root="/srv/artiwright-sessions", session=thread_id)) agent = create_react_agent(model, tools, prompt=INSTRUCTION) No model at all (Node.js), for an "export to deck" button or a nightly report:
import { ChartTakeaway, Presentation, compose } from "artiwright"; const deck = Presentation.create({ theme: "spruce" }); compose(deck.slides.add(), ChartTakeaway({ title: "Enterprise drove two thirds of new ARR", chart: { type: "column", categories: ["Q1", "Q2", "Q3"], series: [{ name: "Enterprise", values: [4.1, 5.3, 7.2] }] }, takeaways: ["Enterprise up 36% on Q2"], })); console.log(deck.lint().findings); // what to fix before handing it over await deck.save("q3-review.pptx"); Any MCP client (Claude Code, Cursor, Codex, VS Code, your internal assistant). This is the quickest way to try it:
claude mcp add --transport stdio --scope user artiwright -- npx -y artiwright@latest mcp Then ask: "Make a five-slide quarterly review from this CSV, with a native chart."
There's also an HTTP server and a Docker image if your agents run somewhere else.
Why is this harder than it looks?
A few things I learned building it:
- The file format is huge. PowerPoint and Excel files are Open XML: zipped XML with thousands of element types. The engine that reads and writes it is .NET, compiled to WebAssembly and shipped inside the npm package, so there's nothing extra to install.
pip installeven brings its own Node.js. - "Looking" means rendering it yourself. To show the agent its slides, Artiwright has its own renderer. The hard part is breaking lines where PowerPoint does. On a 9-slide test deck, lines break where PowerPoint breaks them in 49 of 51 text boxes.
- Editing must not break what you didn't touch. 23 PowerPoint and Excel files from Apache POI's test suite each open, save back byte for byte unchanged, and take an edit without new errors.
- Formulas have to compute while the agent writes, so it can check its own numbers. 494 Excel functions are implemented, and 177 formulas are compared against the answers Excel itself saved.
Where does it run, and what does it send?
- On your machine, your servers or your container. There's no cloud service and no account.
- It never calls a model and sends no telemetry.
- Code the agent writes runs in a separate sandbox per session, limited to that session's folder, with no network.
- Apache-2.0, free in commercial products.
How is this different from what I can use today?
| You get a real .pptx / .xlsx | The model sees the result | Specific findings to fix | Works in your own app | |
|---|---|---|---|---|
| ChatGPT / Claude built-in | Yes | Inside their own harness | Inside their own harness | No, only in their apps |
| python-pptx / openpyxl scripts | Yes | No, unless you build it | No, unless you build it | Yes |
| Artiwright | Yes | Yes, every page as an image | Yes: 35 lint rules + finalize | Yes: ADK, LangGraph, MCP, npm, HTTP |
python-pptx and openpyxl are great libraries, and if you already have fixed templates and no model in the loop, they may be all you need. The gap is the feedback loop when a model is writing the file.
What doesn't it do (yet)?
- No Word documents yet; Word and PDF are planned.
- Previews aren't pixel-identical to PowerPoint. Line breaks match in most boxes, not all.
- Fonts: when the real font isn't available, it uses metric-compatible look-alikes (same character widths), so layout holds but the look can differ slightly.
Try it
npx -y artiwright@latest --version # Node.js 22.13+ pip install "artiwright[langgraph]" # or [adk], Python 3.11+ - GitHub: https://github.com/bvenu17/artiwright
- Docs and real agent runs: https://artiwright.com
It's a solo side project, so a file that came out wrong is the most useful thing you can send me (open an issue and attach it). If it's useful to you, a star on GitHub helps other people find it.
And I'm curious: if you've built your own agent app, what do your users ask it to produce, and which kind of file breaks it most?
I drafted this post with AI assistance and edited it myself. The run, the numbers and the code are from the project's repository.




