A LibreOffice extension that brings agentic AI to Writer, Calc, and Draw — chat in the sidebar, edit documents, run Python in spreadsheets, research the web, and check grammar.
Unlike proprietary office suites that lock you into a single cloud provider and send all your data to their servers, WriterAgent is local-first. You can run fast, private models locally (via Ollama, LM Studio, etc.) ensuring your documents never leave your machine. If you choose to use cloud APIs, you can switch between providers (e.g., OpenRouter, Together.AI) in seconds, maintaining full control over your data.
Download .oxt · Feature index · Discussions
- Sidebar chat with deep tool-calling — 9 core tools for everyday editing plus dozens of specialized sub-agents that unlock page layout, shapes, charts, bookmarks, footnotes, track changes, indexes, forms, and more. Try "Do web research and write a report on the space elevator, suitable for mathematicians (or English teachers)" — the AI will research, write, and format a complete document (the math version even uses LaTeX).
- Format-preserving edits — Rewrite or tighten a selection and existing bold, italics, highlights, and font sizes survive intact. HTML import handles tables and nested lists. One Ctrl+Z reverts a whole AI turn.
- Realtime grammar — Async proofreader with three backends: Harper (fast local Rust checker, auto-installs), LanguageTool (local server), or any LLM. Sentence cache, Unicode-aware splitting, and optional auto language detection so mixed-locale documents get the right checker per sentence. Details
- Math & analytics — TeX/MathML delimiters become editable LibreOffice Math objects. SymPy helpers for symbolic math. Readability metrics, NER, and key phrases via spaCy. Math
=PROMPT()and=PY()— AI prompts and NumPy/pandas code in spreadsheet cells with auto spill, shared kernel, init scripts, and document-attached scripts. NumPy in LibreOffice · Data shapes- Trusted helper domains — Analysis (14 helpers: EDA, outliers, regression, Monte Carlo, …), Viz, Math, Quant, Optimize, and Units — via chat or Tools → Run Python Script. Domain reference · Analysis tools
- Sheet → Python converter — Rewrite 235+ Calc formula functions as
=PY()while constants, dates, and formats stay unchanged. Details - DuckDB SQL — Query folder files (CSV, Parquet, XLSX, ODS) and live Calc ranges from chat or scripts. Batch edits, conditional formatting, and sheet filters.
- Private web research — Local smolagents loop with DuckDuckGo; synthesizes multiple pages and can update the open document with what it finds — e.g. "find the current price of … and update this memo." Agent search
- Cross-document reads — Say "our budget spreadsheet" in the sidebar to read other files in the same folder; edits stay on the active doc. Optional hybrid search (BM25 + semantic vectors, RRF) via
writeragent_embeddings/. Embeddings - LO-DOM — A recursive structural model so the agent understands headings, sections, and object relationships — not just a wall of text. Semantic tree
- Images, OCR, voice — Generate or edit images; offline OCR via Docling; cross-platform voice recording. Images · Vision · Audio
- Memory & locales — Persistent agent memory across sessions; 34 shipped locales with AI-driven translation pipeline. Memory · Localization
- MCP server — Enable in Settings → Http; endpoint
http://localhost:8765/mcpfor Cursor, Claude Desktop, LM Studio, or custom agents. Prefer adocument_urlargument on each tool call (or legacyX-Document-URLheader) so clients do not edit the wrong window when several docs are open; discover targets withlist_open_documents. MCP protocol - External agent backends — Under Settings → Agent backends, swap built-in chat for Hermes or Grok Build via ACP, with approve/reject dialogs for tool calls. Cursor plugin · LO skill
Full catalog with doc links: docs/features.md.
- Download WriterAgent.oxt (full AI suite) or LibrePy.oxt (Python/NumPy + analysis / OCR) from Release Assets, then double-click to install.
- Open WriterAgent → Settings and set an OpenAI-compatible endpoint and model (e.g.
http://localhost:11434for Ollama). - Open the sidebar: View → Sidebar → WriterAgent, or use Ctrl+Q / Ctrl+E for extend / edit selection.
No GPU? Try OpenRouter free models or Together.AI’s free tier.
Hermes + Opus 4.6 (Web Research)
Arch Linux Resume
Spreadsheet Dashboard
Math Expressions
Python in LibreOffice
Sonnet diagram of an Arch Linux deity
| Feature index | docs/features.md |
| Architecture | docs/writeragent-architecture.md |
| MCP | docs/mcp-protocol.md |
NumPy / =PY() |
docs/enabling_numpy_in_libreoffice.md |
| Embeddings | docs/embeddings.md |
| Benchmarks | docs/benchmarks.md |
| Localization | docs/localization.md |
| Code explorer | DeepWiki |
| Cursor rules/skills | cursor-libreoffice · libreoffice-skill |
Under the hood, all AI interactions are governed by a formally verified state machine with type checking, and static analysis. Architecture · Formal verification · Test architecture
Hit a rough edge? File an issue with steps to reproduce, or open a PR. A star helps too.
A weekly chronicle of building a professional AI suite inside LibreOffice:
- Week 1: Initial fork, sidebar chat, multi-turn tools, and async streaming
- Week 2 & 3: MCP, research sub-agent, voice support, and evaluation dashboard
- Week 4–6: State machines, formal verification, and specialized toolsets
- Week 6 & 7: Async grammar checking and TeX import support
Prerequisites: Python 3.11–3.13 for dev (pinned to 3.13 in .python-version), uv, and LibreOffice with unopkg. Run make check-setup to verify. On macOS: make, gettext, and LibreOffice via Homebrew or /Applications.
git clone https://github.com/KeithCu/writeragent.git
cd writeragent
uv python install 3.13
uv sync
make deploy # or: make deploy writer
make test
make helpIf uv sync fails on Python 3.14 / spaCy wheels: rm -rf .venv && uv sync --python 3.13. Contributor orientation: AGENTS.md.
| Project | Contribution |
|---|---|
| LibreCalc AI Assistant | Calc AI foundation and inspiration |
| LibreOffice MCP Extension | MCP server patterns, Makefile, tool registry |
| Hermes Agent | Tool-call parsers, JSON repair, memory patterns |
| latex2mathml | LaTeX → MathML |
GNU GPL v3 (or later) — see LICENSE. Originally MPL 2.0; relicensed in 2026 for stronger reciprocity and library compatibility.
| Year | Contribution | Contributor |
|---|---|---|
| 2024 | Original release | John Balis |
| 2025–2026 | Config, registries, build system | quazardous |
| 2026 | Calc integration (originally MIT) | LibreCalc AI Assistant |
| 2026 | Modifications and relicensing | KeithCu |







