Skip to main content

Connect an LLM to a live Office document

Editor SDK is required

Editor AI SDK cannot run without Editor SDK. It is an extension, not a standalone SDK. Your application must first open and control the document through Editor SDK. Editor AI SDK then exposes those Editor SDK operations as structured tools for an LLM.

Editor AI SDK connects Editor SDK document tools to your AI Agent: an LLM chooses structured Editor SDK tools, the host application validates those calls, and Editor SDK applies them to the Word, Spreadsheet, or Presentation document.

Current availability

Editor AI SDK is published on npm as @thinkfree.dev/tfo-ai-sdk. It remains in Preview and requires Editor SDK (@thinkfree.dev/tfo-sdk). Use bridgeToolsViaSdk() to register document tools with your AI Agent integration. Your application supplies the model connection, tool-calling loop, and chat UI.

userchat UILLM or relaytool callEditor SDKopen document

The model receives the prompts, conversation history, tool names, descriptions, JSON schemas, and tool results that your application sends. Including document-read results in the conversation also sends document content to the model provider. Your application controls the data sent, authorization, user approval, execution limits, and audit.

How the pieces fit

PieceProvided byWhat it does
Document toolsEditor SDK - app.getTools()Returns the editor's tool catalog as executable objects (name, description, inputSchema, execute)
Module promptEditor SDK - app.getSystemPrompt()Optional system prompt describing the document model and API conventions of the open module
Tool loop and chat UIYour applicationSends schemas to the model, validates each tool call, executes approved tools, returns results
Provider connectionYour application or relayDirect provider call for local experiments; a trusted relay for shared deployments

What you can try today

CapabilityStatusWhere to verify it
Word, Spreadsheet, and Presentation tool discoveryAvailableEditor AI SDK Playground
Direct Anthropic, OpenAI, and Gemini connectionDevelopment onlyPlayground provider settings
Server relay connectionAvailable as an integration patternPlayground and relay configuration guide
Tool-call loop that edits a live documentAvailablePlayground
Approval UI, tenant policy, and production audit serviceApplication responsibilitySafety guide
Editor AI SDK npm packagePublic Previewnpm package

For a local experiment, the browser can call a provider directly. For a shared or production service, use a relay so the provider credential never reaches browser JavaScript.

Direct modelocal experiment onlyBrowserholds the keyprovider API callthe key is visible to the pageLLM providerthird partyRelay modeshared and productionBrowserno keyrelay requestRelay serverholds the keyrequest + keyLLM providerthird partyOnly the provider call moves.The tool loop and approval stay in the browser.

Start with the quickstart, then set up the relay server and apply the safety checklist.

Open the Editor AI SDK Playground