---
title: "How the agent works: approvals, undo, models"
description: "Ask the Prototyper agent for something and watch it work: every step it takes, approvals before risky actions, Undo for a whole turn, and subagents."
date: "2026-10-09"
canonical: "https://www.prototyper.co/docs/agents"
---

# How the agent works: approvals, undo, models

**The agent is the AI teammate built into every Prototyper workspace. You ask
for something in the chat; it builds apps, edits files and draws on the canvas,
and shows each step as it goes. It asks before anything destructive, and you can
undo a whole turn with one click.**

<Surface id="agent-work" state="working" caption="The agent at work: the shipped chat components, on sample data.">
  <Annotate at='[data-slot="reasoning"]'>What the agent is thinking</Annotate>
  <Annotate at='[data-slot="run-trace"]'>Its steps, live as it works</Annotate>
</Surface>

Prototyper is an AI prototyping tool for anything visual: your agents build
running apps, wireframes and slide decks on a shared canvas with your team, from
real design rules, not AI slop.

The agent in the chat is one of those agents. You can also bring your own:
Claude Code, Codex, Cursor or another MCP client can work in the same workspace.
See [Connect your agent](/docs/getting-started/connect-your-agent).

## Ask for something

<Steps>
<Step>
Open a workspace. The chat is in the agent panel: press <Kbd>/</Kbd> to jump to it from anywhere you aren't typing.
</Step>
<Step>
Type what you want, in plain words: "Build a pricing page with three plans" or
"Make the header sticky".
</Step>
<Step>
Send it.
</Step>
</Steps>

The box says **Ask the agent to build, edit, or debug the app…** before your
first message, and **Send a follow-up — ask the agent to refine, fix, or
extend…** after it.

## Watch it work

While the agent works, the box says **Agent is working — press stop to
interrupt…**. To stop it, press stop, or <Kbd>esc</Kbd> while you're in the box.
You see:

- **Thinking**: what the agent is reasoning about, folded once it moves on.
- **Its steps**: every file read, edit, command and canvas change, grouped into
  one list. While the agent works, the list stays open and its header names the
  current step. When the turn ends it folds to one line, for example **Ran 5
  tools**. Click it to open it again.
- **Its answer**: plain text, plus diagrams or tables when they help.
- **Changed files**: when the turn is over, a card lists the files it changed,
  for example **3 files changed**, with how many lines were added and removed.

Each request has a step budget. On a new build the agent pauses after 20 steps,
and after 16 on a change, to sum up where it is. Reply "continue" to keep going.
One request stops at 25 steps.

## Tool calls

Every step is a tool call: read a file, edit it, run a command, add a shape.
Each one shows its state:

- Running: the step is happening now, and the list header names it.
- Done: it worked. Open it to see what went in and what came out.
- Failed: it didn't work. The step shows the error, and the list header counts
  it, for example **1 failed**. The agent sees the error too, and can fix it in
  the next step.

A step you refused shows **You denied this, so nothing changed.**

<Surface id="agent-work" state="failed" caption="A turn with a failed step and the agent’s fix. Open the steps: the figure is live.">
  <Annotate at='[data-slot="run-trace"]'>How many steps it ran, and how many failed. Click to open them.</Annotate>
  <Annotate at='[data-slot="chat-markdown"]'>The answer: what failed, and the fix</Annotate>
  <Annotate at='[data-slot="changed-files"]'>The file this turn changed, with Undo</Annotate>
</Surface>

## When it asks first

Most work runs without asking. The agent stops and asks you before it:

- deletes a file;
- runs a command that removes, moves or truncates files;
- types into a terminal;
- writes to a connected GitHub repository.

Google Drive folders are read-only: the agent can read them but not change them.

Ordinary edits inside the workspace never ask.

When it asks, you see what it wants to do, and the change itself when there is
one. Choose:

- **Approve** (or **Delete**, when it wants to delete a file): do it this once.
- **Always allow**: do it, and stop asking in this workspace.
- **Deny**: don't do it. Nothing changes, and the agent carries on without it.

<Surface id="agent-approval" state="waiting" caption="An approval card. Press a button: the figure is live.">
  <Annotate at='[data-slot="action-approval"]'>What it wants to do</Annotate>
  <Annotate at='[data-slot="action-approval"] button'>Approve, Always allow or Deny</Annotate>
</Surface>

To turn asking back on, or off:

<Steps>
<Step>
Click **Workspace settings** (the gear in the workspace header).
</Step>
<Step>
Open **Agent**.
</Step>
<Step>
Switch **Ask before destructive actions** on or off.
</Step>
</Steps>

It's on for every new workspace, and it applies to everyone in the workspace.
You need edit access to change it.

## Undo a turn

When a turn changed files, its **Changed files** card has an **Undo** button.
Click it to put back everything that turn changed: files, and shapes on the
canvas, as they were before the turn. The chat itself stays. The card then says
**Undone**.

<Surface id="agent-changed-files" state="default" caption="The Changed files card. Press Undo: the figure is live.">
  <Annotate at='[data-slot="changed-files"]'>The files this turn changed</Annotate>
  <Annotate at='[data-slot="changed-files"] button'>Undo</Annotate>
</Surface>

Undo can't always run. It tells you why:

| It says | What it means |
| --- | --- |
| **Edited since — can't undo** | Someone changed the same things after the turn. Nothing was changed. |
| **Already undone** | This turn is already undone. |
| **Stop the agent first** | The agent is still working. Stop it, then try again. |
| **Offline — try again** | You're not connected. Try again when you're back online. |

## Subagents

For a bigger job, the agent can hand parts of it to subagents. Each subagent
takes one task, and they work at the same time. You don't set them up. The agent
starts them when the work splits well, or when you ask, for example "use a
subagent for the settings page".

- Each subagent shows as a card in the chat, with its name and what it's doing
  right now.
- When it finishes, the card says **Done**, **Stopped** or **Failed**. Open the
  card to see its steps.
- Each subagent has its own avatar and cursor on the canvas, so you can watch it
  work.

Up to 4 subagents run at once. A subagent can start subagents of its own, one
level deeper and no further.

<Surface id="agent-subagent" state="running" caption="A subagent card while it works.">
  <Annotate at='[data-slot="subagent-card"]'>The subagent and its task</Annotate>
  <Annotate at='[data-slot="subagent-trace"]'>What it's doing now</Annotate>
</Surface>

## Answers with diagrams and charts

Ask for a diagram or a chart and the agent draws it right in its answer: "Draw
the signup flow as a diagram", "Chart signups per month".

- It can draw flowcharts, state diagrams, sequence diagrams, class diagrams,
  entity-relationship diagrams, bar and line charts, pie charts, Gantt charts
  and mind maps.
- It can also answer with a table.
- A wide diagram fits the chat, then scrolls sideways. To see it bigger, use the
  expand button on the diagram, then zoom in, zoom out or fit it to the window.
- If a diagram can't be drawn, the answer says **This diagram couldn't be
  drawn. Here is its source.** and shows the text it was made from.

<Surface id="agent-diagram-answer" caption="An answer with a diagram, drawn from the agent’s mermaid source.">
  <Annotate at='[data-slot="mermaid-diagram-scroll"]'>The diagram, drawn in the answer</Annotate>
</Surface>

## Models and context

Under the message box:

- **On the left, the model.** Click it to pick one. **Auto** uses the default
  model, named under it. Each model has a tier: **Fast**, **Balanced** or
  **Most capable**. Models your plan doesn't include show a lock. Choosing one
  opens the upgrade options.
- **On the right, the context.** For example **42% of 1000k**: how full the
  model's memory of this chat is. It turns amber at 70% and red at 90%.

<Surface id="agent-status-line" state="low" caption="The line under the message box.">
  <Annotate at='[aria-label="Model"]'>The model</Annotate>
  <Annotate at='[data-slot="run-status-line"] > span:last-child'>How full the context is</Annotate>
</Surface>

When the context is nearly full, start a fresh chat. Your canvas and files stay;
only the conversation starts over.

- **New chat**: <Kbd>mod+shift+o</Kbd>, or **New chat** in the chat menu.
- **History**: go back to an earlier chat.
- **Clear chat…**: clear this chat for everyone in the workspace.

## Availability

|  | Free | Premium | Team | Team Business |
| --- | --- | --- | --- | --- |
| Agent messages | 5 per week | Unlimited | Unlimited | Unlimited |
| Models | Sonnet models | All | All | All |
| Calls from your own agent (MCP) | 100 per week | Unlimited | Unlimited | Unlimited |

Each request you send counts as one message. When the agent starts subagents,
each one also counts as a message. For example, a request that starts 3
subagents uses 4 messages. On Free, the box shows how many messages you have
left this week.

On Free, the weekly messages and MCP calls are yours, not each account's:
they're shared across your personal account and every free team you work in.
The team's plan decides, so in a free team you get the free allowance even if
you're on Premium.

## Troubleshooting

**"You've used your 5 free AI messages this week across your free teams."**
You've sent this week's free messages, across your personal account and your
free teams. Upgrade this team, or connect your own agent (Claude Code, Codex,
Cursor or another MCP client) and keep working through it.

**The agent stopped with "Paused at the step budget".**
The request took more steps than one request gets, so the agent summed up where
it is. Reply "continue".

**The agent stopped with "Stopped at the turn limit".**
The request reached 25 steps. Send a follow-up that picks up from where it
stopped, or split the job into smaller asks.

**Undo says "Edited since — can't undo".**
Someone (you, a teammate or another agent) changed the same files or shapes
after that turn. Undo won't overwrite their work. Change it back by hand, or ask
the agent to.

**The agent is waiting and nothing happens.**
It's asking first. Scroll the chat to the approval and choose **Approve**,
**Always allow** or **Deny**.

<Related
  pages={[
    '/docs/getting-started/connect-your-agent',
    '/docs/getting-started/quickstart',
  ]}
/>
