# How the agent works

> The agent reads and writes your app's code, fixes its own mistakes, and shows its work. Here is what it can and cannot do.

The agent is the AI that builds your app. When you ask for something in chat, it does the work a developer would do, and shows you as it goes.

## What the agent can do

The agent works with a set of real tools, and you can watch it use them:

- **Investigate your app.** It reads files, lists what exists, and searches your project's code to find exactly the right place to make a change.
- **Change your app.** All code changes for a request land as one patch, and the chat shows which files were touched.
- **Work with your data.** It can set up tables for new features and check your database structure.
- **Check your app's status.** It can see whether your preview is healthy, read build logs when something is off, check whether your app is published and on which domain, and see which integrations are connected.
- **Ask you for what it needs.** If a feature requires an API key or a third-party service, the agent pauses and shows you a button: "Set in Vault" for a secret, or "Connect" for an integration. The turn resumes once you have done your part.
- **Remember the conversation.** It can search earlier turns in your chat to recall what was built and where.

## It shows its work

As the agent works, every step renders as a small progress pill in the chat: "Reading the checkout flow", "Searching for the pricing table", "Patching 2 files". When it finishes, it replies in plain language, leading with **Done** when everything worked or **Partly done** when something needs your attention. The preview rebuilds on its own; the agent will never ask you to refresh or run anything.

The agent also speaks your language, not a developer's. It describes what you will see on screen, not file paths and code internals.

## It stays in scope

The agent does what you asked and nothing more. It will not sneak in extra features, redesign pages you did not mention, or refactor things for its own taste. If your request is ambiguous, it makes the smallest reasonable interpretation, and tells you what it chose.

## It works best in small steps

The agent is strongest when you give it one clear thing at a time. A focused request like "add a page that lists all orders" lands more reliably than a long list of unrelated changes in one message. You can send the next request as soon as the last one lands.

## It is not perfect

The agent is powerful, but it is still an AI, and it will sometimes get things wrong. That is normal and expected. When it does, the fix is usually simple: tell it what looks off, and it corrects course. Vaulter also [repairs many build problems automatically](/docs/building/auto-fix) before you ever see them. A few habits make the whole loop smoother: [Getting better results](/docs/building/better-results).

A good mental model: the agent is a fast, capable teammate who occasionally misunderstands you. Clear direction and quick feedback go a long way.

## Frequently asked

#### Can the agent see my API keys and secrets?

No. Secrets live in [the Vault](/docs/data/secrets-vault); the agent can see that a secret exists and use it by name, never its value.

#### Can the agent permanently break my app?

No. Every change has an [Undo button](/docs/your-app/undo-and-versions), every publish is a restorable version, and the agent is not allowed to drop database tables. The worst case is a broken preview, which [auto-fix](/docs/building/auto-fix) usually repairs on its own.

#### Does the agent keep working when I close the tab?

It finishes the request it is on, but it does not work unattended: each change happens because you asked for it. Come back and pick up exactly where you left off.

#### Which AI model is it?

Your choice: leave the picker on Auto or select Vaulter Mini, Pro, or Max per request. See [Choosing a model](/docs/building/choosing-a-model).
