Is external orchestration of Antigravity CLI headless mode supported with account-based usage?

Hi,

I’m looking at Antigravity CLI’s documented headless mode for integration into an external orchestration system.

The documentation already shows that agy -p can be invoked non-interactively, can emit json / stream-json, and uses cached credentials when the CLI has previously been authenticated interactively.

So I’d like to clarify the intended support boundary for this use case:

  1. Is it supported for another local application/orchestrator to launch the official Antigravity CLI in headless mode as a bounded execution worker, while Antigravity itself retains the user’s Google authentication?

If so, when the user is signed in through the normal Antigravity account flow, does such headless usage consume the same account/subscription entitlement and limits as ordinary interactive CLI usage?

I am specifically not asking about extracting OAuth tokens, reusing Antigravity credentials in a third-party client, or calling Antigravity backend services directly. The external application would only invoke the official agy binary.

  1. Is --output-format stream-json intended to provide enough information for audit-grade reconstruction of a run?

For example, can a host reliably reconstruct the ordering of tool calls/results, file changes, permission decisions, subagent activity, retries/recovery, cancellation/interruption, and other runtime state transitions?

If some internal Antigravity runtime events are intentionally omitted or coalesced before they reach stream-json, is there a supported tracing/debugging interface for deeper observability?

I’m trying to understand the intended boundary between:

external orchestration of the official Antigravity runtime

and

unsupported reuse of Antigravity authentication or backend access.

Thanks — any clarification or relevant documentation would be appreciated.

Hi,

Here are the direct answers to your questions regarding Antigravity CLI (agy) in headless mode:

  1. Support & Entitlements:
    Yes, this is fully supported. Launching the official agy binary as a local child process in headless mode (e.g. agy --input-format stream-json --output-format stream-json
    –dangerously-skip-permissions) while relying on agy’s cached Google credentials is a supported workflow. It consumes the exact same account entitlements and subscription
    limits as ordinary interactive CLI usage.
  2. Auditability & stream-json:
    –output-format stream-json provides real-time IPC events for tool calls, arguments, states, and results. For complete forensic auditing (un-coalesced timestamps, step
    history, and thought parts), the supported method is to read the native on-disk transcript.jsonl log (~/.gemini/antigravity-cli/brain//.
    system_generated/logs/transcript.jsonl). Deep lifecycle auditing can also be configured via .agents/hooks.json.
  3. The Intended Boundary:
    • Supported: Invoking the official agy binary via standard process pipes (stdin/stdout).
    • Unsupported: Extracting OAuth tokens from disk, reusing credentials in custom HTTP clients, or calling Antigravity backend endpoints directly.