Univer Office SDK: Office Harness for AI Agents
Univer is worth building on when you need a full-featured office surface embedded in a custom product, with server-side document processing and a plugin model that doesn't force you to take everything at once. Skip it if you only need to read or export spreadsheet files — the SDK is designed for interactive editing, not passive file handling. The Pro paywall on collaboration and charts means the most-requested enterprise features live outside the open-source scope.
What is Univer?
Univer is a TypeScript office SDK for embedding spreadsheet, document, and presentation editing into any web or Node.js application. It ships with a plugin-first architecture, Canvas-based rendering, a dedicated formula engine, and a unified Facade API that works identically in the browser and on the server. The tagline is 'Office Harness for AI Agents' — the runtime is designed for both human editors and programmatic agent control.
Core features and architecture
- ✓Plugin-first architecture: compose, replace, or lazy-load individual capabilities instead of importing a monolithic office suite
- ✓Canvas-based rendering engine built for large editable surfaces, shared across spreadsheet, document, and presentation document types
- ✓Dedicated formula engine for spreadsheet calculation, accessible via Facade API and usable headlessly on Node.js
- ✓Headless runtime: run workbook and document logic in Node.js without a browser or UI, for server-side processing and automation
- ✓Unified Facade API: a single consistent interface covering workbooks, ranges, formulas, and documents in browser and Node.js environments
- ✓Preset mode and plugin mode: choose between a curated plugin collection for fast setup or granular manual composition for production control
- ✓Extensible UI layer with React 18 and 19 support, plus adapters for Vue and Web Components
- ✓Dark-mode-ready UI components and rendering engine that adapt to light and dark themes
What you can build with Univer
- •Embedding a spreadsheet editor into a BI dashboard or internal analytics tool — the formula engine and number formatting are production-ready, and Canvas rendering keeps large grids responsive
- •Adding document editing to a content management system or contract review workflow where humans and AI agents collaborate in the same files
- •Server-side document processing: batch-update spreadsheets, apply formatting, or run calculations in a Node.js service without spinning up a browser environment
- •Building AI agent tooling that generates and verifies spreadsheet-based outputs (dashboards, reports, decision tables) using the Facade API for programmatic inspection and mutation
- •Creating a self-hosted workspace product for teams that need offline-first, self-deployed office software with embedded collaboration features from the Pro tier
Getting started with Univer
Two installation paths exist. Preset mode installs a curated plugin collection in one package: `pnpm add @univerjs/presets @univerjs/preset-sheets-core`. Plugin mode installs individual packages for precise control: `pnpm add @univerjs/core @univerjs/sheets @univerjs/engine-formula @univerjs/ui` and many others listed in the README. Both require an HTML container element (`<div id="app"></div>`) in your page. Node.js headless mode requires Node.js >=18.17.0; monorepo development requires Node.js >=22.18 and pnpm >=11.
Plugin mode vs preset mode
In preset mode, you call `createUniver()` with a preset and get a working app in a few lines. In plugin mode, you manually register each plugin (UniverSheetsPlugin, UniverFormulaEnginePlugin, etc.), merge locale objects, and configure the container — giving you control over lazy loading, bundle splitting, and dependency order. The Facade API (`FUniver.newAPI(univer)`) provides a higher-level interface for working with workbooks, ranges, and formulas that works the same way whether your app is running in a browser or headlessly on Node.js. Production apps that care about bundle size typically migrate from preset mode to plugin mode once they know which features they actually need.
Strengths
- ✓Headless Node.js runtime means the same document logic runs in a browser UI and on a server, enabling true end-to-end document automation without PhantomJS or Puppeteer workarounds
- ✓Plugin architecture gives surgical control: load only the features you ship, tree-shake the rest, and extend behavior with custom plugins, commands, services, and UI components
- ✓Canvas-based rendering is purpose-built for large, interactive surfaces — the rendering layer is shared across spreadsheet, document, and presentation types, not a port of a desktop engine
- ✓The Facade API abstracts away the internal command and service layers, giving AI agents and automation scripts a stable, high-level interface for reading and writing content
- ✓Apache-2.0 license means the core SDK and all OSS packages can be used in commercial products without licensing fees or vendor lock-in
- ✓Works with existing framework ecosystems: React 18/19, Vue adapters, and Web Components support mean you can drop it into an existing application shell rather than rebuilding around it
Open source scope and Pro boundaries
- △Real-time collaboration, edit history, charts, pivot tables, server-side calculation, and import/export for spreadsheets are Univer Pro features — not available in the open-source packages
- △Slides and Docs are less mature than the Sheets module; the README explicitly calls out that Sheets is the most mature product surface today
- △Plugin mode has real setup friction: manually registering dozens of packages, merging locale objects, and managing import order is a significant investment compared to preset mode
- △Collaboration features for AI agent workflows (worktree drafts, live editing) require corresponding Web SDK and collaboration packages whose availability and licensing vary
- △No PDF generation or viewing in the open-source version — listed as 'coming soon' in the README
Univer vs OnlyOffice, NPOI, and other office SDKs
Frequently asked questions
Yes for the open-source packages published under Apache-2.0. You can embed the core SDK, plugin system, formula engine, and basic Sheets/Docs/Slides editing in commercial products without paying. Univer Pro is a separate commercial product covering collaboration, charts, server-side calculation, and enterprise features — it requires a paid license.
Chrome 88 and above, Edge 88 and above, Firefox 90 and above, Safari 14.1 and above, and Electron 12 and above. The compiled target is Chrome 88. If your target includes older browsers, you will need to add a polyfill for Intl.Segmenter — the README specifically calls this out.
Yes, Univer has a headless runtime for Node.js >=18.17.0. You can run workbook and document logic — including formula calculation — without a browser or DOM. This is designed for server-side processing, automation, and AI agent workflows that need to read or modify office content programmatically.
Real-time collaboration is an Univer Pro feature, not part of the open-source packages. The OSS SDK has the architecture to support it, but the actual collaborative editing layer, presence indicators, and conflict resolution are in the commercial extension.
Every capability in Univer is delivered as a composable plugin. You register plugins with the Univer instance — for example, UniverSheetsPlugin for spreadsheet logic, UniverFormulaEnginePlugin for calculations, UniverUIPlugin for the UI layer. Plugins can be added, removed, replaced, or lazy-loaded independently. This gives you precise control over what features ship in your bundle.
The open-source packages cover core editing, formulas, filtering, data validation, and the plugin system under Apache-2.0. Univer Pro adds real-time collaboration, edit history, charts, pivot tables, sparklines, import/export, server-side calculation, and enterprise deployment tooling. Pro is developed and licensed separately.
The problem it solves
Embedding rich office functionality into a custom application usually means either signing up for a cloud service (Google Docs API, Microsoft Graph) or importing a heavyweight desktop SDK that doesn't fit a modern web architecture. Neither approach gives you a headless runtime for server-side document processing, a plugin system for selective feature inclusion, or a clear path for AI agents to programmatically read and write structured office content. Univer fills that gap with an SDK built for embedding rather than hosting.
Who should try it — and who should skip
Build with Univer if you need embedded, interactive office editing with a plugin architecture you can control, and if server-side document processing is part of your workflow. It's also the right choice when AI agents need programmatic access to spreadsheet and document content. Skip it if you only need to read or export office files without an editor — a file-format library like SheetJS or docx is lighter and simpler. Teams that need real-time collaboration out of the box should check OnlyOffice first, as Univer's collaboration layer lives behind a Pro license.
Related repositories
Still deciding about univer?
One click hands the question to an AI along with this page — see what it says about univer.
