Beta

API reference

Public stats

GET /v1/stats — the counters your workspace chose to publish, for your own website or dashboard.

Public stats let you show a few numbers about your team's agents elsewhere — "3 agents working right now", say, on your website. Nothing is public until an owner ticks a counter. Scope: public:read.

#Choose what to publish

On Keys & connections, open Public stats (owners only; the sections there start closed), tick the counters to publish and create a public stats key. Changing which counters are public, like creating the key, needs a sign-in from the last 7 days — sign out and in again if yours is older. A public stats key can read only the ticked counters. It can't read agents, prompts or approvals, and it can't report or answer anything.

Keep the key on your server and fetch the numbers from there — the API doesn't allow calls from web pages, and anyone with the key can read your counters.

#GET /v1/stats

Read the published counters
curl "$AGENTOWER_URL/v1/stats" -H "authorization: Bearer $AGENTOWER_PUBLIC_KEY"
Response · 200
{
  "counters": {
    "workingNow": 3,
    "agentsNow": { "needs_you": 1, "failed": 0, "working": 3, "idle": 2, "starting": 0, "total": 6, "helpersWorking": 2 },
    "sessionsThisMonth": 30,
    "agentHoursThisMonth": 92.4,
    "projects": { "building": 7, "live": 2, "shelved": 1 }
  },
  "updatedAt": "2026-09-30T09:00:00.000Z"
}

Only ticked counters appear in counters. Answers are cached for 60 seconds (cache-control: private, max-age=60 — private because the answer depends on your key, so a shared proxy shouldn't keep it). At most 60 requests a minute per key (then 429 with retry-after: 60); public stats are free (not counted as API calls).

#The counters

Counts are of main agents; subagents are folded into their parent unless a counter says otherwise (workingNowWithHelpers, helpersThisMonth, agentsAllTime, and the helpers fields in agentsNow and perProject count them). "This month" is the calendar month in UTC.

CounterValue
workingNowAgents working right now (number)
workingNowWithHelpersWorking right now with helpers (subagents) counted too: { "total", "agents", "helpers" }, e.g. 2 agents and 1 helper at work give total: 3
agentsNowOpen agents right now by state: needs_you, failed, working, idle, starting, total (agents), plus helpersWorking: helpers at work inside them
agentsNowByModelOpen agents right now per model: [{ "model": "Opus 5.5", "agents": 4 }]
sessionsThisMonthAgent sessions started this month
agentHoursThisMonthHours of agent activity this month, one decimal
tokensThisMonthTokens used this month (UTC days, including subagents), whenever their session started
helpersThisMonthHelpers (subagents) started this month and their active hours: { "helpers": 64, "helperHours": 18.2 }
byModelThisMonthPer model this month: [{ "model", "agents", "agentHours", "tokens" }] — see below
sessionsAllTimeAgent sessions, all time
agentHoursAllTimeHours of agent activity, all time
agentsAllTimeAgents and subagents run, all time: { "agents", "subagents" }
byModelAllTimePer model, all time: [{ "model", "agents", "agentHours", "tokens" }]
projectsProjects per lane: { "building", "live", "shelved" }
perProjectSessions and hours per project: [{ "name", "lane", "sessions", "agentHours", "helpers", "helperHours" }] (sessions and hours are main agents; helpers counted separately). This one publishes your project names

Hours of activity run from a session's start to its last signal.

In byModelThisMonth and byModelAllTime, agents and agentHours count each agent under its main model, while tokens count under the model that served each request (from Claude Code's telemetry): a subagent on Haiku inside an Opus session adds its tokens to Haiku. A model can therefore show tokens with agents: 0. Tokens used before 2 October 2026 count under the agent's main model.