usage_read
Read usage, credits, and activity data for a workspace and per agent. Query credit balance, plan quotas, token consumption, and analytics over a defined time range.
Instructions
Read usage, credits and activity — everything the dashboard Usage and Analytics pages show — for the whole workspace and per agent. Read only. Time range: days back from now (default 30, max 400) or an explicit from / to (ISO date like 2026-10-01, or a full ISO datetime). overview: ONE call with credit balance, plan quota and limits, credits consumed in the range, tokens per model, the top agents (with names) and total activity (conversations, messages, calls, call minutes) — start here for "how is my usage". top_agents: agents ranked by credits consumed, with share of the total (topN up to 15). credits: current credit balance. quota: plan limits and current usage (conversations, messages, agents, KB…). workspace_usage: the Usage page — creditsCharged and creditsConsumed, input/output tokens per model, credits per agent with per-agent models, plus the chart list; add includeCharts for the chart data and includeLogs or logsPage for the credit usage log (what charged how much, and why). agent_usage (agentId): credits and tokens per model for one agent, plus call minutes. agent_analytics (agentId): that agent's analytics — loads, conversations, metrics, token usage, containment and human-handover stats. agents_analytics: activity totals for all agents (or agentIds), and per agent with includePerAgent (default true). clients_analytics: agency only — usage, leads and funnel per whitelabel client and per agent (clientIds to narrow). email_analytics (agentId): email channel analytics for one agent. WhatsApp and SMS analytics are in whatsapp_numbers_read / sms_numbers_read, voice calls in call_logs_read, knowledge-base quota in get_kb_quota.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Range end: ISO date (2026-10-31 = end of that UTC day) or datetime. Default now. | |
| days | No | Look back this many days from now (1-400, default 30). Ignored when from is set. | |
| from | No | Range start: ISO date (2026-10-01 = start of that UTC day) or datetime. | |
| mode | No | compact (default) = long text is cut and bulky blobs are replaced by a size marker. full = complete response. | |
| topN | No | For overview / top_agents: how many top agents to return (1-15; default 8 for overview, 15 for top_agents). | |
| action | Yes | ||
| agentId | No | For agent_usage / agent_analytics / email_analytics: the agent (list_agents or search_agents). | |
| agentIds | No | For agents_analytics: only these agents (max 500). Default all agents in the workspace. | |
| logsPage | No | For workspace_usage: usage log page number (implies includeLogs). | |
| clientIds | No | For clients_analytics: only these whitelabel clients (clients_read list). | |
| includeLogs | No | For workspace_usage: include the credit usage log (first page). | |
| includeCharts | No | For workspace_usage: include the chart data (credits over time, usage by feature / agent, tokens). | |
| includePerAgent | No | For agents_analytics: also return one row per agent (default true). |