Skip to main content

Module antigravity

Module antigravity 

Source
Expand description

Antigravity CLI (agy) conversations: ~/.gemini/antigravity-cli/conversations/<id>.db.

Antigravity persists a conversation as a small SQLite database of protobuf-encoded trajectory steps (gemini_coder.Step — a step-type tag, a CortexStepMetadata envelope carrying timestamps / the tool call / model usage, and one payload message per step kind), plus a brain/<id>/ working directory whose .system_generated/logs/transcript*.jsonl files mirror the conversation for display. The database is the resume carrier: agy --conversation=<id> rebuilds model context from the steps alone and silently starts a fresh session when the database is missing, while a missing brain/<id>/ directory wedges the CLI — save therefore always writes the database and creates the brain directory.

Losslessness is at the blob level: every table row round-trips byte-for- byte through AntigravityDb; only the step payloads the codec understands are interpreted, with hand-rolled protobuf read/write for the handful of field numbers involved (recovered from the descriptors embedded in the agy binary).

Known representational losses through Common:

  • toolAction/toolSummary display strings inside typed tool arguments (and their CortexStepMetadata mirrors) are dropped; Tool::Raw passthrough keeps them.
  • Per-tool-call binary thinking_signature blobs are not representable and are regenerated as absent.
  • Edit/Write tool results are derived data in Antigravity (diff chunks, uris); free-form result text from other harnesses is replaced by the canonical derived JSON ({"file": …, "created"|"edited": true}).
  • Assistant-side images have no native slot and flatten to placeholder text; user images ride CortexStepUserInput.images.
  • Numeric model ids surface as model-<n> strings; foreign model names cannot be mapped back to Antigravity’s enum and are omitted on write.

Structs§

Antigravity
The Antigravity harness marker.
AntigravityDb
Faithful in-memory representation of one conversations/<id>.db, plus the brain transcript sidecar logs when present.
AntigravityStore
Reads and writes Antigravity conversations under a CLI data root (default ~/.gemini/antigravity-cli).
IndexedBlobRow
One row of executor_metadata / parent_references / battle_mode_infos.
KeyedBlobRow
One row of trajectory_metadata_blob (id is "main" in practice).
SizedBlobRow
One row of gen_metadata (has an extra size column).
StepRow
One row of steps. Blob columns hold protobuf bytes, hex-encoded in the text form.
TrajectoryMetaRow
One row of trajectory_meta.