analytics

A command that reports activity in an orq.ai workspace. It shows requests, spending, token use, errors, and the models handling the work over a chosen time period.

In plain words
What is it for?
Use it for workspace health checks and to break down trends by model, deployment, status, or agent.
Why use it?
It gives you a quick way to spot rising costs, failures, usage changes, or which models are being used most.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/orq-ai/assistant-plugins/analytics
Clone the repo
git clone --depth 1 https://github.com/orq-ai/assistant-plugins
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,230 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00021 $0.01230
Opus 5 $0.00010 $0.00615
Sonnet 5 $0.00004 $0.00246
Haiku 4.5 $0.00002 $0.00123

Measured 2d ago against content hash 72d70fa68399, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

analytics scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/analytics.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Analytics

Show workspace analytics from orq.ai — request volume, cost, token usage, error rates, and top models. Use this to get a quick health check or drill into usage trends.

Instructions

1. Parse arguments

Extract options from $ARGUMENTS. All are optional:

  • --last <duration> — time window: 1h, 6h, 24h, 7d, 30d (default: 24h)
  • --group-by <dimension> — drill-down dimension: model, deployment, status, agent (optional)

If $ARGUMENTS is empty, show the overview for the last 24 hours.

If the user provides plain text instead of flags (e.g., /orq:analytics cost by model last 7 days), interpret the intent and map to the appropriate options.

2. Fetch analytics data

Run these MCP calls in parallel:

  • Overview: Use get_analytics_overview to fetch the high-level summary (requests, cost, tokens, errors).
  • Drill-down (if --group-by provided): Use query_analytics with the specified dimension to fetch grouped breakdowns.

If no --group-by is specified, still call query_analytics grouped by model to show the top models breakdown — this is almost always useful context.

3. Display the overview

Present analytics using native markdown formatting — not inside a code block.

Overview format:

# Orq.ai Analytics — Last 24h

**12,450** requests · **$8.42** cost · **1.2M** tokens · **0.03%** error rate

View detailed analytics at **[Analytics → my.orq.ai](https://my.orq.ai/)**.

---

### Request Volume

- **Total:** 12,450 requests
- **Success:** 12,412 (99.97%)
- **Errors:** 38 (0.03%)
- **Avg latency:** 340ms
- **Avg TTFT:** 120ms

### Cost Breakdown

- **Total:** $8.42
- **Input tokens:** 890,000 ($3.12)
- **Output tokens:** 310,000 ($5.30)

### Top Models

| # | Model | Requests | Cost | Avg Latency |
|---|-------|----------|------|-------------|
| 1 | gpt-4.1 | 5,200 | $4.10 | 420ms |
| 2 | claude-sonnet-4-5 | 3,800 | $3.20 | 380ms |
| 3 | gpt-4.1-mini | 2,100 | $0.85 | 180ms |
| 4 | gemini-2.5-flash | 1,350 | $0.27 | 150ms |

Read the full file on GitHub · 110 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 110 lines · 21 tokens per session scan A 72d70fa68399

Subscribe to this mod's changes

analytics is a command published in the GitHub repository orq-ai/assistant-plugins (6 stars, last pushed 5d ago), licensed MIT. It adds 21 tokens to every session and 1,230 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.