Configure z.ai/GLM as Your Hermes Provider
Configure Hermes Agent to use ZhipuAI's GLM models via z.ai — powerful Chinese language models.
ZhipuAI's GLM models are among the most capable Chinese language models. GLM-4-Plus and GLM-5 offer excellent reasoning and coding capabilities.
Deploy Hermes faster with FlyHermes
Managed cloud · API costs included · Skill library · Cancel anytime
Before you start:
- ☑Hermes Agent installed
- ☑z.ai or ZhipuAI account and API key
Steps
- 1
Get your API key
Sign up at z.ai or open.bigmodel.cn and get your API key
- 2
Add to .env
Add GLM_API_KEY=your_key to ~/.hermes/.env
- 3
Set the provider
In config.yaml, set model: provider: zai
- 4
Choose a model
Set model: default: glm-4-plus or glm-5
Pro Tips
- 💡GLM models have strong bilingual capabilities (Chinese/English)
- 💡Use GLM-4-Plus for balanced performance, GLM-5 for maximum capability
- 💡Endpoint auto-detection probes and caches the correct URL
Troubleshooting
❌ Endpoint auto-detection failing
✅ Set GLM_BASE_URL explicitly: https://api.z.ai/api/paas/v4
❌ Rate limited
✅ z.ai has usage limits. Check your account quota at z.ai dashboard.