Code
Python or TypeScript
Bedrock reads documents. Doconda makes them.
Give your Amazon Bedrock agent Doconda's tools and it will deliver finished, editable, reviewed Word, Excel, PowerPoint and PDF files.
Your AWS credentials, as usual
AWS credentials come from your environment (`AWS_REGION`, `AWS_ACCESS_KEY_ID`…), like the rest of your code. Doconda only needs its own key in `DOCONDA_API_KEY`.
Converse in Python or TypeScript
In Python with `boto3`; in TypeScript with `ConverseCommand` from `@aws-sdk/client-bedrock-runtime`, or with `@ai-sdk/amazon-bedrock`. Each tool's schema goes in the Converse `toolSpec` as `inputSchema.json`.
A model enabled in your region
`BEDROCK_MODEL_ID` must be a model enabled in your account and region that supports tool use in Converse; otherwise Bedrock rejects the ID. The loop ends when `stopReason` is no longer `tool_use`.
- 01Install the SDKpip install doconda or npm install @doconda/sdk, and your API key.
- 02Give your agent the toolsDoconda's tools, in Amazon Bedrock's format.
- 03Your agent delivers the fileYour agent gets the link to the reviewed file.

import boto3
from doconda import Doconda
bedrock = boto3.client("bedrock-runtime")
tools = Doconda().tools()
spec = [{"toolSpec": {"name": t.name, "description": t.description,
"inputSchema": {"json": t.input_schema}}} for t in tools]
messages = [{"role": "user", "content": [{"text": "Make an Excel with the event budget"}]}]
res = bedrock.converse(modelId=MODEL_ID, messages=messages,
toolConfig={"tools": spec})
# the model asks for create_document → run it and send back the result
use = next(b["toolUse"] for b in res["output"]["message"]["content"] if "toolUse" in b)
out = next(t for t in tools if t.name == use["name"]).run(use["input"])
out["links"] # {"xlsx": "https://…", "pdf": "https://…"}
