This document describes Antigravity's workflow system, which enables the creation of reusable, step-by-step procedures stored as markdown files in the .agent/workflows/ directory. Workflows can include special // turbo and // turbo-all annotations that control automatic command execution through the SafeToAutoRun parameter of the run_command tool.
For information about Antigravity's broader architecture and tool ecosystem, see System Architecture and Identity. For details on the run_command tool itself, refer to the tool documentation in the Fast Prompt system.
Antigravity workflows are markdown files stored in .agent/workflows/*.md with a specific YAML frontmatter format. Each workflow file combines metadata and procedural content:
File Format:
The structure separates the workflow's purpose (frontmatter) from its implementation (markdown body). The description field provides a concise, human-readable title that summarizes the workflow's objective.
Storage Location: Google/Antigravity/Fast Prompt.txt79
.agent/workflows/ directorySources: Google/Antigravity/Fast Prompt.txt78-98
Turbo annotations are special comments (// turbo and // turbo-all) embedded in workflow markdown that control automatic command execution. These annotations modify the behavior of the run_command tool's SafeToAutoRun parameter, enabling workflows to execute without user confirmation when deemed safe.
The // turbo annotation applies to a single step only. When placed above a workflow step, it signals that the immediately following step involving run_command should execute automatically.
Syntax: Google/Antigravity/Fast Prompt.txt87-94
2. Make a folder called foo
// turbo
3. Make a folder called bar
In this example:
SafeToAutoRun determinationSafeToAutoRun: true due to // turbo annotationBehavior:
run_commandThe // turbo-all annotation applies to every step in the workflow. When present anywhere in the workflow file, it overrides normal safety checks for all run_command invocations.
Syntax: Google/Antigravity/Fast Prompt.txt95
---
description: Fully automated deployment
---
// turbo-all
1. Build application
2. Run tests
3. Deploy to server
4. Restart services
Behavior:
SafeToAutoRun: true for every run_command callSources: Google/Antigravity/Fast Prompt.txt87-95
Turbo annotations interface directly with the run_command tool's safety system. Understanding this integration clarifies how annotations translate to executable behavior.
The run_command tool accepts these relevant parameters:
| Parameter | Type | Purpose |
|---|---|---|
CommandLine | string | The exact command to execute |
Cwd | string | Current working directory |
SafeToAutoRun | boolean | If true, executes without user approval |
WaitMsBeforeAsync | number | Delay before backgrounding the command |
waitForPreviousTools | boolean | Sequential vs parallel execution control |
Key Mechanism: Google/Antigravity/Fast Prompt.txt87-95
SafeToAutoRun accordingly// turbo step: Agent must set SafeToAutoRun: true// turbo-all workflow: Agent must set SafeToAutoRun: true for all commandsSources: Google/Antigravity/Fast Prompt.txt78-98 Google/Antigravity/Fast Prompt.txt490-502
Antigravity supports multiple methods for invoking workflows, each suited to different interaction patterns.
Workflows can be invoked using slash commands that map directly to filenames.
Mechanism: Google/Antigravity/Fast Prompt.txt96
/slash-command → .agent/workflows/slash-command.md
When the user types /deploy-app, the agent:
.agent/workflows/deploy-app.mdview_file tool to read the workflowImplementation:
/ prefix).agent/workflows/ directoryThe agent can proactively identify and suggest workflows that match the user's intent.
Mechanism: Google/Antigravity/Fast Prompt.txt96
If a workflow looks relevant, [...] use the view_file tool to read
.agent/workflows/[filename].md
Example Scenario:
USER: I need to deploy the application to production
AGENT: I found a workflow for deployment. Let me check it.
AGENT: [calls view_file on .agent/workflows/deploy-production.md]
AGENT: This workflow includes steps for building, testing, and deploying...
The agent:
.agent/workflows/ directory (using list_dir or find_by_name)Users can request new workflows, triggering a creation process.
Mechanism: Google/Antigravity/Fast Prompt.txt86
You might be asked to create a new workflow. If so, create a new file in
.agent/workflows/[filename].md (use absolute path) following the format
described above. Be very specific with your instructions.
Sources: Google/Antigravity/Fast Prompt.txt78-98
When creating workflows, the agent must follow specific requirements to ensure consistency and functionality.
Mandatory Elements: Google/Antigravity/Fast Prompt.txt86
description fieldFormat Template:
Specificity Requirements:
npm run build not "build the project"cd /path/to/project not "navigate to project"Turbo Annotation Guidelines:
// turbo for safe, idempotent operations (mkdir, file reads, status checks)// turbo-all for fully automated, tested workflowsSources: Google/Antigravity/Fast Prompt.txt78-98
Understanding how workflows execute provides insight into their operational model.
Workflows execute steps in order, respecting dependencies and tool call patterns:
Step Processing:
view_filerun_command callWaitMsBeforeAsync is set)Interaction with waitForPreviousTools:
While turbo annotations control SafeToAutoRun, the waitForPreviousTools parameter controls execution order:
waitForPreviousTools: true → Sequential execution (wait for previous tools)waitForPreviousTools: false → Parallel execution (if tools are independent)Workflows do not inherently include error handling beyond what the run_command tool provides:
Agent Responsibilities:
command_status for command failuresExample Error Scenario:
Workflow Step 3: Deploy to server
Command: ssh deploy@server 'bash /deploy.sh'
Result: Connection timeout
Agent Action: Stop workflow, report failure, suggest debugging steps
Sources: Google/Antigravity/Fast Prompt.txt78-98 Google/Antigravity/Fast Prompt.txt490-502
The workflow system addresses several key requirements in agentic AI assistants:
Problem: Complex multi-step procedures must be executed consistently across sessions.
Solution: Workflows persist procedures as files, enabling:
Problem: Some steps are safe to automate, others require human oversight.
Solution: Turbo annotations provide fine-grained control:
Problem: Users may not know what procedures are available.
Solution: Multiple invocation methods:
.agent/workflows/ provides clear organizationProblem: Agents must handle complex procedures reliably.
Solution: Workflows provide:
Sources: Google/Antigravity/Fast Prompt.txt78-98 Google/Antigravity/Fast Prompt.txt490-502
Create workflows for:
Use // turbo for:
Use // turbo-all for:
Avoid turbo annotations for:
Refresh this wiki