What the example includes
- Streamed edits
- Suggestion cards to review edits before applying them
- Tracked changes
- Selected-text context
- Pasted image context
- Multi-model selection
Demo
Prerequisites
- Node.js 22.13 or newer
- Docker Desktop, running. The ONLYOFFICE Document Server runs in a container.
- Port 80 free on your machine. The Document Server must be reachable at the same address from the browser and from inside its container.
- A Vespper account
- A model-provider API key for OpenAI, Anthropic, or Google
Set up the add-in
Get a Vespper API key
Sign up for Vespper, then create a key on the
API keys page. Copy the
sk_live_...
secret immediately; it is shown only once.Install the example
Clone the repository, then install the dependencies:Edit Only one model-provider key is required:By default, the agent proposes edits as suggestion cards that you accept
or reject. To have it apply edits to the document as it writes them, set:
.env and add your Vespper key plus the key for the model provider
you want to use:.env
OpenAI GPT 5.6 Sol is the default. To start with another model, set
ONLYOFFICE_AGENT_MODEL in .env, for example:.env
.env
Run it
http://localhost:3101. The first run
pulls the Document Server image, so it can take a few minutes before the
editor loads.Open http://localhost:3101. The Vespper plugin
starts automatically; click the V icon on the left if its panel is
collapsed. Drag the panel’s edge to widen it (up to 600 px).To verify configuration, open
http://localhost:3101/health. Both
vespperConfigured and agentConfigured should be true.Stop the Document Server with:Try an edit
- Open http://localhost:3101. A welcome document is loaded the first time. To edit your own file, use Open .docx above the editor.
- Open the Vespper panel.
- Ask for an edit.
- Optionally select document text or paste images into the prompt.
Vespper Agent.
The open document is stored at data/document.docx. Opening a file replaces
it and starts a fresh editing session. To get the welcome document back, stop
the app and delete that file.
Development commands
Project layout
Security
.env is ignored by Git. Vespper and model-provider keys are read only by the
local Node.js server and are never bundled into the plugin.
This example is intentionally local and disables ONLYOFFICE JWT validation. Do
not expose it directly to a network. A production deployment should enable
JWT, authenticate the app routes, restrict the download proxy, and define a
multi-user document versioning strategy.
View the complete example on GitHub
Browse the source code, plugin manifest, and standalone README.

