A guide to prompting in Retool
We’ve seen and heard our users asking for an AI-assisted app-building experience, but we’ve also seen how some of the other versions of this sort of experience can’t quite get you all the way to production. A lot of times, that’s because it’s still a challenge to integrate your business data, while making sure the resulting apps handle that data safely and securely.
That means you can get the integrations and governance that Retool has always been known for while using AI to help you build even faster. And all of this happens right inside the Retool editor, where you can start with one of our pre-written prompts, or create your own.

This step change in how production-grade software is built is how a whole new generation of builders will create software that helps move their teams and businesses forward.
In this post, we’ll take a look at some examples of effective prompts, as well as some tips and tricks on getting the most out of app building in Retool.
Prompts matter for building apps faster
The holy grail of app generation is a “one-shot prompt,” which basically means you get exactly the app you want from a single prompt. In practice, that rarely happens, so it’s important to be able to adjust as you go. In traditional AI prototyping tools, that means creating more and more specific prompts to ask for changes to smaller and smaller portions of your app. But in Retool, you can simply go to the visual canvas to make tweaks and updates.
In addition to editing the individual components of your app directly, you can craft your prompts specifically to address certain parts of your app: mentioning certain queries by name, selecting components that the AI should take into account when making additional suggestions, or even @-mentioning specific data resources for more context.
This means you get the best of both worlds: the speed of AI-driven development and the control and accuracy of manually updating application components and queries.
Let’s take a look at how you might craft prompts in a few different scenarios.
How prompts become action
Retool’s app builder is good for more than just generating apps from scratch. It’s also an extremely powerful tool for getting new users and teams up to speed quickly on an existing app, debugging an app, or making sweeping modifications that would be tedious to perform manually.
And prompts don't have to be text alone. You can upload files for additional context—drop in a screenshot of a UI you want to match, a mockup, an error message, or a sample data file—and Retool will factor them into what it builds.
You can easily:
Generate
Create something from scratch via a prompt, with context from any of your Retool resources. Get comprehensive functionality including components, queries, code, and event handlers with descriptive naming conventions for all generated elements.
For example, "Build a support ticket tracker" or "Using our accounts table in @Snowflake, create a customer service dashboard."
Edit
Modify an existing app or component via a prompt, making specific, targeted changes to your application. Retool excels at smaller, precise edits, especially when mentioning specific elements.
For example, "Add a department filter" or "In expenseTable, add bold text for expenses over $500."
You don't always have to name the element in your prompt, either. With selection mode, click a component directly on the preview canvas and prompt from there—the agent scopes its edit to just that component. It's the most precise way to make a targeted change.

Debug
Troubleshoot issues with your app by describing the problem in natural language. Retool can help identify and resolve errors in queries, components, or logic.
For example: "The fetchAll query seems broken" or "Why isn’t the saveChanges button triggering the workflow?"
Style
Adjust the appearance of components or your entire app, including applying themes that can be automatically created and applied. You can even reference well-known company names to adopt their brand colors.
For example: "Simplify our app’s interface" or "Apply our brand colors to this app’s theme"
Understand
Ask clarifying questions about an existing app to learn its purpose and functionality. New users and teams get up to speed quickly by asking what components do and how workflows function.
For example: "What happens when I click this?" or "Explain how this onboarding dashboard works."
Guide
Get general advice, best practices, and answers to questions about Retool itself. Get links to documentation and the Community Forum for additional information and guidance.
For example: "What’s the best way to handle API authentication in this query?" or “Are there any other resources in my environment that would make this app even better?”
How to write your first prompt
With all this in mind, let’s put together a prompt that will turn into an app. When generating an app from scratch, there are a few pieces of information you want to include in any prompt.
Guiding Retool to build your UI
Focus on the functionality you want, not the specific building blocks. Your prompt should focus on:
- What the app should do
- What data it works with
- What users should be able to accomplish with it
The more context you give about the outcome, the better the agent does on its first pass. For anything complex, you can ask it to draft a wireframe or technical spec before it writes any code, so you can correct the approach early.
If the resulting generation isn’t exactly what you were hoping for, you can adjust your app with a follow-up request.
Security and governance from the very first prompt
AI that builds on top of your data is great, but we’ve all seen data breaches, leaks, hallucinations, and various other forms of AI going off the rails; something we want to avoid when it comes to handling sensitive business data.
That’s where the governance features of the Retool platform come in. Resource and query permissions, scoped to either individual resources, specific users or user groups are automatically inherited in any of the resource queries generated along with your application.
This means you can configure your resources once and then allow anyone on your team to develop apps using those resources without getting stuck in security and compliance review for each individual app.
Adding data and resources for more context
Business apps and internal tools all have data at their core. Any app generation that doesn’t take this into account is just a UI with nothing to back it up. That’s why AI-assisted app generations in Retool always take your data into account.
If you don’t have any data and are truly just iterating on a user interface, you can ask for mock JSON data so that you’re not staring at an empty application. However, the real power comes in @-mentioning specific resources in your prompt where your data already lives. When you do this, Retool will look at those resources, understand the schema of the data and what’s available, and use all that information to generate a purpose-built app that takes into account your specific datasets and resources.
How to get the most from your prompts
One of the best ways to learn which prompts work well is to test them out yourself! That said, there are some concepts that can help you get the most out of this new Retool functionality.
Combine prompts with other Retool features
Source control
Before you start building, enable Source Control so you can easily roll back changes if needed. As you progress and achieve successful updates, use “Create Release” to capture those checkpoints. This gives you safe restore points throughout your development process and makes it easy to share stable versions with your team.
Prompt, then refine
You don't have to choose between letting the agent build and editing by hand. Scaffold a first version with a prompt, then refine however suits the task: use selection mode to click a component on the canvas and prompt a scoped change, edit the generated React directly in the Code tab, or adjust the functions—the TypeScript that runs queries against your data—yourself. It's real React your team can read, extend, and own.
Work in threads
Each development session happens in a thread—an isolated conversation with the agent, tied to a specific set of changes (and, with Source Control, to its own branch). You work in one thread at a time, and your session and context are preserved if you step away and come back.
Publishing your changes closes the thread, so when you're ready to keep iterating, you start a new one. Keep the work in each thread focused rather than trying to do everything at once, and you'll end up with a cleaner, more reviewable history.
Use prompts to build smarter
Get up to speed on an unfamiliar app faster
If you’re new to Retool or are inheriting someone else’s app, you can dramatically accelerate your learning curve by prompting inside the app builder. Don’t hesitate to select a component using Selection mode and ask “What does this component do?” or “Explain how this data populates this table.” These prompts give you instant explanations that are faster than digging through documentation and help you learn by doing rather than just reading.
Learn about best practices
When you’re uncertain about implementation patterns, use guiding prompts to learn best practices directly. Instead of searching through docs, simply ask questions like “How to validate forms” or “What’s the best way to handle API authentication?” Retool will provide practical advice and link you to relevant documentation and Community Forum discussions where you can dive deeper.
When to use prompts vs configuring components and writing code manually
The question isn’t really whether to use a prompt or write code manually. It’s about understanding when each approach serves you best. Scaffolding and boilerplate generation, creating the initial structure, components, and queries for your app is much faster using natural language than building from scratch. Retool automatically creates well-organized, properly-named elements that follow sensible conventions. Repetitive modifications are another sweet spot: making the same change across multiple components or applying styling updates throughout an app takes seconds with the right prompt. When connecting databases or APIs, Retool can generate properly structured queries and handle integration logic while you focus on specifying which resources to use.
Manual coding makes more sense when you need fine-grained control or have to handle specific edge cases that are difficult to describe in natural language.
However, the key here is that you don’t have to choose one or the other. The hybrid approach is often the most powerful. Use a prompt to generate the foundation and handle repetitive work, then switch to manual coding in the Data tab or the Code tab for customization and refinement. You might prompt for data connections, manually tweak complex functions, and prompt again for styling, all in the same workflow.
Don’t overthink it.
This workflow adapts to your needs and preferences, so use whatever gets you to a working solution fastest.
Start prompting in Retool today
The new Retool app builder is available now for Retool Cloud customers, and self-hosted customers can access it in Retool 4.0 Stable or later. Navigate to your Retool AI settings and make sure the Updated App Builder toggle is enabled.

Final thoughts on the path from prompt to app
Enterprise AI app generation is just beginning. It’s bringing all sorts of new builders into the world of software development and helping to bring about a completely new era of software. But no matter what type of application you’re generating, you’ll likely want the ability to generate it on top of your data, deploy it into your own environment, and have security be at the forefront.
If you want to learn more and try it for yourself, sign up to get started.