Skip to main content
Use in AI Tools

Hermes Agent

Use Token Plan with Hermes Agent

Install Hermes Agent

curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
Native installation is not supported on Windows. Install WSL2 first, and then run the command in the WSL2 environment.
Reload your shell environment and verify:
source ~/.bashrc    # If you use zsh, change to source ~/.zshrc
hermes --version

Configure Token Plan

  1. Get your Token Plan API key.
  2. Replace YOUR_API_KEY with your Token Plan API key:
hermes config set model.provider custom
hermes config set model.base_url https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1
hermes config set model.api_key YOUR_API_KEY
hermes config set model.default qwen3.6-plus
This writes to ~/.hermes/config.yaml. You can also edit it directly:
model:
  default: qwen3.6-plus
  provider: custom
  base_url: https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1
  api_key: YOUR_API_KEY

Switch models

Use the -m parameter during a conversation to switch between supported models:
hermes chat -m qwen3.6-plus
You can also modify the default model:
hermes config set model.default qwen3.6-plus
Hermes Agent only supports text generation models, such as qwen3.6-plus, glm-5, MiniMax-M2.5, and deepseek-v3.2. Image generation models use a separate API and must be integrated through extension mechanisms. See Integrate multimodal generation models.

Verify the configuration

hermes chat -q "Hello"
To enter interactive chat mode:
hermes

Error codes

See Frequently asked questions.

FAQ

API key authentication failed (HTTP 401)

Ensure the following:
  • You are using the API key for Token Plan. The API keys for Token Plan, Coding Plan, and the pay-as-you-go service of Qwen Cloud are not interchangeable.
  • You are using the dedicated base URL for Token Plan (https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1).
  • Your Token Plan subscription has not expired.
You can run this command to view your current configuration:
cat ~/.hermes/config.yaml

Model not supported

Token Plan uses exclusive model names, such as qwen3.6-plus. Ensure that the model name is spelled correctly. For a list of models, see Token Plan Overview.

Still connecting to OpenRouter after configuration

By default, Hermes Agent uses OpenRouter as the inference provider. When you connect to Token Plan, model.provider must be set to custom. Run the following command to confirm:
hermes config set model.provider custom
For more frequently asked questions, see Frequently asked questions.