agent-zero icon indicating copy to clipboard operation
agent-zero copied to clipboard

Feature request: expose an authenticated A0T usage/quota endpoint

Open nico7master opened this issue 3 weeks ago • 1 comments

Feature request: expose an authenticated A0T usage/quota endpoint

Summary

A0T stakers currently have no official way to read their own real-time quota data (used today, remaining balance, live quota multiplier). The only public source of these numbers was a third-party dashboard (a0dash), which has lost access to its privileged server credential and is dying — its user endpoint returns 404 and its global endpoint fails intermittently. Wallet signatures grant access to stakes only; usage and multiplier data exist in the backend (the dashboard displayed them) but are served by no endpoint. User impact: stakers cannot verify their real remaining quota or daily usage anywhere; self-built dashboards cannot compute wallet-wide usage.

Reproduction

  1. Sign in at the web3 portal with a staked wallet (SIWE signature).
  2. Enumerate the API surface of the official portal app bundle: it contains exactly 7 endpoints — /login-nonce, /login, /login-check, /get-stakes, /logout, /login-sessions, /validate-stake-transaction.
  3. Probe for usage/quota/multiplier/global-stats paths on the session API: all return 404.
  4. Make a successful A0T gateway call and inspect response headers: only platform-wide rate-limit headers and the global pool balance (x-venice-balance-diem) are present — no personal remaining, usage, or multiplier.
  5. Result: no official source serves personal used-today, remaining, or the live quota multiplier.

Root cause

The quota accounting (per-wallet daily usage, remaining balance, the usage-driven multiplier) lives in the backend database, but the session API exposes only stakes. A privileged server-side credential was issued to one third-party dashboard instead of being exposed through the authenticated session API. When that credential was revoked, every consumer lost access — there is no first-party path to the data at all.

Proposed fix

Expose the existing backend data through the already-authenticated session API, e.g.:

  • Minimal: GET /usage on the session API returning { used_today, remaining, multiplier } for the authenticated wallet.
  • Or a public read-only /api/global style endpoint (global stake, total pool, current multiplier) plus the per-wallet /usage above.

Conservative alternative: even a low-frequency (1-minute cached) read-only endpoint would resolve this without exposing anything sensitive — the data is per-wallet and requires the existing SIWE session.

Before/after

Scenario Before After
Staker checks real remaining quota Impossible (only exhausted/not via gateway errors) Authenticated endpoint returns exact value
Wallet-wide used today Third-party dashboard only; now dead /usage on own session
Live multiplier Dying third-party feed Official endpoint
Self-built dashboards No data source Public global stats

Environment

  • A0T quota system (web3.agent-zero.ai / tapi.agent-zero.ai), observed 2026-10-30 → 11-01
  • Verified via signed SIWE sessions, portal bundle analysis (1.37 MB main.js, full endpoint enumeration), and gateway response header capture across a UTC quota reset

nico7master avatar Nov 07 '26 15:11 nico7master

Absolutely! +1

sumer-man avatar Nov 14 '26 14:11 sumer-man