Skip to content

[feature] Per-Tool and Per-Profile Usage & Plan Management #13

Description

@minhoryang

Preconditions

  • I searched existing issues and this request is not a duplicate.
  • This request focuses on user value, not just implementation details.

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

  • CLI command surface
  • Auth/profile management
  • Shell integration
  • Output format/JSON contract
  • Documentation

Additional Context

No response

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