doconda (or @doconda/sdk) and pass doconda.tools() as the toolConfig of the Bedrock Converse API. When
the model asks for the create_document tool, you run it with run() and get back the Word file (.docx) and its PDF
with their download links.
Steps
- Enable a model in your Bedrock account and put its id in
BEDROCK_MODEL_ID. AWS credentials come from your environment (AWS_REGION,AWS_ACCESS_KEY_ID…). - Create a Doconda API key in the dashboard, under API keys, and put it in
DOCONDA_API_KEY. - Install the dependencies and run the Converse loop: while
stopReasonistool_use, run the tool and hand the result back to the model.
What you get back
The tool returns a short summary to the model, which passes it on to the user:status:ready,ready_with_warnings,needs_review(something in the report is worth checking) orfailed(not charged).links: the editable Word file and its PDF. They expire after 5 minutes; the agent gets fresh ones withget_document.
FAQ
Does it work with any Bedrock model?
Does it work with any Bedrock model?
With any model enabled in your account that supports tools in the Converse API. The tools are standard JSON Schema.
Can I ask for a PowerPoint or an Excel file with the same code?
Can I ask for a PowerPoint or an Excel file with the same code?
Yes.
create_document also creates PDF, PowerPoint and Excel files; the model picks format from what the user asks.How much does it cost?
How much does it cost?
You pay per delivered document; failed ones are not charged. What the agent does costs the same as the API. See
pricing.
Where are the documents stored?
Where are the documents stored?
In the European Union (Ireland), and the AI that processes them also runs in the EU.
Keep reading
- Amazon Bedrock: the full guide, also with the AI SDK.
- Quickstart: your first document with the API.