+

Generate Word, Excel, PowerPoint and PDF
with Vercel AI SDK

Code

Python or TypeScript

Your app talks. Doconda delivers the file.

Turn Doconda's tools into AI SDK tools and your TypeScript or Next.js app delivers finished Word, Excel, PowerPoint and PDF files, with any model.

  1. 01Install the SDKpip install doconda or npm install @doconda/sdk, and your API key.
  2. 02Give your agent the toolsDoconda's tools, in Vercel AI SDK's format.
  3. 03Your agent delivers the fileYour agent gets the link to the reviewed file.
import { anthropic } from "@ai-sdk/anthropic"
import { generateText, isStepCount, jsonSchema, tool } from "ai"
import { Doconda } from "@doconda/sdk"

const tools = Object.fromEntries(new Doconda().tools().map((t) => [t.name, tool({
  description: t.description,
  inputSchema: jsonSchema(t.inputSchema),
  execute: (input) =>
    t.run(input as Record<string, unknown>),
})]))

const { text } = await generateText({
  model: anthropic("claude-sonnet-5-5"),
  tools,
  stopWhen: isStepCount(5),
  prompt: "Create a 5-slide deck about our quarterly results",
})  // the agent answers with the links to the file

FAQ

Common questions

01 / 04

How do I add documents to an AI SDK app?

Install @doconda/sdk, turn doconda.tools() into tools with tool() and jsonSchema(), and pass them to generateText or streamText. The agent gets the link to the file.

The document API for AI agents, ready for production.