# Chạy Hermes Agent trên AnyRouter

> Cài plugin AnyRouter chính thức cho Hermes Agent, thêm một key, và chọn từ các model gọi tool được, gồm meta-model anyrouter/hermes với fallback tự động.

- Date: November 9, 2026
- Category: guides
- HTML: https://anyrouter.dev/blog/vi/hermes-agent-anyrouter

## Bạn sắp dựng gì

[Hermes Agent](https://hermes-agent.nousresearch.com) là terminal coding agent của Nous Research. Plugin provider AnyRouter chính thức, được liệt kê trên [Hermes plugin marketplace](https://hermes-agent.nousresearch.com/marketplace/anyrouter), kết nối nó với mọi model AnyRouter chỉ bằng một key.

Picker `/model` chỉ liệt kê các route gọi được tool, đọc trực tiếp từ model catalog, nên vòng agent không gãy trên một model không dùng được tool. `anyrouter/hermes` là meta-model định tuyến của riêng AnyRouter, không phải model của Nous: mỗi request được gửi tới model tool-calling tốt nhất còn khả dụng và fallback tự động. Tính phí theo rate của model bên dưới.

## 1. Cài plugin

Từ terminal, cài plugin từ marketplace catalog:

```bash
hermes plugins install anyrouter
hermes plugins list
```

`hermes plugins list` sẽ thấy `anyrouter` đã bật. Thích bấm? [Listing trên marketplace](https://hermes-agent.nousresearch.com/marketplace/anyrouter) có nút Install in Hermes, và [mã nguồn plugin](https://github.com/AnyRouterHQ/hermes-provider-anyrouter) nằm trên GitHub.

## 2. Thêm key

Lấy key tại [anyrouter.dev](https://anyrouter.dev), bắt đầu `sk-ar-`. Thêm vào `~/.hermes/.env`:

```bash
ANYROUTER_API_KEY=sk-ar-your-anyrouter-key
```

Cùng key này cũng chạy được với endpoint tương thích OpenAI `https://anyrouter.dev/api/v1`, nên bạn có thể điều khiển Hermes từ bất kỳ client OpenAI nào khác.

## 3. Chọn model

Chọn tương tác bằng `hermes model` và chọn `anyrouter`, hoặc đặt theo từng lần chạy:

```bash
hermes --provider anyrouter -m anyrouter/hermes
```

| Model | Ghi chú |
| --- | --- |
| `anyrouter/hermes` | Model tool-calling mạnh nhất, fallback tự động. Mặc định cho agentic. |
| `anyrouter/auto` | Top platform model. Tool tùy chọn, không hợp vòng agent. |
| `anyrouter/latest` | Chat model stable mới nhất. |
| `moonshotai/kimi-k3` | Context 1M, agentic. |
| `deepseek/deepseek-v4-flash` | Nhanh, hỗ trợ reasoning. |

Picker đọc danh sách model trực tiếp, nên route tool-capable mới xuất hiện mà không cần cập nhật plugin. Đổi giữa phiên bằng `/model`, thao tác này reset prompt cache.

## 4. Kiểm tra chạy đúng

`hermes plugins list` thấy `anyrouter` bật, và tin nhắn `hermes chat` tiếp theo sẽ xuất hiện trong [request logs](https://anyrouter.dev/dashboard/logs). Nếu picker trống, key thiếu hoặc sai, kiểm tra lại `ANYROUTER_API_KEY` trong `~/.hermes/.env`.

## Tùy chọn thêm

Đặt trong `~/.hermes/.env`:

- `ANYROUTER_BASE_URL`, ghi đè `https://anyrouter.dev/api/v1` (proxy hoặc relay). Picker sẽ thôi lọc theo tool support.
- `ANYROUTER_APP_ATTRIBUTION=1`, ghi công traffic Hermes trong public app rankings. Tắt mặc định.
- Hermes chuyển block `provider_routing` thành `extra_body.provider`: `sort: price | throughput | latency`, kèm `only` / `ignore` / `data_collection: deny`. Xem [Provider Routing](https://anyrouter.dev/docs/guides/provider-routing).
- Xem [hướng dẫn Hermes Agent](https://anyrouter.dev/docs/guides/hermes-agent) cho phần setup MCP, troubleshooting và tham chiếu `provider_routing` đầy đủ.

Toàn bộ nội dung trang này, dạng checklist: trang use case Hermes Agent.

[Mở use case](https://anyrouter.dev/use-cases/hermes-agent)
