Repository navigation
Home
Dhanush edited this page Oct 23, 2026
·
2 revisions
agentstat is a Rust library for reading provider-reported AI account usage, quota windows, balances, spend, and reset times through one async API. Your application decides when to fetch and how to display or store the result.
Version guide:
0.1.0is the published crate. The repository'smainbranch contains newer adapters and behavior, including OpenCode Go. Use a path dependency to try those changes before the next release. A provider marked planned in the catalog has no working fetch adapter even if its Cargo feature exists.
| Goal | Page |
|---|---|
| Add agentstat to a Rust project | Installation |
| Fetch your first usage snapshot | Quick Start |
| Choose credentials and account scope | Credentials and Accounts |
| Use OpenCode Go or Zen | OpenCode Go and Zen |
| Understand quotas, balances, and errors | Reading Results |
| Find the main Rust types | API Reference |
| See supported and planned providers | Provider Coverage |
| Fix a failed fetch or report a problem | Troubleshooting |
| Report a bug or request a provider | Issues and Support |
| Contribute an adapter or live account check | Contributing and Development |
| See the project backlog and boundaries | Roadmap |
| Find version and release information | Releases and Compatibility |
- Fetches only when your code calls
Client::fetchorClient::fetch_many. - Returns typed
windows,balances,spend, andwarningsin aUsageSnapshot. - Keeps missing values missing and monetary amounts as exact decimals.
- Accepts caller-supplied credentials; local credential files and CLI probes require explicit opt-in.
- Uses read-only usage and reporting operations. It does not log in, refresh credentials, generate completions to test access, or poll in the background.
The README and Rust API docs are useful alongside this wiki. Implementation details and the latest provider coverage live in the source repository.
Repository · Rust API docs · Issues · Releases · Security