Use Token Plan with Hermes Agent
Install Hermes Agent
Native installation is not supported on Windows. Install WSL2 first, and then run the command in the WSL2 environment.
Configure Token Plan
- Get your Token Plan API key.
-
Replace
YOUR_API_KEYwith your Token Plan API key:
~/.hermes/config.yaml. You can also edit it directly:
Example config.yaml
Example config.yaml
Switch models
Use the -m parameter during a conversation to switch between supported models:
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
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.
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: