Skip to content

Add Antigravity usage collector for the agents panel - #10554

Open
candrewlee14 wants to merge 1 commit into
omacom:quattrofrom
candrewlee14:feat/antigravity-usage-collector
Open

Add Antigravity usage collector for the agents panel#10554
candrewlee14 wants to merge 1 commit into
omacom:quattrofrom
candrewlee14:feat/antigravity-usage-collector

Conversation

@candrewlee14

Copy link
Copy Markdown

Summary

Adds the Antigravity usage collector (bin/omarchy-agent-usage-antigravity) to surface Google Antigravity CLI (agy) usage metrics in the omarchy.agents bar widget and panel.

Following up on recent Antigravity default agent integration, this gives Antigravity the same first-class status in the agents drawer as Claude Code, Codex, and Fireworks.

Details

  • Metrics Collected:
    • Token metrics: Parses inputTokens, outputTokens (including reasoning/thinking tokens), and cacheReadInputTokens by model (gemini-3.8-flash) from ~/.gemini/antigravity-cli/conversations/*.db.
    • Activity & Prompts: Tracks total and today prompts and sessions from ~/.gemini/antigravity-cli/history.jsonl (with fallback to conversation transcripts in brain/).
    • Tier / Account: Extracts signed-in account from google_accounts.json for the hero tier label.
  • Implementation:
    • Single-pass, zero-dependency stream decoder for ModelUsageStats protobufs stored in SQLite gen_metadata.
    • Concurrency safe: reads SQLite databases read-only with PRAGMA query_only = ON.
    • Cached via ~/.cache/omarchy/agent-usage/ with atomic locking. Full disk scan completes in ~20ms.
  • UI Assets:
    • Added assets/antigravity.svg and assets/antigravity-light.svg with high-contrast marks matching Omarchy's icon style.
    • Documented Antigravity in shell/plugins/agents/README.md.
  • Tests:
    • Added test/shell.d/agent-usage-antigravity-scanner-test.sh testing empty data handling, history.jsonl aggregation, transcript.jsonl fallback, caching, and SQLite protobuf decoding.

Verification

  • ./test/shell.d/agent-usage-antigravity-scanner-test.sh: 5/5 tests pass.
  • ./test/cli: all suites pass cleanly.
  • Tested live on an Omarchy machine running antigravity-cli.

@candrewlee14
candrewlee14 force-pushed the feat/antigravity-usage-collector branch from ad85347 to d4fa9dd Compare September 6, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant