Back Home

AI 開發工具

Antigravity CLI 1.1.8 Emits Strongly Typed Agent Events, Enabling CI to Track Tools and Subagents Step by Step

Google has added JSON and NDJSON streaming and output schema constraints to Antigravity CLI, eliminating the need for headless agents to parse terminal text. Events also expose tool parameters, results, and subagent traces, improving observability while expanding the potential surface for sensitive data leakage.

Asoundd · CC BY-SA 4.0 · Image source
zh-Hant

Google Antigravity CLI 1.1.8 expands its previously interactive-terminal-oriented agent interface into a structured execution endpoint that can be embedded in CI, evaluation frameworks, and automation scripts. `--output-format` now supports plain text, JSON, and `stream-json`; the last of these emits strongly typed events line by line as NDJSON. Event types include initialization, step updates, and final results, using a closed set of `step_type` values. Consumers can update progress before the agent finishes, without waiting for an entire block of text or relying on brittle regular expressions.

The new version also adds `--json-schema`, which accepts a schema directly or a file path and requires the agent’s final output to conform to the structure expected by the application. In streaming mode, the schema applies to the final `result` event, while intermediate events retain a fixed protocol. Each tool call includes `tool_info`, containing a normalized tool name, parameters, and output; delegated work generates `subagent_info`, providing a conversation ID and log location. JSON usage data now also includes `cache_read_tokens`, allowing batch jobs to distinguish between tokens used for new inference and prompt cache hits.

These changes move Antigravity from a “chat agent that can be launched from a shell” toward a workflow component with a stable event interface: test systems can persist traces step by step, CI can determine pass or fail from structured results, and observability platforms can link parent agents and subagents into a single run. However, strongly typed events do not guarantee semantically correct output; a schema can validate shape, but it cannot prove that an answer, code modification, or tool operation is safe. Because `tool_info` carries parameters and output, logging pipelines that do not redact credentials, source code, and personal data could instead create a new exfiltration channel. The new version also allows complete compound shell commands to be saved as permanent permission rules. Operators should limit their impact through exact command matching, least privilege, and isolated execution environments.

Sources

  1. Antigravity CLI Changelog
  2. Using the Antigravity CLI