{"slug": "multi-doc-agent-workflows-in-word", "title": "Multi doc agent workflows in Word", "summary": "Alan Yahya details how Microsoft Word's multi-document agent workflows separate agent sessions, active documents, turn documents, and document versions to prevent errors when users move between documents. The system supports background execution, tool access control, durable state, and finalization to ensure reliable multi-document interactions.", "body_md": "# Multi doc agent workflows in Word\n\n[Alan Yahya](https://www.linkedin.com/in/alan-yahya/)5 min read\n\nMost integrated agent systems, like Claude for Word, are scoped to a single document. Our users often work across multiple word documents at once, so we felt it was important to make it as convenient to move between documents as possible.\n\nTo do so, the system keeps four concepts separate:\n\nAgent Session – the ongoing conversation and execution history.\n\nActive Document – the document currently open in Word.\n\nTurn Document – the document the current prompt is working on.\n\nDocument Version – a saved version of the document created after approved changes are applied.\n\nKeeping these identities separate prevents mistakes when users move between documents.\n\nFor example, a user can:\n\nStart a conversation in one document.\n\nOpen a citation that points to another document.\n\nReturn to the original document.\n\nApply changes only to the correct source document.\n\n## Background Agent Execution\n\nWhen a user submits a request from Word, the add-in immediately returns control to the user instead of waiting for the agent to finish.\n\nThe process works as follows:\n\nThe add-in creates a run record.\n\nIt subscribes to the live event stream.\n\nIt sends the request to the backend.\n\nThe backend creates a persistent turn and starts execution.\n\nThe request includes:\n\nCurrent document state\n\nSelected document identity\n\nSession identity\n\nTool permissions\n\nUser prompt\n\nFor a new conversation, the session becomes linked to the current document. For an existing conversation, the session keeps its original document while the request specifies which document is currently active.\n\n## Tool Access Control\n\nAgents only receive tools that are explicitly allowed by the selected profile and tool policy.\n\nFor example:\n\nA user may allow web search.\n\nThe same user may block access to other documents.\n\nDisabled tools are completely removed from the agent's available capabilities rather than being treated as optional instructions.\n\nUsers control these permissions through the Word add-in's agent settings. The selected profile and permissions are reused in future sessions until changed.\n\n## Durable State\n\nAll activity is written to persistent storage while the run is executing.\n\nThis allows the session to be reconstructed even if:\n\nThe task pane reloads\n\nWord switches documents\n\nThe client misses events\n\nThe live stream improves responsiveness, but the stored session history remains the authoritative source of truth.\n\n## Finalization\n\nWhen execution finishes:\n\nThe backend stores the final result.\n\nActive run information is cleared.\n\nA finalized-turn event is emitted.\n\nThe add-in reloads the session from backend state.\n\nThe review queue is populated only from this finalized backend state, ensuring that partial streaming updates are never treated as the final result. This is all synchronised with our version control system, for full records of the agent activity as well as the document diff.", "url": "https://wpnews.pro/news/multi-doc-agent-workflows-in-word", "canonical_source": "https://lexifina.com/blog/multi-doc-agent-workflows-in-word", "published_at": "2026-06-18 22:48:09+00:00", "updated_at": "2026-06-18 23:00:49.900810+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-products"], "entities": ["Microsoft Word", "Alan Yahya", "Claude for Word"], "alternates": {"html": "https://wpnews.pro/news/multi-doc-agent-workflows-in-word", "markdown": "https://wpnews.pro/news/multi-doc-agent-workflows-in-word.md", "text": "https://wpnews.pro/news/multi-doc-agent-workflows-in-word.txt", "jsonld": "https://wpnews.pro/news/multi-doc-agent-workflows-in-word.jsonld"}}