> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doconda.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to generate a PowerPoint from Amazon Bedrock

> Give your Bedrock agent the tools from doconda.tools(): it creates an editable 16:9 .pptx with its PDF and returns the link.

Install `@doconda/sdk` with the AI SDK (`@ai-sdk/amazon-bedrock`), or `doconda` with Strands Agents, and give the
Bedrock model the tools from `doconda.tools()`. When you ask it for a presentation, it calls `create_document` with
`format: "pptx"` and you get the PowerPoint file and its PDF with their download links.

## 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. Put your Doconda API key (dashboard → **API keys**) in `DOCONDA_API_KEY`.
3. Connect the tools and ask for the presentation:

<CodeGroup>
  ```ts TypeScript theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  // npm install ai @ai-sdk/amazon-bedrock @doconda/sdk
  import { bedrock } from "@ai-sdk/amazon-bedrock"
  import { generateText, isStepCount, jsonSchema, tool } from "ai"
  import { Doconda } from "@doconda/sdk"

  const doconda = new Doconda()
  const tools = Object.fromEntries(
    doconda.tools().map((t) => [
      t.name,
      tool({ description: t.description, inputSchema: jsonSchema(t.inputSchema), execute: (input) => t.run(input as Record<string, unknown>) }),
    ]),
  )

  const { text } = await generateText({
    model: bedrock(process.env.BEDROCK_MODEL_ID!),
    tools,
    stopWhen: isStepCount(5),
    prompt: "Create a 5-slide presentation on our quarterly results",
  })

  console.log(text)
  ```

  ```python Python (Strands) theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  # pip install strands-agents doconda
  import json
  import os

  from doconda import Doconda
  from strands import Agent
  from strands.models import BedrockModel
  from strands.tools import PythonAgentTool


  def as_strands_tool(t):
      def run(tool_use, **_):
          out = t.run(tool_use["input"])
          return {"toolUseId": tool_use["toolUseId"], "status": "success", "content": [{"text": json.dumps(out)}]}

      spec = {"name": t.name, "description": t.description, "inputSchema": {"json": t.input_schema}}
      return PythonAgentTool(t.name, spec, run)


  agent = Agent(
      model=BedrockModel(model_id=os.environ["BEDROCK_MODEL_ID"]),
      tools=[as_strands_tool(t) for t in Doconda().tools()],
  )

  agent("Create a 5-slide presentation on our quarterly results")
  ```
</CodeGroup>

The AI SDK runs the tool-call loop for you; so does Strands. If you use `boto3` directly, the Converse API loop is in the
[Bedrock guide](/en/agents/bedrock).

## What you get back

```json theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
{
  "id": "doc_01JAB3…",
  "format": "pptx",
  "status": "ready",
  "links": { "pptx": "https://…", "pdf": "https://…" },
  "links_note": "Links expire in 5 minutes: call get_document for fresh ones."
}
```

* An editable 16:9 PowerPoint with native charts and a theme that slides you add later follow, plus its PDF.
* `status`: `ready`, `ready_with_warnings`, `needs_review` or `failed` (not charged).
* Links expire after 5 minutes; the agent gets fresh ones with `get_document`.

## FAQ

<AccordionGroup>
  <Accordion title="Can it use my company's template?">
    Yes. Upload the presentation with `upload_file` and ask for "our template's design": the result starts from its
    slides (at `standard` and `best` quality).
  </Accordion>

  <Accordion title="Can I change a slide later?">
    Yes, with `edit_document`: it adds, reorders or removes slides keeping the design; everything else stays the same.
  </Accordion>

  <Accordion title="Does it work on Amazon Bedrock AgentCore?">
    Yes. The Strands agent is the same; store the Doconda key as a secret (`DOCONDA_API_KEY`), not in the code.
  </Accordion>

  <Accordion title="How much does it cost?">
    You pay per delivered document, by quality level. See [pricing](/en/guides/account#pricing).
  </Accordion>
</AccordionGroup>

## Keep reading

* [Amazon Bedrock](/en/agents/bedrock) and [Strands Agents](/en/agents/strands): the full guides.
* [Quickstart](/en/quickstart).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.