Application architecture
Understand the responsibilities of Web SDK, Server SDK, and AI SDK and how to combine them in an application.
The Univer Office SDK consists of three parts: Web SDK runs embedded editors and processes content in headless mode1; Server SDK handles collaboration and file exchange; and AI SDK covers Agent workflows.
Univer is a toolkit for building Office applications in which people and AI Agents work on the same content. An application can provide a Web interface for people, a CLI for Agents, and a Server that both share, or it can take only the parts it needs.
SDK family
| Component | Runtime | Primary SDK | SDK provides | Application owns |
|---|---|---|---|---|
| Web | Browser | Web SDK | An editor that displays and edits Office content in the browser | UI, product interactions, and browser integration |
| CLI | Node.js | AI SDK | Inspection and editing for AI Agents | AI Agent workflows, tool calls, and task bounds |
| Server | Node.js | Server SDK (Collaboration, Exchange) | Self-hosted collaboration and Office file import/export | Application APIs, identity, permissions, file storage, deployment |
Each part has its own section: Web SDK covers editors, Server SDK covers collaboration and file exchange services, and AI SDK covers content operations for AI Agents.
AI SDK reuses the headless content capabilities of Web SDK. These components identify the main developer entry points and the runtime of each part. They are not three isolated stacks, and none of them is a finished product that can be deployed without application code.
Integrate file import and export
The Server SDK module @univerjs-pro/exchange-node converts between Office files and Univer document data. The application embeds the conversion module and provides the upload, conversion, and download APIs itself. Web SDK handles the browser side, and a CLI can call the conversion module in Node.js. Browser setup for each product remains in that product's Web SDK documentation.
- Without collaborative editing: convert a file into a document snapshot, then open and edit that snapshot in the browser. To export, pass the latest snapshot to the conversion module, which produces the file. This flow requires server-side conversion but no collaboration service.
- With collaborative editing: store the imported data as a collaborative document. Web SDK and AI SDK then operate on the same content through its document ID. Before exporting, synchronize the current edits, then read the latest document data and convert it.
If only conversion is required, run Exchange in a local Node.js process or a remote service; neither AI SDK nor collaborative editing is needed. File exchange integration describes the application flow, and Office file import and export shows how to use the conversion module.
Deployment shapes
| Shape | Web | CLI | Server | Intended scope |
|---|---|---|---|---|
| Local app | Local browser/desktop UI | Local process | Local process | Desktop Office with a local AI Agent |
| SaaS app | Browser | User device/cloud AI Agent | Remote service | Multiple users and central ops |
| Web + Server | Browser | — | Local or remote | No AI Agent-facing surface yet |
| Web-only | Browser/desktop UI | — | — | Local, single-user, non-collab edit |
All components can run on one machine, or they can be distributed across user devices and cloud infrastructure. The deployment location does not change the responsibility of each component. Once a Server is present, Web and CLI use it to access shared content and product capabilities.
Choose an entry point
| Goal | Start here |
|---|---|
| Embed an Office editor in a Web app | Web SDK documentation |
| Add Office file import/export to an editor | File exchange integration |
| Convert Office files in Node.js | Office file import and export |
| Run realtime collaboration on your own servers | Collaboration SDK overview |
| Let AI Agents read and edit Office content | AI SDK overview |
| Understand the headless Runtime behind the CLI | Runtime reuse and daemon |
| Isolate AI Agent changes for human review | Worktree |
If you are unsure which path applies, start with Get started.
Footnotes
-
Headless means operating on document content without mounting an interactive editor UI. It does not mean that collaboration, persistence, or file conversion services are included. ↩
How is this guide?