Focus on agents. We handle document intelligence.
The official Microsoft Word add-in for Knowledge Stack — an AI assistant that lives in the Word sidebar and connects to your permission-scoped knowledge base.
The add-in opens as a taskpane in Word and connects to the Knowledge Stack agent for AI-powered document workflows:
| Mode | What it does |
|---|---|
| Chat | Free-form Q&A about the document or knowledge base |
| Edit | Insert or replace content in the document (supports multi-paragraph, fill-the-blanks) |
| Review | Add, edit, resolve, and reply to comments with findings |
| Summarize | Generate structured summaries of selected text or the full document |
| Format | Analyze and fix paragraph styles (heading hierarchy, list styles) |
| Extract | Pull structured data (dates, names, obligations, metrics) into tables |
See docs/modes.md for detailed mode architecture and pipeline reference.
- React 18 + TypeScript — UI framework
- Fluent UI React (
@fluentui/react-components) — component library and theming - Office.js — Word JavaScript API for document read/write
- Webpack — bundler and dev server
- KS Backend — FastAPI + Temporal agent (separate repo)
src/
taskpane/
components/
chat/ ChatPanel, MessageBubble, InputBox, ThreadList, ModeSelector
document/ WordActionStatusLine, EditPlanCard, CommentActionDetails, ToolStepper
citations/ CitationMark, CitationFooter
mentions/ MentionBar, MentionChip, MentionDropdown
settings/ SettingsPanel, SettingsModal
hooks/
useKSChat.ts Chat orchestration: prompt building, streaming, post-processing
useKSThreads.ts Thread CRUD and navigation
useWordDoc.ts Word API operations (edit, comments, styles, gaps)
useMentions.ts @ mention scoping with folder browser
services/
ksThreadApi.ts Thread CRUD
ksMessageApi.ts Message send + list
ksStreamApi.ts SSE streaming client
folderApi.ts Folder browsing for mentions
lib/
wordPrompts.ts Prompt builders, fence extraction, output parsers
modes.ts Mode definitions (label, fence, command mapping)
slashCommands.ts Command metadata
styles/ CSS modules (glass, animations)
types.ts Shared type definitions
types/
ksBackend.ts KS backend API type definitions
App.tsx Root component with settings routing
theme.ts Fluent UI theme configuration
commands/
commands.ts Office ribbon command handlers
manifest.xml Office add-in manifest
Two paths — end users use the hosted manifest; developers build and sideload locally.
The hosted add-in runs at https://msword.knowledgestack.ai. To install it into Word:
- Download the manifest: manifest_prod.xml (right-click → Save link as…)
- Open Word (desktop). Go to Insert → My Add-ins → Manage My Add-ins → Upload My Add-in.
- On macOS: Insert → Add-ins → More Add-ins → MY ADD-INS → Upload My Add-in.
- On Word on the Web: Home → Add-ins → More Add-ins → Upload My Add-in.
- Select the downloaded
manifest_prod.xml. - The KS Chat button appears in the Home ribbon.
- On first launch, enter your API settings:
- API URL:
https://api.knowledgestack.ai - API Key: issue one from app.knowledgestack.ai
- API URL:
For enterprise rollout (centralized deployment via Microsoft 365 admin center, tenant-wide install, AppSource publishing): see docs/DISTRIBUTION.md.
- Node.js v18+
- Microsoft Word (desktop, Mac or Windows)
- KS backend running locally (see ks-backend repo)
In the ks-backend repo, run three terminals:
Terminal 1: make dev-stack # Docker services (Postgres, Redis, Temporal, etc.)
Terminal 2: make dev-api # FastAPI (nginx exposes https://localhost:18000)
Terminal 3: make dev-agent # Agent worker (Temporal)
make install # npm install (first time only)
make dev # Webpack dev server on https://localhost:1122
Once webpack finishes compiling:
make sideload # Registers the manifest in Word (one-time)
- Open any Word document
- Go to the Home tab
- Click KS Chat in the ribbon
- On first load, enter your settings:
- API URL:
https://localhost:18000 - API Key: your KS API key (seed data:
sk-user-pwuser1-personal-api-key-secret-pwuser1)
- API URL:
- Start chatting
KS backend must allow https://localhost:1122. In ks-backend's .env.dev:
CORS_EXTRA_ORIGINS=["https://localhost:1122"]
If the add-in doesn't appear in the ribbon:
make reset # Kills servers, clears sideloaded manifests, reinstalls
Then quit Word completely (Cmd+Q), restart make dev, run make sideload, and reopen Word.
make install # Install npm dependencies
make dev # Start webpack dev server
make sideload # Register manifest in Word
make clean # Kill dev servers and remove sideloaded manifests
make reset # Full reset: clean + install
See docs/SETUP.md for setup and deployment details, and docs/DISTRIBUTION.md for enterprise distribution options (shared SaaS, dedicated, hybrid, AppSource).
The short version: a Word add-in is a manifest XML + a hosted frontend. Deploy the dist/ build to any static HTTPS host, update the manifest URLs, and share the manifest with users.
- ks-cookbook — 32 production-style agent flagships across banking, legal, healthcare, insurance, real estate, sales, HR, engineering, government, pharma, and energy.
- ks-mcp — Model Context Protocol server that plugs Knowledge Stack into LangChain, LangGraph, CrewAI, Temporal, OpenAI Agents SDK, pydantic-ai, Claude Desktop, and Cursor.
- ks-sdk-python — Python SDK (
ksapion PyPI). - ks-sdk-ts — TypeScript SDK (
@knowledge-stack/ksapion npm). - ks-docs — central developer docs (Mintlify → docs.knowledgestack.ai).
- 🎮 Discord — fastest channel for architecture and implementation questions
- 💬 GitHub Discussions — long-form questions, showcase posts
- 🐛 File an issue — bugs, feature requests, docs fixes
- 🔒 Report a security issue — privately, please
See CONTRIBUTING.md and the PR template. Every PR auto-requests review from @knowledgestack/ks-admins.
MIT.