Delegate subtask to Antigravity

Agentic AI > June 2026  ·  Peerapat A  · 

antigravity — Delegate to the Antigravity CLI

Bottom Line Up Front: The agy CLI runs Antigravity (an agentic assistant) non-interactively. Use it to hand off a bounded subtask, capture the result from stdout, and continue the main task in this session.

---
name: antigravity
description: Delegate self-contained subtasks to the Antigravity CLI (`agy`). Use `agy -p` to offload work better handled outside this session — translating non-English input, summarizing, drafting, extracting, or one-off code/text generation — optionally choosing a model (`--model`; list with `agy models`: Gemini / Claude / GPT-OSS) or giving it files (`--add-dir`), then continue here with its stdout. Use when the subtask is well-scoped and returns a complete result.
---

# antigravity — Delegate to the Antigravity CLI

The `agy` CLI runs Antigravity (an agentic assistant) non-interactively. Use it to hand
off a bounded subtask, capture the result from stdout, and continue the main task in
this session.

## Use when

- A subtask is well-scoped and expressible as a single prompt — translation,
  summarization, drafting, extraction, classification, or one-off code/text generation.
- You want to offload work that is cheaper or faster handled outside this session, then
  consume the result here.
- You want a second model's take on a self-contained question (Antigravity exposes
  Gemini, Claude, and GPT-OSS models).

## Do not use when

- The work depends on this session's accumulated context, open files, or tools — keep
  that here.
- You need tight interactive iteration, or to drive the tool calls yourself.
- It's trivial enough that doing it inline is faster than shelling out.

## How to call

Print mode (`-p`, alias for `--print` / `--prompt`) runs one prompt and prints the
response to stdout:

```bash
agy -p "<your prompt here>"
```

Pipe larger input on stdin and reference it in the instruction:

```bash
cat <file> | agy -p "<instruction describing what to do with the input>"
```

Or give Antigravity read access to files instead of pasting them:

```bash
agy --add-dir . -p "Review app/conf/.../FooController.scala and list any unhandled error cases."
```

### Useful options

- `--model "<name>"` — pick the model; list options with `agy models` (e.g.
  *Gemini 3.5 Flash* for cheap/fast, *Claude Opus 4.6 (Thinking)* for hard reasoning).
- `--add-dir <dir>` — add a directory to Antigravity's workspace (repeatable) so it can
  read files itself.
- `--print-timeout <dur>` — raise the wait for long tasks (default 5m).
- `-c` / `--continue`, `--conversation <id>` — continue a prior delegation when one
  prompt isn't enough.

### Examples

```bash
# Translate to English, output only the translation
agy -p "Translate the following into English, output only the translation:\n<source text>"

# Summarize a file
cat notes.md | agy -p "Summarize the following in 5 bullet points."

# Cheap one-off generation on a fast model
agy --model "Gemini 3.5 Flash (Low)" -p "Write a regex for an RFC 5322 email. Output only the regex."
```

## Rules

1. **Scope the prompt fully.** `agy -p` is non-interactive — include everything it needs
   in one prompt (or use `-c` to continue an existing delegation).
2. **Delegate, then continue here.** Antigravity handles the offloaded subtask; the
   surrounding work, decisions, and edits stay in this session.
3. **Constrain the output.** Ask for exactly the format you want ("output only …") so the
   result is easy to consume programmatically.
4. **Match the model to the job.** A fast/cheap model for simple offloads, a stronger
   thinking model for hard reasoning.
5. **Surface failures.** If `agy` errors or is unavailable, report that plainly rather
   than guessing at the result.

Use when

  • A subtask is well-scoped and expressible as a single prompt — translation, summarization, drafting, extraction, classification, or one-off code/text generation.
  • You want to offload work that is cheaper or faster handled outside this session, then consume the result here.
  • You want a second model's take on a self-contained question (Antigravity exposes Gemini, Claude, and GPT-OSS models).

Do not use when

  • The work depends on this session's accumulated context, open files, or tools — keep that here.
  • You need tight interactive iteration, or to drive the tool calls yourself.
  • It's trivial enough that doing it inline is faster than shelling out.

How to call

Print mode (-p, alias for --print / --prompt) runs one prompt and prints the response to stdout:

bash
agy -p "<your prompt here>"

Pipe larger input on stdin and reference it in the instruction:

bash
cat <file> | agy -p "<instruction describing what to do with the input>"

Or give Antigravity read access to files instead of pasting them:

bash
agy --add-dir . -p "Review app/conf/.../FooController.scala and list any unhandled error cases."

Useful options

  • --model "<name>" — pick the model; list options with agy models (e.g. Gemini 3.5 Flash for cheap/fast, Claude Opus 4.6 (Thinking) for hard reasoning).
  • --add-dir <dir> — add a directory to Antigravity's workspace (repeatable) so it can read files itself.
  • --print-timeout <dur> — raise the wait for long tasks (default 5m).
  • -c / --continue, --conversation <id> — continue a prior delegation when one prompt isn't enough.

Examples

bash
# Translate to English, output only the translation
agy -p "Translate the following into English, output only the translation:\n<source text>"

# Summarize a file
cat notes.md | agy -p "Summarize the following in 5 bullet points."

# Cheap one-off generation on a fast model
agy --model "Gemini 3.5 Flash (Low)" -p "Write a regex for an RFC 5322 email. Output only the regex."

Rules

  1. Scope the prompt fully. agy -p is non-interactive — include everything it needs in one prompt (or use -c to continue an existing delegation).
  2. Delegate, then continue here. Antigravity handles the offloaded subtask; the surrounding work, decisions, and edits stay in this session.
  3. Constrain the output. Ask for exactly the format you want ("output only …") so the result is easy to consume programmatically.
  4. Match the model to the job. A fast/cheap model for simple offloads, a stronger thinking model for hard reasoning.
  5. Surface failures. If agy errors or is unavailable, report that plainly rather than guessing at the result.

antigravity — Delegate งานไปที่ Antigravity CLI

สรุปประเด็นสำคัญ (BLUF): agy CLI ทำงานกับ Antigravity แบบ non-interactive ใช้มันเพื่อ delegate subtask ที่มีขอบเขตชัดเจน รับผลลัพธ์จาก stdout แล้วทำงานหลักต่อใน session ปัจจุบัน

---
name: antigravity
description: Delegate self-contained subtasks to the Antigravity CLI (`agy`). Use `agy -p` to offload work better handled outside this session — translating non-English input, summarizing, drafting, extracting, or one-off code/text generation — optionally choosing a model (`--model`; list with `agy models`: Gemini / Claude / GPT-OSS) or giving it files (`--add-dir`), then continue here with its stdout. Use when the subtask is well-scoped and returns a complete result.
---

# antigravity — Delegate to the Antigravity CLI

The `agy` CLI runs Antigravity (an agentic assistant) non-interactively. Use it to hand
off a bounded subtask, capture the result from stdout, and continue the main task in
this session.

## Use when

- A subtask is well-scoped and expressible as a single prompt — translation,
  summarization, drafting, extraction, classification, or one-off code/text generation.
- You want to offload work that is cheaper or faster handled outside this session, then
  consume the result here.
- You want a second model's take on a self-contained question (Antigravity exposes
  Gemini, Claude, and GPT-OSS models).

## Do not use when

- The work depends on this session's accumulated context, open files, or tools — keep
  that here.
- You need tight interactive iteration, or to drive the tool calls yourself.
- It's trivial enough that doing it inline is faster than shelling out.

## How to call

Print mode (`-p`, alias for `--print` / `--prompt`) runs one prompt and prints the
response to stdout:

```bash
agy -p "<your prompt here>"
```

Pipe larger input on stdin and reference it in the instruction:

```bash
cat <file> | agy -p "<instruction describing what to do with the input>"
```

Or give Antigravity read access to files instead of pasting them:

```bash
agy --add-dir . -p "Review app/conf/.../FooController.scala and list any unhandled error cases."
```

### Useful options

- `--model "<name>"` — pick the model; list options with `agy models` (e.g.
  *Gemini 3.5 Flash* for cheap/fast, *Claude Opus 4.6 (Thinking)* for hard reasoning).
- `--add-dir <dir>` — add a directory to Antigravity's workspace (repeatable) so it can
  read files itself.
- `--print-timeout <dur>` — raise the wait for long tasks (default 5m).
- `-c` / `--continue`, `--conversation <id>` — continue a prior delegation when one
  prompt isn't enough.

### Examples

```bash
# Translate to English, output only the translation
agy -p "Translate the following into English, output only the translation:\n<source text>"

# Summarize a file
cat notes.md | agy -p "Summarize the following in 5 bullet points."

# Cheap one-off generation on a fast model
agy --model "Gemini 3.5 Flash (Low)" -p "Write a regex for an RFC 5322 email. Output only the regex."
```

## Rules

1. **Scope the prompt fully.** `agy -p` is non-interactive — include everything it needs
   in one prompt (or use `-c` to continue an existing delegation).
2. **Delegate, then continue here.** Antigravity handles the offloaded subtask; the
   surrounding work, decisions, and edits stay in this session.
3. **Constrain the output.** Ask for exactly the format you want ("output only …") so the
   result is easy to consume programmatically.
4. **Match the model to the job.** A fast/cheap model for simple offloads, a stronger
   thinking model for hard reasoning.
5. **Surface failures.** If `agy` errors or is unavailable, report that plainly rather
   than guessing at the result.

Use when (ควรใช้เมื่อ)

  • Subtask มีขอบเขตชัดเจนและสามารถระบุใน prompt เดียว — เช่น การแปล (translation), สรุปความ (summarization), ร่างเอกสาร (drafting), ดึงข้อมูล (extraction), จัดหมวดหมู่ (classification) หรือสร้างโค้ด/ข้อความสั้นๆ
  • คุณต้องการ offload งานที่จัดการได้ถูกกว่าหรือเร็วกว่าภายนอก session นี้ แล้วนำผลลัพธ์กลับมาใช้
  • คุณต้องการคำตอบของโมเดลอื่นสำหรับคำถามเฉพาะเจาะจง (Antigravity รองรับโมเดล Gemini, Claude, และ GPT-OSS)

Do not use when (ไม่ควรใช้เมื่อ)

  • งานนั้นต้องอาศัย context, ไฟล์ที่กำลังเปิดอยู่ หรือเครื่องมือภายใน session ปัจจุบัน — ให้ทำในนี้แทน
  • คุณต้องการการโต้ตอบแบบ interactive อย่างใกล้ชิด หรือต้องการเรียกใช้ tool calls ด้วยตัวเอง
  • งานนั้นง่ายมากจนการทำ inline เร็วกว่าการเรียกคำสั่งภายนอก

How to call (วิธีการเรียกใช้)

Print mode (-p, ย่อมาจาก --print / --prompt) รันหนึ่ง prompt แล้วพิมพ์ผลลัพธ์ไปที่ stdout:

bash
agy -p "<your prompt here>"

ส่งข้อมูลขนาดใหญ่ผ่าน stdin แล้วอ้างอิงถึงมันใน instruction:

bash
cat <file> | agy -p "<instruction describing what to do with the input>"

หรือให้สิทธิ์ Antigravity ในการอ่านไฟล์แทนที่จะ paste ลงไป:

bash
agy --add-dir . -p "Review app/conf/.../FooController.scala and list any unhandled error cases."

Useful options (ออปชันที่มีประโยชน์)

  • --model "<name>" — เลือกโมเดล; ดูตัวเลือกได้ด้วย agy models (เช่น Gemini 3.5 Flash สำหรับงานถูก/เร็ว, Claude Opus 4.6 (Thinking) สำหรับการใช้เหตุผลที่ซับซ้อน)
  • --add-dir <dir> — เพิ่ม directory ให้ workspace ของ Antigravity (สามารถใช้ซ้ำได้) เพื่อให้อ่านไฟล์ได้เอง
  • --print-timeout <dur> — เพิ่มเวลารอสำหรับงานที่ใช้เวลานาน (ค่าเริ่มต้นคือ 5 นาที)
  • -c / --continue, --conversation <id> — ทำงานต่อจากการ delegate ก่อนหน้าหาก prompt เดียวไม่พอ

Examples (ตัวอย่าง)

bash
# Translate to English, output only the translation
agy -p "Translate the following into English, output only the translation:\n<source text>"

# Summarize a file
cat notes.md | agy -p "Summarize the following in 5 bullet points."

# Cheap one-off generation on a fast model
agy --model "Gemini 3.5 Flash (Low)" -p "Write a regex for an RFC 5322 email. Output only the regex."

Rules (กฎ)

  1. Scope the prompt fully. agy -p เป็นแบบ non-interactive — ใส่ทุกอย่างที่ต้องการลงใน prompt เดียว (หรือใช้ -c เพื่อทำต่อจาก delegation เดิม)
  2. Delegate, then continue here. Antigravity จะจัดการ offloaded subtask; ส่วนงานหลัก การตัดสินใจ และการแก้ไขยังคงอยู่ใน session นี้
  3. Constrain the output. ระบุรูปแบบที่คุณต้องการให้ชัดเจน ("output only …") เพื่อให้ผลลัพธ์นำไปใช้ต่อโปรแกรมได้ง่าย
  4. Match the model to the job. ใช้โมเดลเร็ว/ถูก สำหรับ offload ง่ายๆ และโมเดล thinking สำหรับการใช้เหตุผลซับซ้อน
  5. Surface failures. หาก agy เกิดข้อผิดพลาดหรือไม่พร้อมใช้งาน ให้รายงานตามตรงแทนที่จะเดาผลลัพธ์

antigravity — 将任务 Delegate 给 Antigravity CLI

核心结论 (BLUF): agy CLI 以非交互方式运行 Antigravity。使用它来 delegate 一个明确边界的 subtask,从 stdout 获取结果,然后在此 session 中继续主任务。

---
name: antigravity
description: Delegate self-contained subtasks to the Antigravity CLI (`agy`). Use `agy -p` to offload work better handled outside this session — translating non-English input, summarizing, drafting, extracting, or one-off code/text generation — optionally choosing a model (`--model`; list with `agy models`: Gemini / Claude / GPT-OSS) or giving it files (`--add-dir`), then continue here with its stdout. Use when the subtask is well-scoped and returns a complete result.
---

# antigravity — Delegate to the Antigravity CLI

The `agy` CLI runs Antigravity (an agentic assistant) non-interactively. Use it to hand
off a bounded subtask, capture the result from stdout, and continue the main task in
this session.

## Use when

- A subtask is well-scoped and expressible as a single prompt — translation,
  summarization, drafting, extraction, classification, or one-off code/text generation.
- You want to offload work that is cheaper or faster handled outside this session, then
  consume the result here.
- You want a second model's take on a self-contained question (Antigravity exposes
  Gemini, Claude, and GPT-OSS models).

## Do not use when

- The work depends on this session's accumulated context, open files, or tools — keep
  that here.
- You need tight interactive iteration, or to drive the tool calls yourself.
- It's trivial enough that doing it inline is faster than shelling out.

## How to call

Print mode (`-p`, alias for `--print` / `--prompt`) runs one prompt and prints the
response to stdout:

```bash
agy -p "<your prompt here>"
```

Pipe larger input on stdin and reference it in the instruction:

```bash
cat <file> | agy -p "<instruction describing what to do with the input>"
```

Or give Antigravity read access to files instead of pasting them:

```bash
agy --add-dir . -p "Review app/conf/.../FooController.scala and list any unhandled error cases."
```

### Useful options

- `--model "<name>"` — pick the model; list options with `agy models` (e.g.
  *Gemini 3.5 Flash* for cheap/fast, *Claude Opus 4.6 (Thinking)* for hard reasoning).
- `--add-dir <dir>` — add a directory to Antigravity's workspace (repeatable) so it can
  read files itself.
- `--print-timeout <dur>` — raise the wait for long tasks (default 5m).
- `-c` / `--continue`, `--conversation <id>` — continue a prior delegation when one
  prompt isn't enough.

### Examples

```bash
# Translate to English, output only the translation
agy -p "Translate the following into English, output only the translation:\n<source text>"

# Summarize a file
cat notes.md | agy -p "Summarize the following in 5 bullet points."

# Cheap one-off generation on a fast model
agy --model "Gemini 3.5 Flash (Low)" -p "Write a regex for an RFC 5322 email. Output only the regex."
```

## Rules

1. **Scope the prompt fully.** `agy -p` is non-interactive — include everything it needs
   in one prompt (or use `-c` to continue an existing delegation).
2. **Delegate, then continue here.** Antigravity handles the offloaded subtask; the
   surrounding work, decisions, and edits stay in this session.
3. **Constrain the output.** Ask for exactly the format you want ("output only …") so the
   result is easy to consume programmatically.
4. **Match the model to the job.** A fast/cheap model for simple offloads, a stronger
   thinking model for hard reasoning.
5. **Surface failures.** If `agy` errors or is unavailable, report that plainly rather
   than guessing at the result.

Use when (何时使用)

  • Subtask 范围明确,可以用一个 prompt 表达——例如翻译 (translation)、总结 (summarization)、起草 (drafting)、提取 (extraction)、分类 (classification) 或一次性代码/文本生成。
  • 你想把在此 session 之外处理更便宜或更快的任务 offload 出去,然后在这里使用结果。
  • 你需要另一个模型对独立问题的看法(Antigravity 提供 Gemini、Claude 和 GPT-OSS 模型)。

Do not use when (何时不使用)

  • 工作依赖于此 session 积累的 context、打开的文件或工具——请留在这里完成。
  • 你需要紧密的交互式迭代,或者需要自己驱动 tool calls。
  • 任务非常简单,inline 处理比调用外部命令更快。

How to call (如何调用)

Print mode (-p, 是 --print / --prompt 的简写) 运行一个 prompt 并将结果输出到 stdout:

bash
agy -p "<your prompt here>"

通过 stdin 传入大量数据,并在 instruction 中引用它:

bash
cat <file> | agy -p "<instruction describing what to do with the input>"

或者给 Antigravity 读取文件的权限,而不是直接粘贴:

bash
agy --add-dir . -p "Review app/conf/.../FooController.scala and list any unhandled error cases."

Useful options (实用选项)

  • --model "<name>" — 选择模型;使用 agy models 查看选项(例如 Gemini 3.5 Flash 便宜/快速,Claude Opus 4.6 (Thinking) 适合复杂推理)。
  • --add-dir <dir> — 将 directory 添加到 Antigravity 的 workspace(可重复使用),以便它可以自己读取文件。
  • --print-timeout <dur> — 为长时间任务增加等待时间(默认 5 分钟)。
  • -c / --continue, --conversation <id> — 当一个 prompt 不够时,继续之前的 delegation。

Examples (示例)

bash
# Translate to English, output only the translation
agy -p "Translate the following into English, output only the translation:\n<source text>"

# Summarize a file
cat notes.md | agy -p "Summarize the following in 5 bullet points."

# Cheap one-off generation on a fast model
agy --model "Gemini 3.5 Flash (Low)" -p "Write a regex for an RFC 5322 email. Output only the regex."

Rules (规则)

  1. Scope the prompt fully. agy -p 是非交互式的——在一个 prompt 中包含它需要的所有内容(或使用 -c 继续现有的 delegation)。
  2. Delegate, then continue here. Antigravity 处理 offload 出去的 subtask;周边的主要工作、决定和修改留在这个 session 中。
  3. Constrain the output. 准确要求你想要的格式("output only …"),这样结果就能轻松通过程序处理。
  4. Match the model to the job. 使用快速/便宜的模型处理简单的 offload,使用更强的 thinking 模型处理复杂的推理。
  5. Surface failures. 如果 agy 出错或不可用,直接报告,而不是猜测结果。

antigravity — Antigravity CLI へのタスクの Delegate

結論 (BLUF): agy CLI は非対話的に Antigravity を実行します。境界が明確な subtask を delegate し、stdout から結果を取得して、現在の session でメインのタスクを続行するために使用します。

---
name: antigravity
description: Delegate self-contained subtasks to the Antigravity CLI (`agy`). Use `agy -p` to offload work better handled outside this session — translating non-English input, summarizing, drafting, extracting, or one-off code/text generation — optionally choosing a model (`--model`; list with `agy models`: Gemini / Claude / GPT-OSS) or giving it files (`--add-dir`), then continue here with its stdout. Use when the subtask is well-scoped and returns a complete result.
---

# antigravity — Delegate to the Antigravity CLI

The `agy` CLI runs Antigravity (an agentic assistant) non-interactively. Use it to hand
off a bounded subtask, capture the result from stdout, and continue the main task in
this session.

## Use when

- A subtask is well-scoped and expressible as a single prompt — translation,
  summarization, drafting, extraction, classification, or one-off code/text generation.
- You want to offload work that is cheaper or faster handled outside this session, then
  consume the result here.
- You want a second model's take on a self-contained question (Antigravity exposes
  Gemini, Claude, and GPT-OSS models).

## Do not use when

- The work depends on this session's accumulated context, open files, or tools — keep
  that here.
- You need tight interactive iteration, or to drive the tool calls yourself.
- It's trivial enough that doing it inline is faster than shelling out.

## How to call

Print mode (`-p`, alias for `--print` / `--prompt`) runs one prompt and prints the
response to stdout:

```bash
agy -p "<your prompt here>"
```

Pipe larger input on stdin and reference it in the instruction:

```bash
cat <file> | agy -p "<instruction describing what to do with the input>"
```

Or give Antigravity read access to files instead of pasting them:

```bash
agy --add-dir . -p "Review app/conf/.../FooController.scala and list any unhandled error cases."
```

### Useful options

- `--model "<name>"` — pick the model; list options with `agy models` (e.g.
  *Gemini 3.5 Flash* for cheap/fast, *Claude Opus 4.6 (Thinking)* for hard reasoning).
- `--add-dir <dir>` — add a directory to Antigravity's workspace (repeatable) so it can
  read files itself.
- `--print-timeout <dur>` — raise the wait for long tasks (default 5m).
- `-c` / `--continue`, `--conversation <id>` — continue a prior delegation when one
  prompt isnt enough.

### Examples

```bash
# Translate to English, output only the translation
agy -p "Translate the following into English, output only the translation:\n<source text>"

# Summarize a file
cat notes.md | agy -p "Summarize the following in 5 bullet points."

# Cheap one-off generation on a fast model
agy --model "Gemini 3.5 Flash (Low)" -p "Write a regex for an RFC 5322 email. Output only the regex."
```

## Rules

1. **Scope the prompt fully.** `agy -p` is non-interactive — include everything it needs
   in one prompt (or use `-c` to continue an existing delegation).
2. **Delegate, then continue here.** Antigravity handles the offloaded subtask; the
   surrounding work, decisions, and edits stay in this session.
3. **Constrain the output.** Ask for exactly the format you want ("output only …") so the
   result is easy to consume programmatically.
4. **Match the model to the job.** A fast/cheap model for simple offloads, a stronger
   thinking model for hard reasoning.
5. **Surface failures.** If `agy` errors or is unavailable, report that plainly rather
   than guessing at the result.

Use when (使用する場面)

  • Subtask のスコープが適切で、単一の prompt で表現できる場合 — 翻訳 (translation)、要約 (summarization)、ドラフト作成 (drafting)、抽出 (extraction)、分類 (classification)、または 1 回限りのコード/テキスト生成など。
  • この session 外で処理した方が安価または高速なタスクを offload し、その結果をここで使用したい場合。
  • 独立した質問に対する別のモデルの回答が必要な場合 (Antigravity は Gemini、Claude、GPT-OSS モデルを提供しています)。

Do not use when (使用しない場面)

  • タスクがこの session の蓄積された context、開いているファイル、またはツールに依存している場合 — ここで実行してください。
  • 密接な対話型のイテレーションが必要な場合、または自分で tool calls を駆動したい場合。
  • 非常に単純なため、インラインで実行する方が外部コマンドを呼び出すよりも速い場合。

How to call (呼び出し方)

Print mode (-p, --print / --prompt のエイリアス) は 1 つの prompt を実行し、結果を stdout に出力します。

bash
agy -p "<your prompt here>"

大きな入力は stdin でパイプし、instruction でそれを参照します。

bash
cat <file> | agy -p "<instruction describing what to do with the input>"

または、テキストを貼り付ける代わりに、Antigravity にファイルの読み取りアクセス権を与えます。

bash
agy --add-dir . -p "Review app/conf/.../FooController.scala and list any unhandled error cases."

Useful options (便利なオプション)

  • --model "<name>" — モデルを選択します。agy models でオプションをリスト表示します (例: Gemini 3.5 Flash は安価で高速、Claude Opus 4.6 (Thinking) は複雑な推論向け)。
  • --add-dir <dir> — Antigravity の workspace に directory を追加し (繰り返し可能)、自身でファイルを読み取れるようにします。
  • --print-timeout <dur> — 長時間のタスクの待機時間を増やします (デフォルトは 5 分)。
  • -c / --continue, --conversation <id> — 1 つの prompt では不十分な場合、以前の delegation を続行します。

Examples (例)

bash
# Translate to English, output only the translation
agy -p "Translate the following into English, output only the translation:\n<source text>"

# Summarize a file
cat notes.md | agy -p "Summarize the following in 5 bullet points."

# Cheap one-off generation on a fast model
agy --model "Gemini 3.5 Flash (Low)" -p "Write a regex for an RFC 5322 email. Output only the regex."

Rules (ルール)

  1. Scope the prompt fully. agy -p は非対話的です — 必要なすべてを 1 つの prompt に含めます (または -c を使用して既存の delegation を続行します)。
  2. Delegate, then continue here. Antigravity は offload された subtask を処理します。周辺の作業、決定、編集はこの session に留まります。
  3. Constrain the output. プログラムで結果を簡単に消費できるように、希望するフォーマット ("output only …" など) を正確に要求してください。
  4. Match the model to the job. 単純な offload には高速で安価なモデルを、複雑な推論にはより強力な thinking モデルを使用します。
  5. Surface failures. agy でエラーが発生した場合、または利用できない場合は、結果を推測するのではなく、そのまま報告してください。

antigravity — Delegate an das Antigravity CLI

Fazit (BLUF): Das agy CLI führt Antigravity nicht-interaktiv aus. Verwenden Sie es, um einen abgegrenzten Subtask zu delegieren, das Ergebnis aus stdout zu erfassen und die Hauptaufgabe in dieser Session fortzusetzen.

---
name: antigravity
description: Delegate self-contained subtasks to the Antigravity CLI (`agy`). Use `agy -p` to offload work better handled outside this session — translating non-English input, summarizing, drafting, extracting, or one-off code/text generation — optionally choosing a model (`--model`; list with `agy models`: Gemini / Claude / GPT-OSS) or giving it files (`--add-dir`), then continue here with its stdout. Use when the subtask is well-scoped and returns a complete result.
---

# antigravity — Delegate to the Antigravity CLI

The `agy` CLI runs Antigravity (an agentic assistant) non-interactively. Use it to hand
off a bounded subtask, capture the result from stdout, and continue the main task in
this session.

## Use when

- A subtask is well-scoped and expressible as a single prompt — translation,
  summarization, drafting, extraction, classification, or one-off code/text generation.
- You want to offload work that is cheaper or faster handled outside this session, then
  consume the result here.
- You want a second model's take on a self-contained question (Antigravity exposes
  Gemini, Claude, and GPT-OSS models).

## Do not use when

- The work depends on this session's accumulated context, open files, or tools — keep
  that here.
- You need tight interactive iteration, or to drive the tool calls yourself.
- It's trivial enough that doing it inline is faster than shelling out.

## How to call

Print mode (`-p`, alias for `--print` / `--prompt`) runs one prompt and prints the
response to stdout:

```bash
agy -p "<your prompt here>"
```

Pipe larger input on stdin and reference it in the instruction:

```bash
cat <file> | agy -p "<instruction describing what to do with the input>"
```

Or give Antigravity read access to files instead of pasting them:

```bash
agy --add-dir . -p "Review app/conf/.../FooController.scala and list any unhandled error cases."
```

### Useful options

- `--model "<name>"` — pick the model; list options with `agy models` (e.g.
  *Gemini 3.5 Flash* for cheap/fast, *Claude Opus 4.6 (Thinking)* for hard reasoning).
- `--add-dir <dir>` — add a directory to Antigravity's workspace (repeatable) so it can
  read files itself.
- `--print-timeout <dur>` — raise the wait for long tasks (default 5m).
- `-c` / `--continue`, `--conversation <id>` — continue a prior delegation when one
  prompt isn't enough.

### Examples

```bash
# Translate to English, output only the translation
agy -p "Translate the following into English, output only the translation:\n<source text>"

# Summarize a file
cat notes.md | agy -p "Summarize the following in 5 bullet points."

# Cheap one-off generation on a fast model
agy --model "Gemini 3.5 Flash (Low)" -p "Write a regex for an RFC 5322 email. Output only the regex."
```

## Rules

1. **Scope the prompt fully.** `agy -p` is non-interactive — include everything it needs
   in one prompt (or use `-c` to continue an existing delegation).
2. **Delegate, then continue here.** Antigravity handles the offloaded subtask; the
   surrounding work, decisions, and edits stay in this session.
3. **Constrain the output.** Ask for exactly the format you want ("output only …") so the
   result is easy to consume programmatically.
4. **Match the model to the job.** A fast/cheap model for simple offloads, a stronger
   thinking model for hard reasoning.
5. **Surface failures.** If `agy` errors or is unavailable, report that plainly rather
   than guessing at the result.

Use when (Wann verwenden)

  • Ein Subtask ist gut abgegrenzt und lässt sich in einem einzigen Prompt ausdrücken — z. B. Übersetzung (translation), Zusammenfassung (summarization), Entwurf (drafting), Extraktion (extraction), Klassifizierung (classification) oder einmalige Code-/Texterstellung.
  • Sie möchten Arbeiten offloaden, die außerhalb dieser Session billiger oder schneller erledigt werden, und das Ergebnis dann hier konsumieren.
  • Sie möchten die Meinung eines zweiten Modells zu einer in sich geschlossenen Frage (Antigravity bietet Gemini-, Claude- und GPT-OSS-Modelle an).

Do not use when (Wann nicht verwenden)

  • Die Arbeit hängt vom angesammelten Context, den geöffneten Dateien oder den Tools dieser Session ab — erledigen Sie das hier.
  • Sie benötigen enge interaktive Iterationen oder müssen Tool Calls selbst steuern.
  • Es ist so trivial, dass die Inline-Ausführung schneller ist als der Aufruf eines externen Befehls.

How to call (Aufruf)

Der Print Mode (-p, Alias für --print / --prompt) führt einen Prompt aus und gibt die Antwort in stdout aus:

bash
agy -p "<your prompt here>"

Leiten Sie größere Eingaben über stdin weiter und verweisen Sie in der Instruction darauf:

bash
cat <file> | agy -p "<instruction describing what to do with the input>"

Oder geben Sie Antigravity Lesezugriff auf Dateien, anstatt sie einzufügen:

bash
agy --add-dir . -p "Review app/conf/.../FooController.scala and list any unhandled error cases."

Useful options (Nützliche Optionen)

  • --model "<name>" — Modell auswählen; Optionen mit agy models auflisten (z. B. Gemini 3.5 Flash für billig/schnell, Claude Opus 4.6 (Thinking) für komplexe Schlussfolgerungen).
  • --add-dir <dir> — Ein Directory zum Workspace von Antigravity hinzufügen (wiederholbar), damit es Dateien selbst lesen kann.
  • --print-timeout <dur> — Wartezeit für lange Aufgaben erhöhen (Standard 5 Min.).
  • -c / --continue, --conversation <id> — Eine frühere Delegation fortsetzen, wenn ein Prompt nicht ausreicht.

Examples (Beispiele)

bash
# Translate to English, output only the translation
agy -p "Translate the following into English, output only the translation:\n<source text>"

# Summarize a file
cat notes.md | agy -p "Summarize the following in 5 bullet points."

# Cheap one-off generation on a fast model
agy --model "Gemini 3.5 Flash (Low)" -p "Write a regex for an RFC 5322 email. Output only the regex."

Rules (Regeln)

  1. Scope the prompt fully. agy -p ist nicht-interaktiv — fügen Sie alles, was benötigt wird, in einen Prompt ein (oder verwenden Sie -c, um eine bestehende Delegation fortzusetzen).
  2. Delegate, then continue here. Antigravity übernimmt den ausgelagerten Subtask; die umliegende Arbeit, Entscheidungen und Änderungen bleiben in dieser Session.
  3. Constrain the output. Fragen Sie genau nach dem Format, das Sie haben möchten ("output only …"), damit das Ergebnis leicht programmgesteuert verwendet werden kann.
  4. Match the model to the job. Ein schnelles/billiges Modell für einfache Offloads, ein stärkeres Thinking-Modell für harte Überlegungen.
  5. Surface failures. Wenn agy Fehler macht oder nicht verfügbar ist, melden Sie dies klar, anstatt das Ergebnis zu raten.