# Multi doc agent workflows in Word

> Source: <https://lexifina.com/blog/multi-doc-agent-workflows-in-word>
> Published: 2026-06-18 22:48:09+00:00

# Multi doc agent workflows in Word

[Alan Yahya](https://www.linkedin.com/in/alan-yahya/)5 min read

Most 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.

To do so, the system keeps four concepts separate:

Agent Session – the ongoing conversation and execution history.

Active Document – the document currently open in Word.

Turn Document – the document the current prompt is working on.

Document Version – a saved version of the document created after approved changes are applied.

Keeping these identities separate prevents mistakes when users move between documents.

For example, a user can:

Start a conversation in one document.

Open a citation that points to another document.

Return to the original document.

Apply changes only to the correct source document.

## Background Agent Execution

When a user submits a request from Word, the add-in immediately returns control to the user instead of waiting for the agent to finish.

The process works as follows:

The add-in creates a run record.

It subscribes to the live event stream.

It sends the request to the backend.

The backend creates a persistent turn and starts execution.

The request includes:

Current document state

Selected document identity

Session identity

Tool permissions

User prompt

For 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.

## Tool Access Control

Agents only receive tools that are explicitly allowed by the selected profile and tool policy.

For example:

A user may allow web search.

The same user may block access to other documents.

Disabled tools are completely removed from the agent's available capabilities rather than being treated as optional instructions.

Users control these permissions through the Word add-in's agent settings. The selected profile and permissions are reused in future sessions until changed.

## Durable State

All activity is written to persistent storage while the run is executing.

This allows the session to be reconstructed even if:

The task pane reloads

Word switches documents

The client misses events

The live stream improves responsiveness, but the stored session history remains the authoritative source of truth.

## Finalization

When execution finishes:

The backend stores the final result.

Active run information is cleared.

A finalized-turn event is emitted.

The add-in reloads the session from backend state.

The 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.
