cost-analytics

Tracks token usage and API costs across all providers: records and aggregates token/call usage and associated cost data for each vendor.

Last repository push
GitHub Stars
229
Forks
69
Issues / PRs
0

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "cost-analytics" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-b1c9927b4ab63fc9e779493d5b4c2af7c7d0e10dd89e6b6b395005b468bca927. Verify the upstream source and version against https://github.com/modimihir07/agentic-os before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Tracks token usage and API costs across all providers: records and aggregates token/call usage and associated cost data for each vendor.

0 Downloads

Introduction source: third_party · modimihir07 · 1.0.0 Reference

SkillPi interpretation

Tasks
Tracks token usage and API costs across all providers
Audience
After each agent API call (auto-triggered) Daily cost report generation When checking budget status
Inputs and outputs
Cost report with: per-agent breakdown, projections, alerts, recommendations
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: cost-analytics
description: Tracks token usage and API costs across all providers
version: 1.0.0
author: Agentic OS
tags: [cost, analytics, tracking, budget]

Cost Analytics

Description

Tracks token consumption and API costs across opencode, Hermes, and Gemini CLI. Computes daily/weekly/monthly projections and alerts when approaching free-tier limits.

When to Use

  • After each agent API call (auto-triggered)
  • Daily cost report generation
  • When checking budget status

Process

  1. Read latest cost-history.json
  2. Compute today's total tokens by agent
  3. Compute weekly and monthly projections
  4. Compare against free-tier limits from settings.json
  5. Generate alert if approaching limits (80%, 90%, 95%)
  6. Update cost-analytics chart data

Output

Cost report with: per-agent breakdown, projections, alerts, recommendations

Agent Assignment

  • Primary: opencode

Version history

  1. v1.0 GitHub ↗
    Original release notes

    ## Agentic OS v1.0 — Initial Release Agentic OS is an autonomous, self-improving multi-agent work operating system coordinating **opencode**, **Hermes Agent**, and **agy**. ### Highlights - **3-Agent Execution Engine**: opencode (code/DevOps), Hermes (memory/scheduling/channels), and agy (research/analysis) - **7-Layer Architecture**: Identity, Self-Evolution, Scheduler & Awareness, Memory Graph, Skills Hub & Eval, Business Brain, and Agent Router - **Skills Hub**: 15 modular, self-improving skills with learnings, evaluation scoring, and context memory - **Persistent Memory Layer**: Shared business brain, context memory, and decision logs - **Interactive Web Dashboard**: Glassmorphism SPA built with FastAPI and Tailwind with real-time health, cost analytics, and one-click skill execution - **Automated Scheduling & Heartbeat**: Periodic awareness and health checks - **Disaster Recovery & Git Auto-Versioning**: One-click system snapshots and rollback support

  2. v4.0 GitHub ↗
    Original release notes

    ## Agentic OS v4.0 ### Major Changes - **agy (Antigravity) replaces Gemini CLI** across backend, routing, frontend, skills, agents/, and docs - **Port auto-kill** in start.sh for clean restarts - **APScheduler auto-install** in scheduler.py ### New Features - Chat History Search with query, agent, and limit filters - Chat File Attachments (multipart upload, 2MB allowlist, 24h TTL) - Memory Knowledge Graph with Canvas renderer - Code Diff Viewer integrated into Skills page ### Testing - 74 tests (up from 59), including 15 new isolated v4.0 feature tests ### Bug Fixes - Cache and layout fixes across dashboard - Stale pip references updated for uv

  3. v3.0 GitHub ↗
    Original release notes

    ## Agentic OS v3.0 ### New Features - Event-Driven Scheduler with webhook triggers - Error Dashboard for tracking and diagnosing issues - Persistent Memory Search via SQLite FTS5 - Auto-Skill Generator for creating skills from templates - Webhooks integration for external service triggers - Mobile PWA support for on-the-go access - Circuit Breaker pattern for resilient agent communication ### Security - Path traversal prevention - XSS sanitization - Information disclosure fixes - Security headers hardening

  4. v2.0 GitHub ↗
    Original release notes

    ## Agentic OS v2.0 ### New Features - Kanban Board with drag-and-drop task management - Goals tracker with progress visualization - Journal with daily markdown entries - Agent Health monitoring dashboard - Smart Router for intelligent task delegation - Learning Analytics with skill performance trends - Session Replay for reviewing past interactions ### UI Modernization - 58 API endpoints (28 original + 30 new) - 7 new dashboard pages - Refreshed design with modern components

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value75/100

Highlights

  • 提供跨提供商的令牌使用和 API 成本跟踪功能
  • 支持每日/每周/每月预测和预算警报
  • 适用于需要监控预算和成本的用户场景
Trigger Precision80/100

Areas to improve

  • 触发词覆盖不全 Reported severity: Minor

    触发词未覆盖所有可能的成本相关查询场景

    Recommendation: 建议增加更多成本相关的触发词,如 'expense', 'spending', 'usage' 等

Highlights

  • description 明确描述了核心功能
  • tags 包含相关关键词
Structure and Standards75/100

Areas to improve

  • 缺少端到端示例 Reported severity: Minor

    文档中缺少具体的执行示例

    Recommendation: 建议添加一个完整的成本分析执行示例,展示输入和输出格式

  • 文档结构可优化 Reported severity: Minor

    Process 步骤可以更详细地描述每个步骤的具体操作

    Recommendation: 建议为每个步骤添加更详细的说明和预期行为

Highlights

  • 包含清晰的 Process 步骤划分
  • 有明确的 When to Use 场景描述
  • Output 部分描述了预期的输出内容
Execution Reliability60/100

Areas to improve

  • 工具来源不明 Reported severity: Major

    未明确说明 cost-history.json 和 settings.json 的来源和格式

    Recommendation: 建议明确说明这些配置文件的来源、格式要求和默认位置

  • 异常处理缺失 Reported severity: Major

    未提及文件读取失败、数据格式错误等异常情况的处理机制

    Recommendation: 建议添加异常处理逻辑,如文件不存在时的默认行为、数据验证等

Highlights

  • 提到了与设置文件的集成
  • 有明确的输出格式描述
Evidence Verifiability (mean of the first four)73/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.