docs/tools/HOWTO-CHECKUSAGE.md
Standard: DSOM For My AI Protocol v6.1 | GitOps · AIOps · Ansible
Tool: tools/CheckUsage.ps1 | Version: v8.6 | Platform: Windows PowerShell (T1)
1. Purpose
CheckUsage.ps1 is the Sovereign Session Monitor for the Antigravity AI assistant. It reads the .pb conversation context files stored locally by Antigravity and displays real-time health metrics for each session, size, estimated token usage, growth velocity, age, and status.
Use it to:
- Know when your current session is approaching the context limit
- Identify dormant old sessions consuming disk space
- Detect burst rate spikes that may trigger API rate limits (RPM)
- Keep a live health dashboard open in a side terminal during active work
tools/CheckUsage.ps1
Monitors: C:\Users\[you]\.gemini\antigravity\conversations\*.pb
2. Prerequisites
3. First-Time Setup (Run Once)
Open PowerShell and run:4. Usage
4.1 Run Once (Snapshot)
4.2 Live Monitor (Loop Mode)
4.3 Full Syntax
4.4 Examples
5. Reading the Output
5.1 Column Reference
5.2 Status Labels
5.3 Summary Footer
- Total MB, total disk used by all
.pbfiles - Est Tokens, aggregate estimated token count across all sessions
- WARN / CRIT, count of sessions in warning or critical state
6. Token Estimation Methodology
The tool estimates tokens using:[WRN] and [CRT] thresholds relative to your observed model behaviour.
7. Troubleshooting
Script will not run, Execution Policy error
Unknown parameter error
.\tools\CheckUsage.ps1 -Help to see all valid options.
No .pb files found
C:\Users\[you]\.gemini\antigravity\conversations\
Loop mode exits immediately
Ensure you are using-Loop (not -Loops or -loop). The -l short alias also works.
8. Integration with DSOM SOD Ritual
As part of the Start-of-Day Ritual (docs/SOD-RITUAL.md Step 1), run the snapshot to verify the current session health before starting work:
CriticalMB, begin a new Antigravity conversation and use the SOD Reanimation Prompt to restore context.
9. Related Documents
Standard: DSOM For My AI Protocol v6.1 | Harisfazillah Jamel | LinuxMalaysia Tool Version: v8.6 | Document Version: v1.0 | Created: 2026-03-10
Deep State of Mind (DSOM) For My AI Protocol | Harisfazillah Jamel (LinuxMalaysia) | 2026-07-04 Standard: UK English | DBP-standard Bahasa Melayu Malaysia (Piawai) | GNU General Public License v3.0