Skip to content

[Feature]: Add Antigravity (agy) session support to the AI Vault Session Scanner / Usage Analytics dashboard #21071

Description

@ESKFLO1

Description

The "Usage Analytics" panel (Stats & Usage / AI Vault dashboard) only lists Overview, Claude, Codex, OpenCode, and Grok in its provider dropdown. Antigravity (the agy CLI) never appears as an option, even after running real Antigravity sessions through Orca — there is no way to see token counts, cost, or session history for Antigravity in this view.

This is distinct from the status-bar quota/rate-limit widget, which does track Antigravity today (after fixes in #9122, #14227, #18167, #19209, #20797). This issue is specifically about the Usage Analytics / AI Vault Session Scanner, a separate subsystem that reads local session/transcript files to compute token & cost analytics.

Root Cause Analysis

The AI Vault Session Scanner currently ships parsers for a fixed set of agent products only:

  • Claude — JSONL logs with conversation turns and token counts
  • Codex — multi-lane JSONL with dedup on import
  • OpenCode — SQLite databases tracking token usage metrics
  • Kimi, Grok, Devin — custom parsers for their own formats

Gemini/Antigravity session/transcript files are not parsed by the Session Scanner at all, so Antigravity can never surface in the Usage Analytics dropdown or aggregate stats (total tokens, est. cost, daily intensity, token mix, providers list), regardless of how many Antigravity sessions have actually run.

Steps to Reproduce

  1. Run one or more coding sessions with Antigravity (agy) through Orca.
  2. Open the "Usage Analytics" panel (Stats & Usage).
  3. Open the provider dropdown (currently: Overview / Claude / Codex / OpenCode / Grok).
  4. Antigravity is absent — no data, no entry, no way to enable it.

Proposed Solution

  • Add a Session Scanner parser for Antigravity's session/transcript format (mirroring how the Codex or OpenCode parsers were implemented), so Antigravity sessions are discovered, parsed, and persisted like the other supported providers (e.g. into an orca-antigravity-usage.json store).
  • Surface Antigravity as a provider entry in the Usage Analytics dropdown and provider cards, consistent with how Claude/Codex/OpenCode/Grok are shown (tokens, sessions, turns, est. cost).
  • If native token/cost accounting isn't available from Antigravity's own session files, at minimum expose whatever the agy --print /usage --output-format json fetcher (added in fix(rate-limits): read native Antigravity usage #20797 for the status bar) already returns, so the two subsystems stay consistent.

Environment

  • Orca app version: 1.4.204
  • OS: macOS (darwin)
  • Agent hooks: antigravity hooks are installed and enabled (orca agent hooks status reports installed/managedHooksPresent: true), so this is not a hook-installation problem — it's a missing parser in the analytics subsystem.

Related

These all fixed the status-bar rate-limit side of Antigravity usage. This issue tracks the still-missing Usage Analytics / AI Vault side.

Activity

  1. AmethystLiang commented on Sep 18, 2026

    @AmethystLiang
    Contributor

    Will prioritize this. ETA for landing PRs & rolling out is early next week!

  2. added theissue type on Sep 19, 2026
  3. nwparker commented on Sep 19, 2026

    @nwparker
    Contributor

    I reviewed head 20630344f78aa9e0b116e7c03c8a4615b7bee74a and ran its actual parser against bounded samples of local Antigravity transcripts. I am not adopting this candidate as Antigravity usage accounting yet.

    P1: tool-result records become invented billable model events. In parseGeminiUsageRecord, source === 'MODEL' enables the character-count fallback for every model-sourced record, including RUN_COMMAND, VIEW_FILE, and other tool results. The following record has neither generated text nor usage metadata:

    {"source":"MODEL","type":"RUN_COMMAND","status":"DONE","created_at":"2026-09-19T10:00:00Z","exit_code":0}

    The candidate returns 50 input tokens, 5 output tokens, model gemini-2.5-pro, and $0.0001125. An inferred-pricing flag cannot make these token counts observed consumption. Actual bounded samples produced:

    Sample Records inspected Usage events emitted Events with inferred pricing Non-planner events charged
    A 500 450 450 208
    B 70 67 67 32
    C 109 107 107 53
    D 54 50 50 24
    E 57 54 54 27

    The five samples contain completed planner/tool activity, not only this machine's recent authentication failures. None of their inspected records exposes top-level token, model, or cost fields. I inspected schema/counts and kept all transcript text, account identifiers, and paths private.

    P1: unknown Antigravity models are billed as Gemini 2.5 Pro. Both record/document parsers choose this model when absent. Antigravity is a separate product and supports multiple model families; a transcript lacking a model does not establish Gemini usage or its billing rate. Combining both products under gemini also loses provider attribution requested in #21071.

    Suggested takeover boundary: reuse the established fixed-path Antigravity transcript/history scanner for session/message activity; keep unavailable token/cost/model values explicitly unavailable. Add measured usage only from an evidenced accounting source, with provider identity preserved. If character estimates are desired, expose them separately as text-size estimates and exclude them from measured usage/billing totals. The native /usage command supplies quota windows, not per-session token consumption, so it cannot fill this accounting gap.

    Relevant code: record parser, document parser. This is executable candidate evidence; no production accounting change or successful new agy generation is claimed.

  4. nwparker commented on Sep 20, 2026

    @nwparker
    Contributor

    ELI5: a transcript can tell us that agy did work, but it cannot tell us how many paid tokens that work used unless agy records the usage. Counting characters and pretending the result was Gemini billing would be an invented bill. The safe next step is session/activity discovery with token, cost, and model left unavailable until agy exposes an evidenced accounting source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions