Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/hub/agents-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,23 @@ Agent: [Fetches documentation]
result = classifier("I love this product!")
```

## Register your agent harness

Hugging Face maintains a public registry of agent harnesses, the coding agents and tools that interact with the Hub (Claude Code, Codex, Cursor, and more). When `huggingface_hub` detects it is running inside a registered harness, it reports it via the user agent on Hub requests. Registering your harness means this activity is attributed to your tool by name and gives your project a friendly display label, links back to your docs and repository, and a place in upcoming agent leaderboards.

To register a harness, open a Pull Request adding an entry to [`agent-harnesses.ts`](https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/src/agent-harnesses.ts) in the `@huggingface/tasks` package:

- the harness id (the entry key) should be lowercased and hyphen-separated (example: `"claude-code"`).
- set `prettyLabel` with user-friendly casing (example: `Claude Code`).
- (optional) set `repoUrl` with a link to the harness source code (usually a GitHub repository).
- (optional) set `docsUrl` with a link to the harness documentation or website.
- (optional) set `description` with a short, one-line explanation of the harness.
- define how your harness is detected from the environment:
- If your harness sets one of the standard environment variables (`AI_AGENT` or `AGENT`), its value is used directly as the identifier and no extra config is needed.
- Otherwise, set `envVars` to map environment variable names to value patterns. Use `"*"` to match any non-empty value, an exact string for an exact match, or `"<prefix>*"` for prefix matching.

And that's it! Once the PR is merged, we will start tracking usage of the `hf` CLI by your agent harness.

## Next Steps

- [CLI](./agents-cli) - Command-line interface for Hub operations
Expand Down
Loading