> For the complete documentation index, see [llms.txt](https://docs.carto.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.carto.com/carto-user-manual/app-studio/building-an-app.md).

# Building an app

Start an app from a prompt, an example or a map, and refine it with the assistant

{% hint style="info" %}
**Private Preview:** App Studio is available to selected accounts during its Private Preview. To request access, contact your CARTO representative.
{% endhint %}

## Start an app

Go to **Applications** and use the box at the top of the page. You can start in three ways:

* **From a prompt.** Describe the app and the data it should use, and send it.
* **From an example.** Until you have apps of your own, Applications shows an **Examples** gallery. Select one to get your own copy, then ask the assistant to change it or to use your data.
* **From a map.** Select **Attach > Map** and choose one of your Builder maps. The assistant reads its layers and styling and rebuilds it as an app.

<figure><img src="https://3029946802-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FybPdpmLltPkzGFvz7m8A%2Fuploads%2Fgit-blob-c22a5d5280566efbfc0828a91f5f914dcd89bf89%2Fapp-studio-composer.png?alt=media" alt="The prompt box in Applications, with a style selected and a prompt describing a retail store dashboard"><figcaption></figcaption></figure>

Before you send the prompt, you can also:

* **Pick a style** to give the app a starting look. You can pick a new one later from the chat.
* **Attach** the tables to use (**Data source**), a map, or an image such as your logo (**Visual asset**).
* Choose a different **model**. By default the assistant uses the model your Admin set for **AI Assistant in App Studio** in [Settings > CARTO AI](https://docs.carto.com/carto-user-manual/settings/carto-ai.md).

The app opens in the studio and the assistant starts building.

## Write a good first prompt

Give the assistant what you would give a developer:

* **Who uses it, and for what.** "A tool for our underwriters to review new submissions one at a time."
* **The data.** Name the tables or attach them. If you don't know where the data is, describe it and the assistant searches your connections.
* **The steps.** What people look at, what they decide, and what gets saved. "Show the property with its flood and wildfire risk, let the underwriter approve or refer it with a comment, and save the decision to the `underwriting_decisions` table."
* **The look**, if it matters to you.

Start with the core of the app and add the rest in follow-up messages. Small, specific requests work better than one long list of changes.

## The studio

The chat is on the left and the app on the right. While the assistant works, the chat shows each step, such as exploring data, adding a data source or editing a file.

The right side has three tabs:

* **Preview** runs the app on your real data and reloads after each change. Select the pointer button and click an element, such as a chart or a legend, to refer to it in your next message. You can also check the mobile layout or open the preview in a new tab.
* **Code** shows the app's files. They are read-only: to change something, ask the assistant.
* **Data** lists the tables and named sources the app uses. See [Data in your app](https://docs.carto.com/carto-user-manual/app-studio/data-in-your-app.md).

If something doesn't work in the preview, select **Show console** to see the errors. The assistant reads them too, so you can ask it to fix them.

To rename the app, edit its name at the top of the studio. To start a new chat without changing the app, select **Clear conversation**.

## Tips

* **Point at what you mean.** Pick the element in the preview, or attach the right table if the assistant chose the wrong one.
* **Describe what you see.** "The map is empty after I pick a region" helps more than "fix the filter".
* **Go back when a change goes wrong.** [Restore](https://docs.carto.com/carto-user-manual/app-studio/version-history.md) the previous version and try a different prompt.


---

# 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.carto.com/carto-user-manual/app-studio/building-an-app.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.
