Build

Building with Agent mode

Agent mode is a powerful Master mode — it writes code, runs migrations, deploys edge functions, and verifies that the result works.

Overview

Agent mode is the default mode. When you describe a requirement, the agent plans it, makes changes to files, runs necessary backend operations, and verifies the result in live preview.

What Agent mode does

  • Writes and edits code — React components, hooks, utilities, styles.
  • Runs migrations — creates tables, RLS policies, functions in the DB.
  • Deploys edge functions — automatically after creation.
  • Configures secrets — requests API keys via a secure dialog.
  • Generates images — via integrated image gateway.
  • Verifies the result — checks console logs, network requests, build output.

How to use Agent mode

prompt
Add a newsletter form to the main page,
store emails in the subscribers table.
For large changes, we recommend going through Plan mode first — it saves credits.

Verification and self-healing

After each set of changes, the agent checks signals from the browser. If it finds an error, it diagnoses and fixes it itself. It covers:

  • TypeScript / build errory
  • Errors in RLS policies (403 from the database)
  • Misconfigured routing or imports
  • Missing dependencies

Credits

Agent mode is usage-based — according to the actual model consumption.

FAQ

How do I revert a change made by the agent?

Open Versions and click "Restore".

Can I prevent the agent from touching a specific file?

Ano — v Knowledge.

What if the agent gets into a loop?

The Stop button interrupts execution. Then switch it to Plan mode.