Skip to main content
Pass the tools from doconda.tools() as the toolConfig of the Bedrock Converse API, and run each tool the model asks for with run(). When you ask for a Word document, the model calls create_document with format: "docx" and gets back download links to the .docx and its PDF.

Steps

  1. 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…).
  2. Create a Doconda API key in the dashboard (API keys) and put it in DOCONDA_API_KEY.
  3. Run the Converse loop: while stopReason is tool_use, run the tool and hand the result back to the model.
The same loop works for your own agent on Bedrock: the model decides when to create the document and you only run the tool.

What you get back

create_document returns a short summary to the model, which passes it on to the user:
  • links: the editable Word file and its PDF. They expire after 5 minutes; the model gets fresh ones with get_document.
  • status: ready or failed. Failed documents are not charged.
  • When a call fails, the tool returns { "error": "<code>", "message": "…" } instead of raising, so the model can read it and react.

FAQ

With any model enabled in your account that supports tool use in the Converse API. The tools are standard JSON Schema.
Yes. create_document also makes PDF (pdf), PowerPoint (pptx) and Excel (xlsx) files; the model picks format from what the user asks.
The same as the API: a document from a sentence costs €0.15 at fast, €0.50 at standard and €1.50 at best. Failed documents are not charged. See pricing.
In the European Union (Ireland), and the AI that processes them also runs in the EU.