Code
Python or TypeScript
GPT writes. Doconda delivers the file.
Give GPT Doconda's tools as functions and your agent delivers finished, editable, reviewed Word, Excel, PowerPoint and PDF files.
- 01Install the SDKpip install doconda or npm install @doconda/sdk, and your API key.
- 02Give your agent the toolsDoconda's tools, in OpenAI's format.
- 03Your agent delivers the fileYour agent gets the link to the reviewed file.

import json
from doconda import Doconda
from openai import OpenAI
openai = OpenAI()
tools = Doconda().tools()
specs = [{"type": "function", "function": {"name": t.name, "description": t.description,
"parameters": t.input_schema}} for t in tools]
messages = [{"role": "user", "content": "Write a memo for the team: the office closes on Friday"}]
while True:
message = openai.chat.completions.create(model="gpt-5", messages=messages, tools=specs).choices[0].message
messages.append(message)
if not message.tool_calls:
break
for call in message.tool_calls:
out = next(t for t in tools if t.name == call.function.name).run(json.loads(call.function.arguments))
messages.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps(out)})
print(message.content)
