# WorkBuddy Plugin

> Create local Office content in WorkBuddy and review it through live previews and version comparisons.

- Human documentation: [https://docs.univer.ai/overview/examples/workbuddy](https://docs.univer.ai/overview/examples/workbuddy)

- Agent Markdown: [https://docs.univer.ai/overview/examples/workbuddy.md](https://docs.univer.ai/overview/examples/workbuddy.md)

- Requested language: `en-US`

- Content language: `en-US`

- Documentation version: `1.6.1`

- Source: [examples/workbuddy.mdx](https://github.com/dream-num/documentation/blob/dev/content/docs/examples/workbuddy.mdx)

---

**Univer Office for WorkBuddy** (`workbuddy-univer-office`) is a local Office integration built on the public APIs of the **[Univer Office SDK](https://docs.univer.ai/overview.md)**. A local MCP service and a Skill bring authoring, inspection, previews, and draft review into WorkBuddy, and the files remain in a local workspace.

> [!INFO]
> This is a development preview. The public npm runtime supports local integration; official marketplace installation and full in-host review still require acceptance testing.

[Install and connect](#quick-start) · [Try a task](#first-task) · [Skills and tools](#skills)

## Install and connect

You need WorkBuddy 5.8.3 or newer and Node.js 22 (22.12 or newer). This example uses public runtime 0.1.6, and Office content defaults to the local `~/.univer-office/workspace` directory.

### 1. Install the local runtime

```bash
npm install --global --ignore-scripts workbuddy-univer-office@0.1.6 --registry=https://registry.npmjs.org/
univer-office --version
```

Complete the installation before connecting MCP. Otherwise the first dependency download runs while the host waits for the handshake and can exceed the timeout. A local connection requires neither a cloud account nor an Office API key.

### 2. Connect the local MCP server

Open an authorized working directory in WorkBuddy, then add a custom stdio MCP server with the following configuration:

```json
{
  "mcpServers": {
    "univer-office": {
      "type": "stdio",
      "command": "univer-office",
      "args": []
    }
  }
}
```

If WorkBuddy cannot locate `univer-office`, replace `command` with the absolute path of the installation. On macOS or Linux, obtain that path with `command -v univer-office`; on Windows, use `Get-Command univer-office`. Allow WorkBuddy to start the stdio server, and do not start an independent HTTP service for the same storage directory. To use a different storage directory, set the `WORKBUDDY_OFFICE_WORKSPACE` environment variable to an absolute path.

### 3. Import the operational Skill

With Git and Python 3 available, generate the instructions-only Skill ZIP from the public repository. No application build is required:

```bash
git clone https://github.com/dream-num/workbuddy-univer-office.git
cd workbuddy-univer-office
python3 scripts/package-workbuddy-skills.py
```

Import `.data/packages/univer-office-workbuddy-skill.zip` in WorkBuddy’s Skills manager. Once MCP is connected, ask the assistant to check the Office service status, then send the task below. The Skill supplies the guidance and the MCP server performs the execution, so use them together.

## Try a task right away

```text
Use Univer Office to create a local sales-review.univer file containing an English sales Sheet with five sample records: Product, Quantity, Unit Price, and Revenue. Calculate Revenue with formulas, add total revenue and a revenue-by-product chart.
Verify confirmed writes and formula results, show only this Sheet in the right-side preview, and give me the browser review link. Keep every change in an isolated draft and wait for my approval before merging.
```

### What you will see

WorkBuddy displays one read-only spreadsheet preview on the right. Full View, Compare, and the merge confirmation open in the browser, while the Office file remains local. Starting with a single Sheet makes formulas and charts immediately visible and avoids the host’s routing limitation on multiple preview cards in the same response.

### Keep exploring

After you approve and merge the first result, ask: “In a new draft of the same sales Sheet, raise the first record’s unit price by 10%, update total revenue, and open Compare against the confirmed version. Wait for my review.” This produces a concrete before-and-after comparison.

## How Skills and tools work together

One [`univer-office` Skill](https://github.com/dream-num/workbuddy-univer-office/tree/main/skills/univer-office) defines the workflow, with seven product and cross-content references loaded as needed. The agent queries public Facade APIs with `univer_api`, then edits, confirms writes, reads the content back, and previews through MCP. The same Office SDK model drives headless processing and browser rendering, and versions plus Worktrees make every change identifiable, comparable, and reviewable.

## What you can build

- Create content in your existing assistant: ask WorkBuddy to create or update spreadsheets, documents, presentations, relational tables, and canvases.
- Follow live previews: inspect read-only previews in the host, or open an external browser for the full View and Compare interfaces.
- Review changes before deciding: Draft View and Compare are read-only. Compare fixed versions, inspect semantic differences, and navigate to the affected content.
- Move from draft to delivery: the agent edits a Worktree, a person chooses to merge, revise, or discard, and supported formats are then exported from the confirmed version you select.

## How Office SDK powers it

WorkBuddy handles the conversation and the MCP tool calls. The local service composes the Office SDK’s Headless runtime, Facade authoring, collaboration versions, and Worktrees, and browser previews render the same content model. The project demonstrates how to package SDK capabilities as local tools and a review interface for an agent host.

## Try it and explore the source

[Run locally](https://github.com/dream-num/workbuddy-univer-office#local-development) · [Explore the workflow](https://github.com/dream-num/workbuddy-univer-office#workflow) · [Source repository](https://github.com/dream-num/workbuddy-univer-office)

## Explore the underlying capabilities

- [Document loading and content operations](https://docs.univer.ai/ai/content-operations.md)
- [Content comparison](https://docs.univer.ai/overview/features/shared/compare.md)
- [Worktree](https://docs.univer.ai/overview/features/shared/worktree.md)

[All examples](https://docs.univer.ai/overview/examples.md)
