# AI features and your data
> What each MotherDuck AI feature sends to a model, which provider processes it, how admins turn features off, and how AI usage is billed.
Several MotherDuck features send data to an AI model: the AI SQL functions, the SQL assistant, and agent chat. This page lists, for each feature, what leaves MotherDuck, which provider processes it, and how the usage is billed. Use it to answer a security review or to decide which features to turn on for your organization.

For where each provider runs inference relative to your organization's region, see [cloud regions](/about-motherduck/cloud-regions/#ai-functions). For how MotherDuck may use Customer Data, see the [Product Terms of Service](https://motherduck.com/terms-of-service/).

## What reaches a model

MotherDuck sends data to a model only when you, or an agent acting as you, call one of these features. Storing data in MotherDuck and running ordinary SQL doesn't send anything to a model.

| Feature | What is sent | Processed by |
|---|---|---|
| [`prompt`](/sql-reference/motherduck-sql-reference/ai-functions/prompt/) | The input text of each row, plus the `json_schema` or `struct` you pass | Azure OpenAI |
| [`embedding`](/sql-reference/motherduck-sql-reference/ai-functions/embedding/) | The input text of each row | Azure OpenAI |
| [`prompt_jev`](/sql-reference/motherduck-sql-reference/ai-functions/prompt-jev/) | The input values of each row and your questions | [TypeSafe](/integrations/data-science-ai/typesafe/), in the United States |
| [SQL assistant functions](/sql-reference/motherduck-sql-reference/ai-functions/sql-assistant/) and [FixIt](/key-tasks/ai-and-motherduck/ai-in-the-ui/ai-features-in-notebooks/#how-fixit-works) | Your question or SQL, any error message, and the schema of the tables considered (table and column names, types, comments, and view definitions) | Azure OpenAI |
| [Agent chat](/key-tasks/ai-and-motherduck/ai-in-the-ui/agent-chat/) | Your messages and the results of the queries and tools the agent runs | Anthropic Claude models on Amazon Bedrock |
| [Web search in agent chat](/key-tasks/ai-and-motherduck/ai-in-the-ui/agent-chat/#web-search) | The searches and page fetches the agent makes | Context.dev, in the United States |

Agent chat sends query results to the model, so the agent sees whatever rows its queries return. It works with your permissions, so it can't read data you can't read. For how Amazon Bedrock handles agent chat prompts, see [Data processing and regions](/key-tasks/ai-and-motherduck/ai-in-the-ui/agent-chat/#data-processing-and-regions).

### The MotherDuck MCP server

The [MotherDuck MCP server](/key-tasks/ai-and-motherduck/mcp-workflows/) doesn't call a language model. It runs the SQL your AI client asks for and returns the results to that client. The model in your AI client, such as Claude, ChatGPT, or Cursor, then processes those results under that provider's terms, not MotherDuck's. To limit what an AI client can reach, [restrict it to read-only access](/key-tasks/ai-and-motherduck/mcp-workflows/securing-read-only-access/).

The one exception is the [`ask_docs_question`](/sql-reference/mcp/core/ask-docs-question/) tool. It sends the text of your question to RunLLM, the provider of the MotherDuck documentation assistant. It doesn't send your data.

## Turn AI features on or off

Admins control AI features for the whole organization on the [AI Features](https://app.motherduck.com/settings/ai-features) settings page. Each feature has its own switch:

- **Prompt and Embedding SQL Functions** for `prompt` and `embedding`
- **Jev SQL Functions** for `prompt_jev`
- **Agent Chat**
- **Web Search for Agent Chat**, off by default

Under each switch, the page names the provider and where requests from your organization are processed.

![AI Features settings page with the AI Session Cap and a switch for each AI feature](img/ai-features-settings.png)

The switches apply to every user and service account in the organization. You can't turn an AI feature off for a single user or service account from this page.

## How AI usage is billed

`prompt`, `embedding`, `prompt_jev`, and agent chat are billed in AI Units based on the model tokens they use. See [AI function pricing](/about-motherduck/billing/pricing/#ai-function-pricing) for the rates and [Calculate token charges](/about-motherduck/billing/pricing/#calculate-token-charges) for the formula. A per-Duckling session cap, which admins set on the AI Features page, limits how many AI Units the AI SQL functions can use. The SQL assistant functions have [their own pricing](/about-motherduck/billing/pricing/#sql-assistant-functions).

Using the MotherDuck MCP server from your own AI client doesn't use AI Units. MotherDuck bills the queries it runs as [compute](/about-motherduck/billing/pricing/#compute-pricing), and your AI provider bills the tokens your client uses. If a query the client runs calls `prompt` or another AI function, that call uses AI Units like any other.

MotherDuck doesn't report AI Units or tokens through SQL. No function or [`md_information_schema`](/sql-reference/motherduck-sql-reference/md_information_schema/introduction/) view shows AI usage per query or per day, and you can't read the session cap with SQL. To estimate the cost of a workload, run it on a sample, count the tokens, and apply the formula in [Calculate token charges](/about-motherduck/billing/pricing/#calculate-token-charges). To see what you were billed, open your invoices on the [Billing page](https://app.motherduck.com/settings/billing).

## Related

- [Security overview](/concepts/security-and-access/security/) for encryption, access control, and compliance
- [Cloud regions](/about-motherduck/cloud-regions/) for where AI requests are processed in each region
- [Legal](/about-motherduck/legal/) for the Terms of Service and other policies


---

## 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=%2Fabout-motherduck%2Fai-and-your-data%2F&page_title=AI%20features%20and%20your%20data&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.
