> For the complete documentation index, see [llms.txt](https://docs.gaiodataos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gaiodataos.com/tools/flow/app-builder.md). Agents can also search and read this documentation through its [MCP server](https://docs.gaiodataos.com/~gitbook/mcp).

# App Builder

Build web apps with AI from a conversation, connected to the project data.

The **App Builder** creates web applications from a conversation with the AI. You describe the app you want. The AI writes the code, connects the app to the project tables and shows the result in real time.

In the Studio, each app created this way is a **Code flow**, identified by the `</>` icon in the flow list.

{% hint style="info" %}
App Builder depends on the license (**Settings > General > Gaio Account > Enabled modules**) and on the per-app permission set by the administrator in **Settings > App Builder**.
{% endhint %}

### Create an app

1. In the Studio, open **Flow** and click **+**.
2. Fill in **Process name** and **Description**.
3. In **Flow type**, choose **Code**. The other options are **Dashboard** and **Data Preparation**.
4. Click **Save**.
5. In the **Describe the app you want to build…** field, write your request.
6. The AI replies in the chat and the preview is updated.

<figure><img src="https://1671598980-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0muDd0LkZG6CmTQvGQ4D%2Fuploads%2FLPgR99oV9cKXTDtZBlZb%2Ffluxo-tipo-codigo.png?alt=media&amp;token=2dba7a99-a307-4d9c-aca8-97d0410870bc" alt=""><figcaption></figcaption></figure>

When you open a Code flow for the first time, the **Start this code flow from…** panel shows three ways to start the project:

* **Blank template**: starts from Gaio's default App Builder template.
* **Existing repository**: clones a GitHub repository from your organization, for example an app created in another instance.
* **Upload project (.zip)**: imports a local React project packed as a .zip, without using GitHub.

Choose an option and confirm, for example with **Create blank project**. Then describe the app in the chat.

<figure><img src="https://1671598980-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0muDd0LkZG6CmTQvGQ4D%2Fuploads%2FM4eDxKHwuPlgdxe4WeMl%2Fapp-builder-template.png?alt=media&amp;token=fc16cecf-9528-46cc-b085-64cea9a2f405" alt=""><figcaption></figcaption></figure>

Example request:

> Create a modern sales dashboard with a white and orange theme. I want to see KPIs for revenue, orders and average ticket, revenue by month, top products, and sales by category and by state, with filters.

{% hint style="info" %}
On first open, the environment shows **Preparing your environment** while it installs dependencies and starts the development server. This can take up to a minute.
{% endhint %}

While the AI works, the chat shows each step and the **Preview** shows the running app. When the result is ready, click **Publish** in the top bar.

<figure><img src="https://1671598980-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0muDd0LkZG6CmTQvGQ4D%2Fuploads%2F4yLAKMmcGet929HTmb29%2Fapp-builder-chat-preview.png?alt=media&amp;token=adf23f37-bc06-4c35-ad50-367a2e6b2540" alt=""><figcaption></figcaption></figure>

Example of an app generated from the request above:

<figure><img src="https://1671598980-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0muDd0LkZG6CmTQvGQ4D%2Fuploads%2FYNzQCIUy9CDYHQfO2BsZ%2Fapp-builder-dashboard-exemplo.png?alt=media&amp;token=9fc2c083-c9b6-4355-b599-63bbbc7fc1d6" alt=""><figcaption></figcaption></figure>

### Interface

#### Top bar

| Element               | Function                                                                                                                                   |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| **Preview**           | Shows the running app, with real interaction                                                                                               |
| **Code**              | Project file explorer, with search and actions to create a file, create a folder, upload a file and reload                                 |
| **Resources**         | Data, files and agents the app can use                                                                                                     |
| **Tokens**            | Total tokens already used by the AI in this app                                                                                            |
| **Checkpoints**       | Reverts the project to an earlier state. The list shows the restore points, such as the project creation and each request made in the chat |
| **Create repository** | Creates a GitHub repository for the app (requires the GitHub integration set up by the administrator)                                      |
| **Publish**           | Publishes the app                                                                                                                          |
| **⚙ Settings**        | AI engine and model used by the app                                                                                                        |

#### Chat

The chat panel shows the history of requests and replies. The buttons at the top expand the panel, start a new conversation and collapse the chat.

### Resources

* **Data**:
  * Choose the tables the app will use. Only the selected tables become data sources the AI knows about.
  * The option **Include temporary** also shows temporary tables.
  * In **Diagrams**, select project schemas to give the AI the context of the relationships.
  * The eye icon shows a preview of the table.
* **Files**: choose the Gaio file folders the app can access. Access is opt-in: no folder is shared by default.
* **Agents**: choose the Gaio AI agents the app can use. This is also opt-in.

{% hint style="warning" %}
To select agents, an administrator must first enable **Allow AI agents** in the App Builder policy for that app.
{% endhint %}

### App settings (⚙)

Choose the **Engine** that generates the code:

<figure><img src="https://1671598980-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0muDd0LkZG6CmTQvGQ4D%2Fuploads%2Ff4LF4IlkMZKPDX02UTue%2Fapp-builder-configuracoes-ia.png?alt=media&amp;token=fb08b1c2-705f-442f-b9d6-4aeb295f7a07" alt=""><figcaption></figcaption></figure>

* **OpenCode**:
  * **Provider**: OpenCode (Zen, free models), Anthropic (Claude), OpenAI (GPT), Google (Gemini) or DeepSeek.
  * **Model**: choose a model or use the default model.
  * **API Key** for the provider. The **Create your API key** link opens the provider's page.
* **Codex (ChatGPT)**:
  * **Model**: for example GPT-5.5, gpt-5.4, GPT-5.4-Mini, gpt-5.3-codex, gpt-5.2 and Codex Auto Review.
  * **Codex account**: use **Sign in**, **Refresh** or **Sign out**. Signing in instead of using an API key costs less.

Click **Save** to apply or **Cancel** to discard.

### Administration (Settings > App Builder)

Area for administrators, with four sections.

#### Permission

Defines which Gaio apps can use App Builder. It has a search box and the buttons **Allow all** and **Deny all**.

{% hint style="warning" %}
Until this section is configured, **all apps can use App Builder**. When you save for the first time, only the selected apps remain allowed and **new apps start disabled**.
{% endhint %}

#### Policies

Rules applied to every app created with the AI assistant. The **Scope** can be **Global (default)** or a specific app.

<figure><img src="https://1671598980-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0muDd0LkZG6CmTQvGQ4D%2Fuploads%2FcPL2ZqggjVoyLrzUrR44%2Fapp-builder-politicas.png?alt=media&amp;token=966875e0-2a9f-4aab-81a1-a5442b8c70c9" alt=""><figcaption></figcaption></figure>

* **Allow data writes (CRUD)**: apps can insert, update and delete rows in their own bucket. When off, apps can only read (SELECT). Writes run as the app's ClickHouse user, isolated to the app's bucket.
* **Allow apps with their own backend**: coming soon.
* **Allow workflow execution**: apps can trigger Gaio flows through the runtime bridge.
* **Allow AI agents**: apps can use Gaio's AI agents. The agents available to each app are chosen under **Resources**.
* **Resource limits**:
  * **Max rows per query**: up to 100,000 (0 = unlimited).
  * **Max projects**: 0 = unlimited.
* **Container resources**: CPU (cores), memory (MB) and disk (MB) of each app's containers (authoring and preview). A value of 0 uses the server default. The disk limit requires a storage driver with quota support; otherwise it is ignored.
* **Inactivity**: **Suspend Studio after (min)** suspends idle development containers to free resources (0 = never). The next access restarts the container.
* **Files**:
  * **Max file size (MB)**: 0 = unlimited.
  * **Allowed file types**: images, documents (PDF, TXT, MD, DOCX, DOC, RTF), spreadsheets and data (CSV, XLSX, XLS, JSON, XML, YAML, TSV), presentations (PPTX, PPT), ZIP and custom MIME types.

#### Projects

Lists all Code apps across all Gaio apps, with app, process, container, runtime status and whether the app is published. The actions let you **Start** and **Stop** the container or remove it. The **Refresh** button reloads the list.

#### GitHub

Links an organization GitHub App so each project can become a repository.

1. In GitHub, create a GitHub App in the organization with the permissions Contents: R/W, Administration: R/W and Metadata: R.
2. Install the App in the organization.
3. In Gaio, fill in **Organization**, **App ID**, **Installation ID** and **Private Key (PEM)**.
4. Use **Test connection** and then **Connect**. The **Disconnect** button removes the link.

{% hint style="info" %}
The Private Key is stored encrypted (AES-256-GCM) and is never shown again. To change it, paste the new key.
{% endhint %}
