Is it allowed for an open-source tool to call the official `agy` CLI in headless mode?

Hi — I maintain sprite-gen (GitHub - aldegad/sprite-gen: Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill. · GitHub), an open-source Python tool that generates 2D game sprites through image-generation backends the user already has access to.

A contributor proposed a provider that runs the official Antigravity CLI in headless mode and uses its built-in generate_image tool:

agy --output-format json -p "<prompt>"

The tool never reads or reuses the Antigravity OAuth token. It only spawns the official agy binary, which the user installed and signed into themselves, in the headless mode described at Headless mode | Google Antigravity Docs (“script agent tasks, integrate with CI pipelines”).

I declined the contribution for now because of Section 6 of the Terms of Service:

You must not abuse, harm, interfere with, or disrupt the Service. This includes, but is not limited to, using the Service in connection with products not provided by us. Using third party software, tools, or services to access the Service (e.g. using OpenClaw with Antigravity OAuth) is a breach of this Agreement.

I understand that using another client with Antigravity OAuth is not allowed. What I can’t tell is whether the case above is also covered — a third-party program launching the official CLI on the user’s machine, under the user’s own login, through the documented headless mode.

Could someone from the team clarify?

  1. Is invoking agy headless mode from a third-party open-source tool allowed for individual Google AI Pro / Ultra accounts?
  2. If it is not, is an AI Studio / Vertex API key the only supported route for a third-party tool that wants Nano Banana image generation?

I’d rather ask than put users’ accounts at risk. Thanks!

Hi @darkest_alex, Welcome to the Forum,

  • Is calling agy headless allowed?

    • Yes. Calling the official agy binary locally via agy -p is an officially supported feature built for programmatic scripting (see the Headless Mode Documentation). It does not violate Section 6, provided your tool never extracts, stores, or intercepts the user’s OAuth credentials. As noted in the Antigravity FAQ and Terms of Service, the restriction specifically targets unauthorized third-party clients intercepting tokens to proxy private endpoints. However, heavy automated batching may trigger rate limits on personal plan quotas.
  • Is AI Studio / Vertex AI the recommended route?

    • Yes. For an open-source library like sprite-gen, integrating via a standard Google AI Studio or Vertex AI API key using the official SDK (see the Gemini API Documentation) is the intended, production-safe approach.

The best approach is to make the Google AI Studio API key your primary provider, and keep local agy CLI headless execution as an optional, local-only community provider.