dsh-subagent-antigravity: Using Google Antigravity CLI as a disposable coding subagent in DSH

Preface

When handling complex coding tasks in DeepSeek Harness (DSH), a parent session often wants to delegate a piece of independent work to another agent that can “modify files and run commands,” receiving only the final conclusion back, rather than flooding the main conversation with tool streams and stderr from the subprocess. The official system already includes subagents of the same form as Codex and Claude Code; however, if you want the backend to be Google’s Antigravity CLI (agy) and leverage an existing Antigravity subscription to use Gemini 4 Argon (gemini-4-argon-low/medium/high) without configuring a separate Gemini API Key, you need a seam to invoke agy from DSH.

The following introduces the community plugin dsh-subagent-antigravity (Maintainer: PipeDream941, Category: Workflow). It registers the subagent_antigravity tool in DSH, driving the official agy via a one-shot subprocess to complete coding delegations within the parent workspace.

What is this

dsh-subagent-antigravity is a DSH plugin for Antigravity subagents: the parent session calls subagent_antigravity({ description, prompt }), which utilizes the antigravity provider via ctx.subagents to launch agy --print --output-format stream-json. It parses the NDJSON events and returns only the final answer to the parent conversation. The form is consistent with subagent_codex and subagent_claude_code, but with Antigravity as the backend.

This plugin is a community work and is not affiliated with Google; the Antigravity CLI is an official Google CLI, and this plugin simply drives it from the DSH side. The npm package name is dsh-subagent-antigravity, the version in current documentation is 0.1.0, and the license is MIT.

Why Antigravity instead of Gemini CLI

The documentation states: Gemini CLI 0.64 remains limited to models like gemini-3.8-flash / gemini-3.1-pro-preview; Gemini 4 is not yet a public API model, and related support requests are still in progress. Gemini 4 Argon is currently available to Google AI Pro / Ultra subscribers via Antigravity. You can use agy models to view the models available to your account. To use Gemini 4 in DSH “just like calling Codex,” you should use the Antigravity CLI; the Gemini CLI route is covered by the sibling plugin dsh-subagent-gemini, which will align once Google provides Gemini 4 on the CLI side.

How it works (Overview)

One delegation = a new process, one interaction round, only the final answer:

  1. The parent session (DeepSeek model) calls the tool subagent_antigravity.
  2. The DSH subagent seam (ctx.subagents, where this plugin registers antigravity).
  3. The execution layer spawns agy, parses NDJSON events such as init / step_update / result, and retains the final answer.
  4. agy operates within the parent process cwd, using its built-in capabilities (files, terminal, browser, MCP, etc.) under your Antigravity login and subscription.
  5. The subagent’s reasoning and tool details do not enter the parent conversation; on failure, it returns fixed phase/category diagnostics rather than raw stderr or credentials.

Environment and Dependencies

Dependency Requirement
DeepSeek Harness 0.2.1-rc.2 series (ctx.subagents + @deepseek-ai/dsh-tool-subagent)
Node.js ^22.19.0 or >=24
Google Antigravity CLI (agy) Official CLI, 1.4+; agy --version must have output
Antigravity Account Logged in via Antigravity app or CLI (Gemini 4 Argon requires AI Pro / Ultra subscription)

First, install the official CLI and confirm the version and model list:

# macOS / Linux
curl -fsSL https://antigravity.google/cli/install.sh | bash
# Windows (PowerShell)
# irm https://antigravity.google/cli/install.ps1 | iex

agy --version      # Docs expect 1.4.2+
agy models         # Lists models available to this account (including gemini-4-argon-*)

The local Antigravity surface shares the login state; if the app is already logged in, agy is usually ready to use. Otherwise, run agy once to complete Google login. Enterprise scenarios can use AGY_ADC_AUTH=true with gcloud auth application-default login, or GEMINI_API_KEY mode (Note: the docs state that if the API Key lacks permission, Gemini 4 cannot be used).

Installation and Activation

Plugin Market (Recommended): Search for dsh-subagent-antigravity in the DSH plugin market, install, and enable it.

Command Line:

dsh plugin --profile desktop add dsh-subagent-antigravity

Then, add the package to the dsh.profile.bundles in the corresponding profile’s package.json and restart (or wait for the profile to recompose):

"dsh": {
  "profile": {
    "bundles": ["…", "dsh-subagent-antigravity"]
  }
}

Once enabled, the global tool subagent_antigravity becomes visible to all agents; currently running sessions will load it on the next request.

The DSH ecosystem philosophy is “Everything is a plugin”; community directory sites (such as skillhub.cn) are independent inclusions and are not officially affiliated with DeepSeek / High-Flyer. This article does not describe them as official app stores.

Typical Usage

Tool call example (prompt must be self-contained, as the subagent cannot see parent session history):

{
  "name": "subagent_antigravity",
  "arguments": {
    "description": "Fix login timeout",
    "prompt": "In the workspace, raise the login request timeout from 5s to 15s, run the related tests, and reply only with what you changed and the test result."
  }
}
  • description: A task name of about 3–5 words.
  • prompt: A complete task description.

Configuration Options

Override the config of the subagent-antigravity entry in the profile patch:

Field Default Meaning
providerName antigravity The name registered on ctx.subagents
command Empty (auto-detect) Path to agy; if empty, searches PATH, ~/.local/bin, etc.
model gemini-4-argon-medium Fixed model; subject to agy models
effort Empty low / medium / high / xhigh / max
mode Empty accept-edits / auto / plan (read-only)
skipPermissions true When true, passes --dangerously-skip-permissions for unattended write and run access
sandbox false Whether to pass --sandbox
timeoutMs 900000 (15 mins) Total time limit for a single delegation
disposeGraceMs 5000 Grace period for SIGKILL after SIGTERM
env {} Additional subprocess environment variables
extraArgs [] Additional CLI arguments

Example of a read-only delegation (Gemini 4 Argon High + plan mode):

- id: subagent-antigravity
  config:
    model: gemini-4-argon-high
    mode: plan
    skipPermissions: false

Security and Permissions

The default skipPermissions: true means the subprocess can modify files and run commands without human confirmation, suitable for trusted workspaces; you should review with git diff yourself after completion. For read-only scenarios, use mode: plan and skipPermissions: false; in headless mode, no popups can appear, so write operations will be denied and reported as permission category failures. The subprocess is isolated from the parent process: DSH strips credential-like variables from the parent environment, forwarding only items declared in config.env. The documentation states that the plugin does not collect telemetry, nor does it read or write Antigravity login credentials; login is managed by the CLI itself.

Troubleshooting (Excerpts)

Symptom Resolution
Antigravity CLI (agy) was not found Run the official installation script and confirm agy --version
Diagnostic category: auth Login not completed: run agy and complete Google login
Diagnostic category: permission Headless cannot confirm: keep skipPermissions: true or use mode: plan
Diagnostic category: quota The current account’s quota or rate limit for this model is exhausted
Diagnostic category: timeout Increase timeoutMs or split the task

In the plugin source directory, you can run npm run smoke to perform a real agy small request self-check (described in the docs as expecting PONG).

Scenarios and Notes

Suitable for developers already using the subagent seam on DSH 0.2.1-rc.2 series, with the Antigravity CLI installed and logged in locally: ideal when you need to outsource a piece of coding work to agy (including Gemini 4 Argon and other subscription models) while keeping the parent session interface concise.

Please check the GitHub source and MIT license yourself before installation; the plugin runs subprocesses with the current DSH process permissions, allowing unattended disk writes and command execution by default. Use only in trusted repositories. For unit tests and development details, see the repository README (e.g., npm test, 34 test cases, etc.).

Links

  • Community Directory Page: https://www.skillhub.cn/plugins/PipeDream941/dsh-subagent-antigravity
  • Source Code & Documentation: https://github.com/PipeDream941/dsh-subagent-antigravity

Through the steps above, the parent session can call the official agy via subagent_antigravity within DSH, use models like Gemini 4 Argon within the subscription scope to complete one-shot coding delegations, and converge the results into a final answer returned to the main conversation.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye