+

Generate Word, Excel, PowerPoint and PDF
with Mastra

Code

Python or TypeScript

Mastra orchestrates. Doconda delivers the file.

Connect Doconda from a Mastra agent and get finished, editable, reviewed Word, Excel, PowerPoint and PDF files.

  1. 01Install the SDKpip install doconda or npm install @doconda/sdk, and your API key.
  2. 02Give your agent the toolsDoconda's tools, in Mastra's format.
  3. 03Your agent delivers the fileYour agent gets the link to the reviewed file.
import { Agent } from "@mastra/core/agent"
import { createTool } from "@mastra/core/tools"
import { Doconda } from "@doconda/sdk"

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

const agent = new Agent({
  id: "documentos",
  name: "Documentos",
  instructions: "Creas, revisas y editas documentos con Doconda.",
  model: "anthropic/claude-sonnet-5-5", // o cualquier otro proveedor
  tools,
})

const { text } = await agent.generate("Crea una presentación de 5 diapositivas sobre nuestros resultados del trimestre")
console.log(text)

FAQ

Common questions

01 / 03

How do I connect Doconda to Mastra?

With Mastra's MCPClient pointed at Doconda's MCP server, passing its tools to your agent.

The document API for AI agents, ready for production.