---
title: "Agent Stats"
method: GET
path: "/manage/agent-stats"
tags: ["manage", "manage"]
---

# Agent Stats

`GET /manage/agent-stats`

## Request

- Base URL: `https://api.agent4.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.agent4.io/manage/agent-stats`
- Auth: none declared

每个 agent 被用了多少：会话数、不同的人数、最后一次有人跟它说话是什么时候。

`/usage?group=agent` 回答的是"花了多少 token"，那是成本；这里回答的是"有多少人在用"，
那是价值。两个数字都拿得到才谈得上判断一个 agent 值不值得留着。

**纯计数，不碰内容。** 会话标题和正文都是加密的，这里一个都没读——只数行、数不同的
user_id、取最大时间戳。所以 privacy_mode 的租户同样能看到（那个开关挡的是读取内容，
不是知道自己有没有被用）。

## Response `200`

Successful Response

- AgentStatsOut
  - `rows` AgentStatRow[], required
    - `agent` string, required
    - `conversations` integer, required
    - `people` integer, required
    - `last_active` string, nullable

---

[API](https://skmtc.dev/agent4/apis/chatagent-platform.md) · [All operations](https://skmtc.dev/agent4/apis/chatagent-platform/llms.txt) · [OpenAPI document](https://skmtc.dev/agent4/apis/chatagent-platform/revisions/18e58f082ce3?raw)
