> For the complete documentation index, see [llms.txt](https://docs.uibakery.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uibakery.io/ui-bakery-agent.md).

# UI Bakery Agent

Chat with an AI agent that works directly with your data, apps, and workspace — with exactly the access you already have.

UI Bakery Agent is an AI assistant built into your workspace. Describe what you need in a chat, and the Agent does the work: it queries your connected data sources, answers with numbers, tables, and charts, builds and updates apps, and helps you manage the workspace.

* The Agent works **directly with your data**. You do not need to build an app or write a query first: ask a question, and the Agent finds the right data source and runs the request for you.
* The Agent acts **on your behalf**. It can use only the data sources, apps, and workspace settings that your UI Bakery user can access. It never has more permissions than you do.

{% hint style="info" %}
UI Bakery Agent is available to workspace admins and editors. If you do not see the **Agent** tab, the Agent is not enabled for your workspace yet.
{% endhint %}

### Open the Agent

1. Open your workspace.
2. In the sidebar, switch from **Apps** to **Agent**.
3. Type your request, or pick one of the suggested prompts.

Chats are saved and personal: other workspace members do not see yours. Mention an app, data source, or user with `@` to point the Agent at the exact resource.

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2FIzANT806F6J4wjcQ2dYu%2Fagent-main-screen.png?alt=media&amp;token=332b0d74-9068-440c-abb4-194803b9327b" alt=""><figcaption></figcaption></figure>

### What you can ask

* **Work with your data** — find answers in connected data sources, calculate metrics, look up records, and update data when you ask for a change.
* **Build and update apps** — create apps and modules, change pages, components, and actions, and publish releases.
* **Manage the workspace** — review users, roles, and permissions, invite people, and check audit logs and usage credits.
* **Analyze files** — attach spreadsheets, documents, or images, and combine their contents with your data.

Example prompts:

```
Show me a breakdown of revenue this month and our top customers.
```

```
How many orders in the "Orders DB" data source are still unpaid, and which customers do they belong to?
```

```
Compare the attached price list with the products table and list the items where the price differs.
```

### Permissions

The Agent has no access of its own. Every request runs as you, so your UI Bakery permissions define what the Agent can do.

| Your access to a data source | What the Agent can do                                                                 |
| ---------------------------- | ------------------------------------------------------------------------------------- |
| No access                    | The Agent does not see it and cannot query it.                                        |
| Edit permission              | The Agent can run requests against it, including requests that change or delete data. |

The same applies to apps and to users and roles: what you cannot open or manage, the Agent cannot either.

To change what the Agent can reach, change the user's role or the data source permissions. There is no separate access setup for the Agent. See [Role permissions](https://docs.uibakery.io/concepts/workspace-management/role-permissions).

### Approve actions

By default, the Agent looks things up on its own. Before any action that can change something — including running a request against a data source — it asks for your approval: **Allow once**, **Always allow**, or **Deny once**.

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2FLYkuwMzQfXbhYxr2xxIn%2Fagent-sql-approval.png?alt=media&amp;token=2bd7d542-0b65-45ab-a7e2-6b5d329310ed" alt=""><figcaption></figcaption></figure>

To be asked less often, open **Settings** in the chat and go to **Tool permissions**. For each tool, choose:

* **Ask** — ask before every action. This is the default.
* **Auto** — the Agent checks each action and asks only when it detects a potentially unsafe one. When it asks, it shows the reason.
* **Always** — run every action without asking.

{% hint style="warning" %}
Requests run against real data. If you ask the Agent to change or delete records, it does so in the data source itself. Review such requests before you approve them.
{% endhint %}

The Agent's actions are recorded in the workspace [audit logs](https://docs.uibakery.io/concepts/workspace-management/audit-logs).

### Related documentation

* [Build with AI: Agent](https://docs.uibakery.io/build-with-ai/agent) — the chat inside the AI Builder that works on a single app.
* [MCP server](https://docs.uibakery.io/mcp-server) — connect an external AI agent, such as Claude or Cursor, to your workspace.
* [Role permissions](https://docs.uibakery.io/concepts/workspace-management/role-permissions)
* [Audit logs](https://docs.uibakery.io/concepts/workspace-management/audit-logs)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.uibakery.io/ui-bakery-agent.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
