Skip to main content
Connect your OpenAI Agents SDK agent to Doconda so it can convert, create and edit Word, PowerPoint, Excel and PDF files. Wrap the Python SDK tools in FunctionTool, or connect the MCP server.

Capabilities

  • Create a Word, PowerPoint, Excel or PDF file, or an artifact, from a request or from Markdown the agent wrote.
  • Edit a file: only what is asked changes, and get_report lists every change.
  • Convert a file to another format with no AI, for example any file to Markdown so the agent can read it.
  • Read what people saved in an artifact, such as poll votes.

Setup

This integration uses a Doconda API key in DOCONDA_API_KEY (from API keys). The Agents SDK reads your OpenAI key from OPENAI_API_KEY.

With the Python SDK

doconda.tools() is JSON Schema, which the Agents SDK takes in FunctionTool:
result.final_output is the agent’s answer, with the memo’s download links. Set strict_json_schema=False: strict mode makes every field required, and most of Doconda’s are optional (prompt or markdown, style, name…). asyncio.to_thread keeps the event loop free while a document is made.

With MCP

client_session_timeout_seconds=300 raises the wait per call from the default 5 s. A tool call returns within about 4 minutes: with the finished document, or with its id and status when it takes longer, for the agent to check with get_document. To run the server locally instead of the remote one:

Tools

The agent gets the eight Doconda tools; see the tools for what each one does. doconda.tools() returns them with name, description, input_schema (JSON Schema) and run. A failed call returns { "error": "<code>", "message": "…" } instead of raising, so the model can correct itself.

Troubleshooting

  • The MCP call times out — The default 5 s per call is shorter than a document takes. Set client_session_timeout_seconds=300.
  • Doconda: pass api_key or set DOCONDA_API_KEY. — The SDK found no key: set DOCONDA_API_KEY, or pass api_key to Doconda.
  • The download link stopped working — File links expire after 5 minutes; the agent calls get_document for fresh ones.