Skip to content

Add Antigravity usage collector for the agents panel - #10554

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

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

Conversation

@candrewlee14

@candrewlee14 candrewlee14 commented Sep 6, 2026 •

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.

Related issue

Contributes to #8477 (usage collector portion only).

@bjarneo

bjarneo commented Sep 21, 2026

Copy link
Copy Markdown
Member

Automated duplication check: this pull request looks similar to #8479, which covers the same Antigravity usage collector. I keep that one open and close this one to consolidate review.

If you feel this is the wrong decision, please open the PR again with a note on the difference.

@bjarneo bjarneo closed this Sep 21, 2026
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.

2 participants