How Univer’s Multi-Agent Workflows on Worktrees Work
Updated
Univer runs multiple AI agents in parallel by giving each one an isolated worktree, so their edits never collide, and then routes every change through human review before it lands in the shared file. This applies when you are building on the Univer Office SDK or using its agent runtime with supported agents such as Claude Code, Codex, OpenCode, OpenClaw, Hermes, WorkBuddy, or Kimi Work. The design goal is stated directly on the site: "Parallel by default, human-reviewed by design."
What a worktree is here
A worktree is an isolated working copy of the office file and its surrounding context. Instead of pointing several agents at one live document, Univer gives each agent its own branch of the work. Because the copies are separate, two agents can edit the same spreadsheet or doc at the same time without overwriting each other.
This matters because office files are stateful: a formula depends on cells, a slide embeds a live sheet, a doc cites a source. If agents wrote into one shared file concurrently, you would get conflicting references and broken layouts. Isolation removes that class of conflict before it happens.
The workflow, step by step
- Define the task and split it. You describe the work (for example, "update the Q3 forecast sheet and refresh the summary doc"). The runtime can fan this out across multiple agents rather than running one agent serially.
- Each agent gets its own worktree. The agent operates on an isolated copy, so its reads and writes stay local to that branch.
- Agents run in parallel. Multiple agents work simultaneously across file types — spreadsheets, docs, slides, canvases, relational tables, and PDFs — without losing context, since they share the same underlying storage and computation model.
- Changes come back for review. Each worktree's output is presented as a reviewable change rather than being merged automatically. A human inspects it.
- Approved changes merge; rejected ones are discarded. Only reviewed changes reach the shared file, keeping every change traceable.
The key property is that parallelism and safety are handled by the same mechanism: isolation makes concurrency possible, and review makes it safe.
Why human review is built in, not bolted on
Agents are good at producing volume and bad at knowing when a change is wrong for your business. In an office file, a plausible-looking edit can silently break a reference chain — a source cell changes, and every dependent formula, chart, or cited block shifts with it.
Univer's answer is to keep the human in the merge path. The site frames this as "human-reviewed by design" and "every change traceable." Practically, that means you are not approving a black-box result; you are reviewing a diff against an isolated copy, which is a far smaller and more legible thing to check.
How this fits the rest of the runtime
The multi-agent workflow is not a separate product bolted onto an editor. It sits on the same runtime that powers the six office tools:
| Piece | Role in the workflow |
|---|---|
| One runtime, six tools | Agents work across sheets, docs, slides, canvases, relational tables, and PDFs without switching context |
| Shared storage and computation | Sources stay synchronized, so references update when the underlying data changes |
.univer file format |
Sheets, docs, slides, and canvases live in one file, composing and embedding freely |
| Worktrees | Isolate each agent's work so parallel edits don't collide |
| Human review | Gates every change before it merges |
Because a slide can hold a live sheet and a doc can cite its source, an agent editing one block can affect another. Worktree isolation plus review is what keeps that composition from turning into a cascade of unintended edits.
What you need to run it
- An agent that Univer supports. The site lists OpenCode, Claude Code, OpenClaw, Hermes, Codex, WorkBuddy, and Kimi Work.
- The Univer Office SDK if you are embedding this in your own product. The SDK lets you build your own UI and UX, self-host, and connect your own auth, databases, and knowledge bases.
- A review step in your process. The workflow assumes a human decides what merges. If you skip that, you lose the guarantee the design is built around.
Customization runs down to the engine level — formulas, assets, and components — so the runtime can be shaped to your file types and conventions rather than forcing your content into a fixed model.
Where to start
The site offers a live demo for the spreadsheet and docs tools, a "Copy SDK prompt" action, and a "Read the docs" link, plus a GitHub entry point for building with the SDK. If you want to see the multi-agent behavior before committing, the demo is the fastest way to understand how isolated worktrees and reviewable changes feel in practice.
The short version: Univer makes agents fast by running them in parallel on isolated copies, and keeps them safe by making a human approve what actually lands.