Preconditions
Problem Statement
Currently, there is no unified way to manage or inspect usage, quotas, plans, or session data at the tool or profile level. This makes it difficult for users to:
- Track resource consumption across different tools or profiles
- Enforce limits or understand quota exhaustion
- Debug usage patterns or optimize cost
- Retrieve past sessions for reproducibility or auditing
As usage scales across multiple tools and credentials, the lack of visibility and control leads to operational inefficiency and poor user experience.
Proposed Solution
Introduce per-tool and per-profile management capabilities for plans, quotas, usage tracking, and session data.
Supported features:
- Plan configuration (e.g., limits, tiers)
- Quota management (e.g., requests, tokens, runtime)
- Reset windows (e.g., daily, monthly quota resets)
Commands:
- /usage for current consumption
- /stats for historical metrics
- /models for available models per tool/profile
Stored session retrieval for past runs
Alternatives Considered
Global usage tracking only: Simpler but lacks granularity and becomes unusable at scale.
External monitoring tools (e.g., Prometheus/Grafana): Powerful but requires additional setup and lacks tight CLI integration.
Per-tool only (no profile granularity): Insufficient for multi-credential workflows.
UX/DX Details
- Intuitive CLI commands aligned with existing workflows:
aisw usage <tool> <profile>
- Human-readable and optionally machine-parsable outputs (e.g., JSON flag).
- Clear visualization of quota usage vs limits.
- Ability to filter by time range or execution context.
- Session retrieval:
- List and resume past sessions
- Inspect inputs, outputs, and metadata
- Sensible defaults when tool/profile is omitted (e.g., current context).
Acceptance Criteria
- Users can query usage, stats, models, and session history per tool and profile.
- Quotas and plans are enforced correctly with defined reset windows.
- Usage data is accurate and updated in near real-time.
- Stored sessions can be retrieved and inspected without data loss.
- CLI commands are consistent, discoverable, and performant.
- No regression in existing workflows when these features are not used.
Impact Area
Additional Context
No response
Preconditions
Problem Statement
Currently, there is no unified way to manage or inspect usage, quotas, plans, or session data at the tool or profile level. This makes it difficult for users to:
As usage scales across multiple tools and credentials, the lack of visibility and control leads to operational inefficiency and poor user experience.
Proposed Solution
Introduce per-tool and per-profile management capabilities for plans, quotas, usage tracking, and session data.
Supported features:
Commands:
Stored session retrieval for past runs
Alternatives Considered
Global usage tracking only: Simpler but lacks granularity and becomes unusable at scale.
External monitoring tools (e.g., Prometheus/Grafana): Powerful but requires additional setup and lacks tight CLI integration.
Per-tool only (no profile granularity): Insufficient for multi-credential workflows.
UX/DX Details
aisw usage <tool> <profile>Acceptance Criteria
Impact Area
Additional Context
No response