Skip to main content
Install openai-agents and doconda, and wrap each tool from doconda.tools() in a FunctionTool (or connect the remote MCP server with MCPServerStreamableHttp). The agent calls create_document and its final answer carries the links to the Word, PowerPoint, Excel or PDF file it created.

Steps

  1. Put your OpenAI key in OPENAI_API_KEY and your Doconda key (dashboard → API keys) in DOCONDA_API_KEY.
  2. Install the dependencies: pip install openai-agents doconda.
  3. Convert the tools and run the agent:
strict_json_schema=False because strict mode marks every field as required, and almost all of Doconda’s are optional (prompt or markdown, style, name…). With MCP instead of FunctionTool, pass the remote server in mcp_servers and raise the per-call wait with client_session_timeout_seconds=300 (5 s by default): a document takes longer to be ready. The code is in the Agents SDK guide.

What you get back

Each create_document call returns a short summary to the agent:
  • format: docx, pdf, pptx, xlsx or artifact. Word, PowerPoint and Excel files always come with their PDF.
  • status: ready, ready_with_warnings, needs_review or failed (not charged).
  • Links expire after 5 minutes; the agent gets fresh ones with get_document.

FAQ

Yes. It has upload_file, review_document (fixes problems without touching the content) and edit_document (changes only what is asked).
create_document waits until the document is ready. A simple document takes seconds; one at standard quality, a few minutes. See quality levels.
Whatever the agent does counts as if you did it with the API: same project, same price. See pricing.

Keep reading