# Agent chat
> Ask an AI agent questions about your data, or to create and edit Dives in the MotherDuck UI, and learn where model inference runs for your organization's cloud region.
Agent chat lets you ask an AI agent questions about your data in the [MotherDuck UI](https://app.motherduck.com/). You can also ask the agent to create and edit [Dives](/key-tasks/dives/) for you. Agent chat works inside Dives.

Organization Admins can turn Agent chat on or off on the [AI Features](https://app.motherduck.com/settings/ai-features) page in Settings.

## Chat with a Dive

Ask an AI agent questions to get answers to anything you want to know about a Dive. The agent sees the Dive's queries, the data behind them, and the view you have open, so you can drill into the numbers without writing SQL.

![Agent chat panel open beside a Dive showing music-track metrics and a tempo distribution](../img/agent-chat.png)

1. Open a Dive in the [MotherDuck UI](https://app.motherduck.com/).
2. In the chat panel, type a question, or pick a suggested one such as "What stands out about the current view?" or "How are these numbers calculated?"

Every message you send includes the Dive's current state, including the filters and selections you've applied so the answers are tailored to what's shown on your screen.

## Create and edit Dives

Use the agent chat to edit a Dive or build a new one in natural language. The agent writes the Dive's code and queries for you.

- **Create a Dive.** Describe what you want to see, for example "Make a Dive of weekly sign-ups by region."
- **Edit the Dive you're viewing.** Ask for a change such as "Add a chart of revenue by month," "Change the date filter to the last 90 days," or "Fix the query behind the second chart."
- **Update its title and description.** Ask the agent to rename the Dive or rewrite its description.
- **Share the data behind it.** If the Dive queries databases you own that aren't shared with your organization, teammates can't view it. Ask the agent to [share the Dive's data](/sql-reference/mcp/dives/share-dive-data/), and it will create organization-wide [shares](https://motherduck.com/docs/key-tasks/sharing-data/sharing-overview/#creating-a-share) for those databases. You need to own the Dive.
- **Delete a Dive.** Ask the agent to delete a Dive you no longer need. Deleting is permanent and can't be undone.

After each change, the agent opens the Dive so you can check the result. Every edit saves a new version. Earlier versions are preserved in the Dive's [version history](/key-tasks/dives/#version-history). The agent works using your account permissions, so it can only perform the same actions as your account.

## How conversations work

- **Changes Dives, not your data.** The agent can [create and edit Dives](#create-and-edit-dives) when you ask, but it can't change your tables or databases. When you ask for a data change, it writes the SQL for you to run.
- **One conversation per Dive.** Sessions are scoped to a specific Dive. Each one has its own chat.
- **Not saved.** Chats live in your browser tab only. Reloading or closing the tab clears them.

## Data processing and regions

Agent chat uses models hosted on Amazon Bedrock. Where model inference runs depends on your organization's [cloud region](/about-motherduck/cloud-regions/#agent-chat).

Amazon Bedrock has a zero data retention policy and does not share your prompts or data with model providers.


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `GET https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

URL-encode query parameter values and send a GET request:

```text
GET https://motherduck.com/docs/api/feedback/agent?page_path=%2Fkey-tasks%2Fai-and-motherduck%2Fai-in-the-ui%2Fagent-chat%2F&page_title=Agent%20chat&text=<url-encoded user feedback, max 2000 characters>
```

Optionally append `&source=<url-encoded interface identifier>` such as `claude.ai` or `chatgpt`.

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed query parameters, and `429` when rate-limited.
