Skip to main content
An LLM returns text, not files. To get a Word, PowerPoint or Excel file, ask the model for the content in Markdown and pass it to Doconda with the format you want: docx, pptx, xlsx or pdf. Or give your agent Doconda’s tools with doconda.tools() and let it create the file itself.

Why the model can’t do it alone

  • The model answers with Markdown or a code block, not a .docx you can download.
  • If you ask it for code that builds the file, you have to run that code and debug what fails.
  • A file generated without errors can still open badly: tables that overflow, text that doesn’t fit the slide.
  • Each format needs its own library and its own code.

Turn the model’s text into a file

create() waits until the document finishes, so the script prints ready and saves report.pptx. Your Markdown is used as is; with no content of your own, describe the document in prompt and Doconda writes it. What you get back: Before delivery, the agent checks its own file and the rendered pages and fixes what it finds. A document that can’t be delivered ends in failed and isn’t charged.

Give your agent the tools

For any model with function calling, doconda.tools() returns the tools to create, edit and convert files. Each one has name, description, a JSON Schema (input_schema in Python, inputSchema in TypeScript) and run(args):
create_document returns a short summary the agent can pass on: the document’s id, format, status and download links, which expire after 5 minutes. To connect the tools on each platform, see Doconda in your agent.

FAQ

The model’s answer is text. Ask it for the content in Markdown and turn it into a .docx with documents.create(format="docx", content={"markdown": ...}), or let the agent call the create_document tool.
Use format="pptx" with your LLM’s Markdown in content. With no content of your own, describe the presentation in prompt and Doconda writes it. It comes out in 16:9, with its PDF.
Yes. There is an MCP server, SDK tools for Claude, OpenAI, Gemini, Bedrock, Vertex AI and the AI SDK, and the REST API. The full list is in Doconda in your agent.