AnyAgent

Antigravity

Use Antigravity through AnyAgent: what you can ask for, how it behaves, and the flags underneath.

The antigravity adapter drives the Antigravity CLI in its headless print mode, detected as the agy binary on PATH; import antigravity from anyagent/antigravity.

What you can ask for

model, effort (closed vocabulary: low, medium, high), and resume work on the CLI’s own flags; systemPrompt and schema are provided by AnyAgent. readOnly and mcp are undeclared and throw: no true read-only run exists, since --mode plan still leaves Antigravity’s internal scratch directories writable. Plan mode stays reachable via extraArgs: ["--mode", "plan"]. models() runs agy models, a cross-vendor catalog whose ids are valid verbatim as model and can bake in an effort level; authStatus() is probed, reading a model listing as authenticated. The full grid is on the support matrix.

Good to know

The default model (auto) can spiral on trivial prompts; pin model for predictable cost.

  • Print mode times out after 5 minutes by default; give a longer run extraArgs: ["--print-timeout", "30m"].
  • The init event’s conversation id lands on result.sessionId and resumes via resume.
  • usage maps the CLI’s thinking_tokens to reasoningTokens; no cache line items are reported.

Under the hood

Every run executes agy -p <prompt> --output-format stream-json --dangerously-skip-permissions, with the prompt as -p’s value; piped stdin is ignored in print mode. Run options append flags:

OptionFlag
model--model <id>, ids verbatim from models()
effort--effort <level>
resume--conversation <sessionId>

On this page