agent-usage
收藏资源简介:
该数据集追踪通过HuggingFace Hub官方Python库(包括huggingface_hub库和hf CLI)访问Hub的各类AI智能体工具的使用情况。当智能体工具(例如Claude Code、Codex、Cursor等)在User-Agent中通过注册机制声明agent/<name>标识后,其向Hub发起的请求会被统计并汇总。数据集以月度(monthly)和日度(daily)两种粒度发布,记录了每个已注册智能体在对应时间段内的请求份额(pct_requests)和用户份额(pct_users),其中unknown类别表示检测到agent令牌但未注册名称的请求。数据可用于分析智能体生态的发展趋势、比较不同工具的使用强度(通过请求份额与用户份额的差异)、观察日度波动模式(如工作日与周末的差异、新工具发布后的增长曲线)等。需要注意的是,该数据仅反映通过Python库访问Hub的流量,不包含直接HTTP API调用;份额计算为零和游戏,且建议从2026年5月开始进行有意义的月度比较,以避免早期检测机制逐步推广带来的偏差。
This dataset tracks the usage of various AI Agent tools accessing the HuggingFace Hub via its official Python libraries, including the `huggingface_hub` library and the `hf` CLI. When AI Agent tools (e.g., Claude Code, Codex, Cursor, etc.) declare the `agent/<name>` identifier via the registration mechanism in their User-Agent strings, their requests sent to the Hub will be counted and aggregated. The dataset is released at two granularities: monthly and daily. It records the request share (`pct_requests`) and user share (`pct_users`) of each registered AI Agent during the corresponding time period. The `unknown` category refers to requests where an agent token is detected but no registered name is found. This data can be used to analyze the development trends of the AI Agent ecosystem, compare the usage intensity of different tools via the discrepancy between request share and user share, and observe daily fluctuation patterns such as differences between weekdays and weekends, growth curves following the release of new tools, among other analytical scenarios. It should be noted that this data only reflects traffic accessing the Hub via Python libraries, and does not include direct HTTP API calls; share calculations follow a zero-sum framework. It is recommended to conduct meaningful monthly comparisons starting from May 2026 to avoid biases introduced by the gradual rollout of early detection mechanisms.
数据集概述:Hugging Face Hub 上 Agent 使用情况
该数据集记录了通过 huggingface_hub 库(包括 hf CLI)发起的、带有 agent/<名称> 用户代理标识的请求在各个工具(harness)之间的流量分布情况。数据按月(monthly)和按日(daily)更新,由定期的 HF Job 生成。
数据内容与结构
- 主要关注点:展示了不同编码代理(如 Claude Code、Codex、Cursor 等)在 Hugging Face Hub 上的请求份额和用户份额。
- 数据配置:
monthly:默认配置,提供每月的数据汇总(Parquet 文件位于data/monthly/*.parquet)。daily:按日计的数据配置,可捕捉月度数据平滑掉的细节,如发布峰值、增长曲线和周末模式(Parquet 文件位于data/daily/*.parquet)。
- 数据列:
month/day:指标计算的时间周期。agent:工具名称(从agent/<名称>令牌中提取);unknown表示令牌存在但未注册。pct_requests:该工具在周期内发起的、带有代理标识的huggingface_hub请求的百分比(0-100,每周期总和为 100)。pct_users:同上,但针对不同的已验证用户。同一用户使用两个不同工具时,会被分别计数。
如何使用
- 浏览与过滤:通过页面顶部的“数据集查看器”可直接浏览、排序和过滤表格。
- 程序加载:
- Python:
from datasets import load_dataset,使用load_dataset("huggingface/agent-usage", "monthly", split="train")。 - DuckDB:
SELECT ... FROM hf://datasets/huggingface/agent-usage/data/monthly/*.parquet ... - Polars:
pl.scan_parquet("hf://datasets/huggingface/agent-usage/data/daily/*.parquet")
- Python:
- 数据更新:新月份的数据会以新的 Parquet 文件追加,因此查询始终返回完整的未更改历史记录。
关键注意事项
- 衡量范围:该数据集衡量的是 Hugging Face Hub 的使用情况,而非 Agent 的整体流行度。一款很少与 Hub 交互的工具其排名会较低。
- 份额变化解读:份额是零和的。份额下降不代表使用量下降,总流量在增长时,某工具请求量翻倍但份额仍可能缩小。
- 有效分析起点:建议从 2026 年 5 月开始进行月度比较,因为
agent/令牌于 2026 年 4 月 3 日推出,4 月数据反映了推出过程而非相对使用情况。 - 日数据平滑:建议对每日份额进行 7 日滚动平均处理,以消除周末和小样本量带来的噪音。
- 数据来源:归属是自行声明的(由客户端库设置的用户代理令牌),且仅涵盖 Python 库的流量。直接向 Hub API 发起的 HTTP 调用不被统计。
- 工具注册:如果构建的工具未在
agent-harnesses.ts中注册,其请求将被归类为unknown。可通过提交 Pull Request 完成注册。




