How to let Antigravity finish and test a job with /goal

Day 5, 30 minutes · beginner

Goal of this lessonGive the agent a goal with checkable evidence, let it build a statistics page and test it in the built-in browser at phone width before it stops.

Why it matters

Coding agents such as Antigravity tend to stop early. They do most of a job, write "done", and leave the last check to you. For a bigger task that means you keep typing "keep going" and checking whether the work is really finished. A page with numbers is a classic case: it looks fine, but one count is off.

Antigravity's /goal command changes when the agent may stop. In goal mode it keeps working until it can show evidence for every part of the job, such as the counts it made and a check in the browser. You decide up front what counts as done, and the agent has to prove it.

Today Marijke wants a page with the numbers from her repair log: how many items came in, how many were fixed, per category. You give the agent that job as a goal with three checks, and it tests its own page in the built-in browser at phone width. At the end you have a statistics page and proof that it is right.

How goal mode works

When you start a prompt with /goal, the text after it becomes the goal. Each time the agent tries to finish, Antigravity checks whether the goal is still open. If it is, the agent is told to read the request again, make a checklist of what was asked and check each item against real output, not against its own effort. The goal ends when the agent can show that every part is done, or when you tell it to stop.

Goal mode changes only when the agent stops. Your permission preset and your approvals stay exactly as they were. Only one goal runs per conversation. The docs mark only /boost and /teamwork as paid-plan commands; /goal is not one of them.

Write a goal the agent can check

Three of the tips in Antigravity's docs for good goals:

  • Name the evidence. Not "make it correct", but "every number matches a count you made from repairs.csv, and you list those counts".
  • Limit the scope. Name the files the job is about, so the agent does not stop too early or keep growing the job.
  • Plan first for big changes. For a large job, agree on the approach with /plan (lesson 2) and then hand the approved plan to /goal.

You also know the right answer yourself before you start. That is the real test: if the agent says 12 repairs and 9 fixed, you can check it against your own count.

The built-in browser

The App has its own browser in the side panel. On personal accounts with App version 2.30.0 or later, the agent can use it by itself: it opens the page, resizes it to phone width, reads console errors (messages a page writes when something breaks) and takes screenshots. You see the cursor move and can click the red Stop button at any time. This feature is still rolling out. If Settings, Browser says "Requires Google Chrome", the agent works through Google Chrome instead and you need to allow remote debugging in Chrome first; the browser docs explain how.

A page on your own computer is best tested through a small local web server, which gives it an address such as http://localhost:8000. Starting one may need to run outside the sandbox, so the agent asks first. Before the browser opens a new address, it asks too: "Allow executing actions on this URL?" Allowing it once is enough.

The steps

  1. Add the data. Let the agent create repairs.csv with twelve made-up repairs from three sessions.
  2. Start the goal with the three "done when" checks.
  3. Approve what you understand. A local web server and a localhost address are expected. Anything else, ask the agent why first.
  4. Wait for Completed and read the agent's evidence.
  5. Check it yourself against the expected numbers and the screenshot.
  6. Review and commit, as in lesson 3.

Follow the guide for Google Antigravity below.

Example: Marijke's statistics page

The agent counted the CSV, wrote stats.html and added it to the menu. It asked to run a small web server, which Marijke approved. The browser tab showed the page at phone width. The first try had a table that was too wide, so the agent changed style.css and checked again. Its evidence listed 12 repairs, 9 fixed and 75 percent, and the table per category. The screenshot showed the table fitting on the narrow screen.

About quota

A goal can take many steps, and each step uses quota. On the free plan the quota refreshes weekly, so one long goal can use a fair part of a week. Keep goals small and clear, and look at Settings, Models after a big one. Claude Code has a goal command too; if you use both tools, Claude Code in action shows the same idea there.

Common mistakes

  • No evidence in the goal. "Make a nice stats page" gives the agent nothing to check, so it stops when it feels done.
  • Approving everything to speed it up. Read each command once. A web server for this folder is fine; installing extra software is a question first.
  • Not knowing the answer yourself. Count a few rows by hand before you trust any page with numbers.

Deeper dive

Today's actions

Ticks are not saved without an account

Do it in Google Antigravity

Google Antigravity

  1. Start a new conversation in the brambleford-fixit-cafe project and paste this task.
    Create a file repairs.csv in the root of this folder with exactly these lines, and change nothing else:
    
    date,item,category,fixed
    2026-09-12,toaster,electrics,yes
    2026-09-12,bike light,bikes,yes
    2026-09-12,winter coat zip,clothes,yes
    2026-09-12,radio,electrics,no
    2026-10-10,kettle,electrics,yes
    2026-10-10,front brake,bikes,yes
    2026-10-10,teddy bear seam,toys,yes
    2026-10-10,desk lamp,electrics,yes
    2026-10-10,jeans hem,clothes,no
    2026-11-14,flat tyre,bikes,yes
    2026-11-14,remote control car,toys,no
    2026-11-14,hair dryer,electrics,yes
  2. Open the global Settings and go to Browser. If the text under Browser Actuation Rules says no separate browser install is needed, the agent can test in the built-in browser. If it says Requires Google Chrome, read the notes first.
  3. Paste the goal and press Enter. An Active Goal indicator appears above the message box while the agent works.
    /goal Make a page stats.html for Brambleford Fix-It Café from the data in repairs.csv. Show the total number of repairs, how many were fixed, the fix rate as a percentage, and a table per category (electrics, bikes, clothes, toys) with the number of repairs and the number fixed. Write the numbers into the HTML; do not load the CSV in the browser. Add stats.html to the menu on every page. Done when: 1) every number on stats.html matches a count you made from repairs.csv, and you list those counts; 2) you served this folder with a local web server, opened stats.html in the browser at 390 pixels wide, the table fits without scrolling sideways and there are no console errors; 3) you saved a screenshot of that check to the artifacts. If you cannot start a local web server or open the page in the browser, stop and tell me; do not install anything.
  4. If the agent asks to run a command outside the sandbox, such as starting a local web server, read the command and approve it only if it does what it says.
  5. When the browser asks Allow executing actions on this URL? for a localhost address, choose Yes, allow this time. You can watch the agent work in the browser tab in the side panel.
  6. Wait until the goal is marked Completed. Goals are listed in the Overview panel, with their status. To stop a goal early, send Stop the current goal.
  7. Check the evidence: 12 repairs, 9 fixed, 75 percent, electrics 5 (4 fixed), bikes 3 (3), clothes 2 (1), toys 2 (1). Open the screenshot from Artifacts in the Overview panel. Then open Review, read the changes and commit them.

Note: The docs mark only /boost and /teamwork as paid-plan commands, so /goal needs no paid plan. A long goal uses more quota: check Settings, Models afterwards. The built-in browser agent is rolling out to personal accounts on App 2.30.0 and later. If yours says Requires Google Chrome, the agent drives Chrome instead, which needs remote debugging switched on in Chrome; if you skip that, the agent should stop at check 2 and tell you.

Checked on 4 December 2026 · Source: Antigravity docs: Goal command (/goal) (opens in a new tab)

Create a free account to save your progress. Sign in or sign up