New

docx-editor 1.x has shipped. Vue support, i18n, agents. Read the migration guide →

API Referencev1.0.2

@eigenpal/docx-editor-agents/ai-sdk/server

Vercel AI SDK adapter (server side). Opt-in.

The core toolkit is runtime-agnostic. Use this entry only if you're wiring `streamText` / `generateText` from `ai` in your route handler. For LangChain, the Anthropic SDK, or OpenAI direct, import `getToolSchemas` from `@eigenpal/docx-editor-agents/server` and shape it however your runtime expects.

Functions(1)

Get tool schemas in Vercel AI SDK shape (`{ [name]: Tool }`). Pass directly to `streamText({ tools })`. No `execute` is set, so AI SDK forwards each tool call to the client's `useChat({ onToolCall })` handler — wire that to `useDocxAgentTools().executeToolCall` from `@eigenpal/docx-editor-agents/ai-sdk/react` or `@eigenpal/docx-editor-agents/react`.

declare function getAiSdkTools(): Record<string, Tool>;