Código
Python o TypeScript
Gemini decide. Doconda entrega el archivo.
Conecta Doconda con la llamada a funciones de Gemini (@google/genai) y entregará Word, Excel, PowerPoint y PDF terminados, editables y revisados.
- 01Instala el SDKpip install doconda o npm install @doconda/sdk, y tu API key.
- 02Dale las herramientas a tu agenteLas herramientas de Doconda, en el formato de Gemini.
- 03Tu agente entrega el archivoTu agente recibe el enlace al archivo, revisado.

import { type Content, GoogleGenAI } from "@google/genai"
import { Doconda } from "@doconda/sdk"
const ai = new GoogleGenAI({})
const tools = new Doconda().tools()
const contents: Content[] = [{ role: "user", parts: [{ text: "Hazme un Excel con el presupuesto del evento" }] }]
while (true) {
const res = await ai.models.generateContent({
model: "gemini-3.8-flash",
contents,
config: { tools: [{ functionDeclarations: tools.map((t) => ({ name: t.name, description: t.description, parametersJsonSchema: t.inputSchema })) }] },
})
if (!res.functionCalls?.length) {
console.log(res.text)
break
}
contents.push(res.candidates![0].content!)
const parts = await Promise.all(
res.functionCalls.map(async (call) => ({
functionResponse: { name: call.name, response: { result: await tools.find((t) => t.name === call.name)!.run(call.args ?? {}) } },
})),
)
contents.push({ role: "user", parts })
}
