+

Generate Word, Excel, PowerPoint and PDF
with OpenAI Agents SDK

Code

Python or TypeScript

Your agent acts. Doconda delivers the file.

Give your OpenAI Agents SDK agent Doconda's tools and it delivers 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 OpenAI Agents SDK's format.
  3. 03Your agent delivers the fileYour agent gets the link to the reviewed file.
import asyncio
import json
from agents import Agent, FunctionTool, Runner
from doconda import Doconda

def as_function_tool(t):
    async def invoke(ctx, args: str):
        return json.dumps(await asyncio.to_thread(t.run, json.loads(args)))
    return FunctionTool(name=t.name, description=t.description, params_json_schema=t.input_schema,
                        on_invoke_tool=invoke, strict_json_schema=False)

agent = Agent(
    name="Documents",
    instructions="Create the documents the user asks for and return their links.",
    model="gpt-5",
    tools=[as_function_tool(t) for t in Doconda().tools()],
)
print(Runner.run_sync(agent, "Write a memo for the team: the office closes on Friday").final_output)

FAQ

Common questions

01 / 04

How do I use Doconda in the OpenAI Agents SDK?

Turn doconda.tools() into FunctionTool (with strict_json_schema=False) or connect Doconda's MCP server with MCPServerStreamableHttp.

The document API for AI agents, ready for production.