|
Download README.md from xiao191/agent-usage: direct link, hf CLI and curl.
- Browser
- Download file 5.21 kB
-
https://huggingface.co/datasets/xiao191/agent-usage/resolve/main/README.md
- Command line
-
hf download hf://datasets/xiao191/agent-usage/README.md
-
curl -L -o README.md https://huggingface.co/datasets/xiao191/agent-usage/resolve/main/README.md
5.21 kB
| pretty_name: Agent Usage on the Hugging Face Hub | |
| tags: | |
| - analytics | |
| - agents | |
| configs: | |
| - config_name: monthly | |
| default: true | |
| data_files: data/monthly/*.parquet | |
| - config_name: daily | |
| data_files: data/daily/*.parquet | |
| # Agent Usage on the Hugging Face Hub | |
| **Coding agents are real users of the Hugging Face Hub.** Claude Code, Codex, Cursor, and a growing list of harnesses are searching for models, building and pushing datasets, training models on [Jobs](https://huggingface.co/docs/hub/jobs), spinning up Spaces — tens of millions of requests so far ([hf CLI for agents](https://huggingface.co/blog/hf-cli-for-agents)). Now there's public data on which ones. | |
| Requests made through the `huggingface_hub` library (including the `hf` CLI) carry an [`agent/<name>` User-Agent token](https://huggingface.co/docs/hub/agents-overview) identifying the harness. This dataset publishes **each harness's share of that agent-attributed traffic**, month by month and day by day, updated by a scheduled [HF Job](https://huggingface.co/docs/hub/jobs). | |
|  | |
| _Named harnesses ranked by share of requests, data through **2026-09** · updated 2026-10-05. The **Dataset Viewer** at the top of this page lets you browse, sort, and filter both tables — no code needed._ | |
| ## What you can see | |
| - **Who's calling the Hub** — the monthly leaderboard of named harnesses, and how it shifts as new tools launch and register. | |
| - **Usage styles** — compare request share with user share. An agent with 30% of requests but 8% of users is a small crowd running heavy automated pipelines; the reverse means many users, each doing a little. | |
| - **Day-by-day detail** — the `daily` config picks up what monthly numbers smooth over: launch spikes, growth curves, weekday-vs-weekend patterns. | |
| ## Get your harness on the board | |
| If you build a harness, register it to make sure your agent isn't missed — unregistered tools are counted only as `unknown`. | |
| Attribution is automatic: `huggingface_hub` detects registered harnesses from environment variables and reports them in the User-Agent. To register, follow [Register your agent harness](https://huggingface.co/docs/hub/agents-overview#register-your-agent-harness) — a Pull Request adding your tool to [`agent-harnesses.ts`](https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/src/agent-harnesses.ts). No release is needed on either side: installed clients refresh the registry within a day, and your harness appears from the next monthly snapshot. | |
| Only traffic through the Python `huggingface_hub` library (including the `hf` CLI) is attributed; direct HTTP calls to the Hub API are not counted. To confirm detection works, run inside your harness: | |
| ```bash | |
| python -c "from huggingface_hub.utils import build_hf_headers; print(build_hf_headers()['user-agent'])" | |
| # should contain agent/<your-id> | |
| ``` | |
| ## Columns | |
| | column | description | | |
| | --------------- | ------------------------------------------------------------------------------------------------------------ | | |
| | `month` / `day` | period the share is computed over | | |
| | `agent` | harness name from the `agent/<name>` token; `unknown` = token present but no registered name | | |
| | `pct_requests` | harness's share of agent-attributed `huggingface_hub` requests in the period (0–100; sums to 100 per period) | | |
| | `pct_users` | same, for distinct authenticated users — someone using two harnesses counts once for each | | |
| ## Loading programmatically | |
| ```python | |
| from datasets import load_dataset | |
| monthly = load_dataset("huggingface/agent-usage", "monthly", split="train") | |
| ``` | |
| ```sql | |
| -- DuckDB: full monthly history in one query | |
| SELECT month, agent, pct_requests | |
| FROM 'hf://datasets/huggingface/agent-usage/data/monthly/*.parquet' | |
| WHERE agent != 'unknown' | |
| ORDER BY month, pct_requests DESC; | |
| ``` | |
| ```python | |
| import polars as pl | |
| daily = pl.scan_parquet("hf://datasets/huggingface/agent-usage/data/daily/*.parquet") | |
| ``` | |
| New months append as new parquet files, so these queries always return the full history unchanged. | |
| ## Reading the data | |
| - **This measures Hub usage, not overall agent popularity.** A widely used tool that rarely touches the Hugging Face Hub will rank low here. | |
| - **Shares are zero-sum.** A falling share doesn't mean falling usage — total agent traffic is growing, so a harness can double its requests while its share shrinks. | |
| - **Start month-over-month comparisons from May 2026.** The `agent/` token rolled out April 3 and harnesses added detection at different times, so April reflects the rollout, not relative usage. | |
| - **Smooth daily shares** with a 7-day rolling mean — weekends and small denominators make single days noisy. | |
| - **Attribution is self-declared** (a User-Agent token set by the client library) and covers Python-library traffic only. | |
| _Built by [`build_local.py`](./build_local.py) (bundled in this repo) on a scheduled HF Job — only relative shares are published._ | |