A workflow that runs many agents at once can do a lot of good work in a few minutes. It can also do a lot of unwanted work in the same few minutes, and every agent in it will follow the script with full confidence. Google Antigravity shipped Dynamic Workflows on November 13, 2026. The feature deserves a careful first run, not a brave one.
The idea is simple to state. You type /run-workflow and a task. The agent reads a skill that ships with Antigravity and writes a short Python script for that task. You read the script and approve it, the script runs in the background, and the main agent sums up the logs and output when the script ends.
This tutorial follows the official Antigravity documentation for Dynamic Workflows and for slash commands, checked on November 16, 2026. It claims no run of its own. The order below is the safety case in full. Permissions come before prompts, reading comes before editing, and sequence comes before parallel work. Our earlier guide to parallel workflow reviews covers the parallel review job itself. This guide covers the rollout that should come before you trust that job with edits.
What You Will Build or Learn
You will set up a safe path for Dynamic Workflows in three stages. First, a job that only reads code and reports back. Second, a staged job from the official examples, where one bug at a time gets a failing test and then a fix. Third, a saved script that you can run again, kept only after the first two stages have produced results you checked yourself.
You will also learn the controls that decide how much harm a bad script can do. Those controls are the permission preset, the choice between parallel() and pipeline(), the model named for each agent, the workspace each agent works in, and the schema that shapes each result. None of them is hard to set. All of them are easy to skip, and skipping them is how parallel agents turn a small mistake into a large one.
The script is the contract. Read it while the agents are still waiting. Illustration: Dirty Static
Before You Begin
Start from a clean state you can measure. Commit or stash your current work, then run git status and note the result. If a workflow later changes a file you did not expect, that first record is how you will know. Work on a branch you can discard, not on the branch you ship from.
Understand what isolation means here. Each agent a workflow starts is a full agent with its own conversation. It cannot see the script and it cannot see the other agents. The script must give each agent all of the context it needs in its prompt, and a result shape it must match. A short prompt that would be fine for one agent becomes a weak order repeated at scale.
Know the building blocks before the first script lands in front of you. phase(name) starts a named phase and groups logs and agent cards under it. log(*args) adds a line to a phase. agent(prompt, schema, role, type_name, workspace, model) defines an agent, and each agent returns its result through a tool named finish, which checks the result against the schema. parallel(items, fn) runs one function per item at the same time and returns results in item order, and if one item fails the others are canceled. pipeline(items, fn) runs items one at a time and returns results in item order.
Step 1: Set Permissions So Scripts Ask First
Action: open your Antigravity permission settings and choose a preset that asks you to approve a workflow script before it runs. The docs name Turbo as a preset that can allow a script without that prompt. Turbo may suit a script you have run many times. It does not suit a first run, a new task, or a script you have never read.
Expected result: when you launch a workflow, Antigravity shows the script in a prompt that asks, in the wording of the docs, Allow running this workflow script? If no prompt appears, your preset has already allowed the script. Change the preset before you go further, unless that choice was made on purpose for this exact script.
Step 2: Run a First Job That Only Reads
Action: in any conversation in the App or the CLI, type /run-work and press Tab to insert the run workflow command, then add a task that only reads. Use the prompt below for a first run, and change only the branch name if your main branch has a different name.
/run-workflow List the Python files changed since main, then review each file in parallel for unhandled exceptions using the flash model, and log a one-line verdict per file.
Expected result: the agent writes a script and waits for your approval. Nothing has run yet, and no agent has touched a file. This is the cheapest moment in the whole process to catch a wrong task, a wrong model, or a list of files that is far larger than you expected.
Step 3: Read the Script Against a Short Checklist
Action: read the script line by line and check six points in order. The phases match the stages you asked for. Each agent() prompt carries the full task and context, because the agent cannot see the script. Each schema matches the result you want, such as an array of strings for paths or a plain string for a verdict. The model fits the work, with flash_lite or flash for fast checks across many files and pro for deeper reasoning, per the docs. The workspace fits the risk, with the default workspace for a job that only reads. The script uses parallel() only where items do not depend on each other and do not edit shared files.
Expected result: every line does what you expect and nothing reaches outside the task. If a line surprises you, choose No at the approval prompt and tell the agent what to change. The docs give that exact path. Deny, describe the change in plain words, and read the new script from the top.
Step 4: Approve Once and Watch the Work Happen
Action: at the approval prompt, choose the option that allows this script this one time. Do not choose an option that always allows scripts, and do not widen an approval to cover scripts you have not seen. An approval covers that exact script, and the docs note that a command prefix rule cannot cover a Python script.
While the workflow runs, expand the workflow step in your conversation. You should see one section per phase, the log lines for that phase, and one card per agent with its role and state. Click an agent card to open that agent conversation in the side panel. There you can read its prompt, watch its tool calls, answer a pending request, or send it a message.
Expected result: the step title shows the current phase and how many agents have finished, and the workflow appears under Background Tasks in the Overview of the side panel. The workflow runs in the background, so you can keep working in the same conversation. To stop a workflow early, stop the parent conversation. The docs state that stopping the parent also stops every running workflow agent.
Step 5: Move to Edits One Item at a Time
Action: only after the first job has run clean, use pipeline() for a first editing job. Sequence is the safety feature here. Items that touch shared files or a shared test suite should pass one at a time, so a bad fix stops the line instead of spreading across files. The prompt below is the staged example from the official documentation.
/run-workflow Process BUG-1.md and BUG-2.md one at a time: for each bug, have one agent write a failing pytest test and a second agent fix the code until the new test passes.
Expected result: the script works through the first bug, writes a test that fails, fixes the code, and only then moves to the second bug. Read the new script with the same checklist from Step 3, and pay close attention to the workspace setting. For staged work in one workspace, sequence is what keeps two agents from editing the same file at the same time.
One at a time is slower, and that is the point for a first editing job. Illustration: Dirty Static
Step 6: Check the Result Yourself
Action: when the script ends, read the summary the main agent gives you, then check the work with your own tools. Run git status and read the full diff. Run the test suite the workflow used, plus any wider suite the change could affect. Compare the count of agents and the model each one used with the list of items you expected, because that count is what the job cost in plan credits.
Expected result: the diff holds only the files the task named, the new tests pass, and each logged result matches the schema the script set. File reads, searches, and test logs stay inside the agent conversations, so a clean main conversation is not proof that the work is clean. The diff is the proof. If a file changed that the task did not name, revert that file and treat the script as not yet safe to save.
Step 7: Save a Script Only After It Earns Trust
Action: when a workflow has produced checked results more than once, ask the agent to save the script to a .py file in your workspace. Store it with your code, review changes to it as you would review any code, and run it again with a prompt that names the file.
/run-workflow Run scripts/review-changes.py
Expected result: Antigravity asks you to approve the script each time it runs, unless you have chosen to always allow it. Keep that approval in place for scripts that edit code. The script runs in a separate process on the Python runtime that ships with Antigravity. If you need a different interpreter, set the ANTIGRAVITY_PYTHON environment variable, per the launch coverage of the docs. For wider context on giving agents a bounded place to work, see our guide to sandboxed agent sessions.
Verification
Run these checks and record the results. Your permission preset produced an approval prompt before the first script ran. The first job changed no files, which git status confirms against the record you took before you began. The staged job moved through its items in order, and its results came back in item order. Each result matched its schema, and the agent count matched the item list you expected.
Finish with two counts. Count the files in the final diff and name each one against the task. Then count the agents the workflow started and the model tier each one used. A workflow you cannot account for on those two counts is a workflow you do not yet understand well enough to run again.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| No approval prompt appears | Your permission preset already allows workflow scripts | Choose a preset that asks before a script runs, unless the allowance was set for this exact script |
| A script does more than the task you gave | The prompt was vague or the script added stages you did not ask for | Choose No, name the stages to remove, and read the new script from the top |
| One agent fails and the rest stop | parallel() cancels the other items when one item fails, per the docs | Fix the cause for the failed item, then run the workflow again for the missing items only |
| An agent waits and nothing moves | That agent has a pending approval request in its own conversation | Open the agent card, read the request in the side panel, and answer it there |
| Parallel edits clash or overwrite each other | Agents edited code while sharing one workspace | Switch the job to pipeline() for sequence, or give each parallel agent a branch workspace so each one gets its own Git worktree |
| Results come back in uneven shapes | The schema was loose or missing on an agent call | Tighten the schema for each agent, deny the script, and have the agent write it again |
| Credits drain faster than expected | Many agents each making many model calls on a large item list | Use flash_lite or flash for large checks, cut the item list, or move staged work to pipeline() |
| A model name is rejected | The tier in the script is not available on your plan | Use a tier the error message lists as valid for your account |
Next Steps
Run the same safe path on one job from your own work this week. A weekly review of changed files is a sound first job, and an audit of each package before a release is a sound second one. Keep the first runs to jobs that only read, widen to sequence for edits, and add parallel editing with branch workspaces only after several checked runs.
If a job needs agents to talk to each other while they work, a workflow script is the wrong tool for that job. The docs point that case to /swarm, where agents share a message board. Scripts are for control flow you can state in advance and read before it runs. That limit is what makes a workflow worth trusting at all.
Sources
- Google Antigravity documentation, Dynamic Workflows (
/run-workflow), antigravity.google/docs/dynamic-workflows, checked November 16, 2026. The source for the workflow flow, the building blocks, the model and workspace options, the permissions, the monitoring steps, and the staged bug example. - Google Antigravity documentation, Slash commands, antigravity.google/docs/slash-commands, checked November 16, 2026. The source for Google AI Pro and Ultra availability for
/run-workflow. - Image credit: the approval prompt screenshot in this article is from Google Antigravity documentation. The other images are Dirty Static illustrations.
END OF TRANSMISSION
Stay curious. Question everything.


