boto3 or
@aws-sdk/client-bedrock-runtime) or into the AI SDK.
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_reportlists 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 inDOCONDA_API_KEY (from API keys). AWS credentials
come from your environment (AWS_REGION, AWS_ACCESS_KEY_ID…), like the rest of your code. BEDROCK_MODEL_ID is any
model enabled in your Bedrock account.
With Python
stopReason is no longer tool_use; the last message includes the spreadsheet’s download links.
With the AI SDK
With the Converse API (@aws-sdk/client-bedrock-runtime)
With the Converse API (@aws-sdk/client-bedrock-runtime)
Tools
The agent gets the eight Doconda tools; see the tools for what each one does.doconda.tools() returns them with name, description, a JSON Schema (inputSchema in TypeScript, input_schema
in Python) and run; the schema goes in the Converse toolSpec as inputSchema.json. A failed call returns
{ "error": "<code>", "message": "…" } instead of raising, so the model can correct itself.
Troubleshooting
Doconda: pass api_key or set DOCONDA_API_KEY.— The SDK found no key (in TypeScript:Doconda: pass { apiKey } or set DOCONDA_API_KEY.). SetDOCONDA_API_KEY, or pass the key toDoconda.- Bedrock rejects the model ID — The model must be enabled in your account and region, and support tool use in the Converse API.
- A tool result has
"error": "insufficient_balance"— The project’s balance can’t cover the document: top up in the dashboard, or ask forquality: "fast". - The download link stopped working — File links expire after 5 minutes; the agent calls
get_documentfor fresh ones.
Useful links
- Python SDK and TypeScript SDK.
- AWS Strands: a Strands agent on Bedrock and AgentCore.
- doconda-examples on GitHub: ready-to-run scripts.
- API reference.