Hermes Agent

How-To Guide

Configure z.ai/GLM as Your Hermes Provider

Configure Hermes Agent to use ZhipuAI's GLM models via z.ai — powerful Chinese language models.

Quick answer

Configure z.ai/GLM (ZhipuAI) for strong reasoning and coding — GLM-4-Plus and GLM-5 are among the more capable models in their class. Add your z.ai/GLM API key in config and pick the model; the community runs GLM as a primary model and via coding plans for predictable cost.

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. 1

    Get your API key

    Sign up at z.ai or open.bigmodel.cn and get your API key

  2. 2

    Add to .env

    Add GLM_API_KEY=your_key to ~/.hermes/.env

  3. 3

    Set the provider

    In config.yaml, set model: provider: zai

  4. 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.

FAQ

What are GLM models good for?

Reasoning and coding. GLM-4-Plus and GLM-5 from ZhipuAI are among the most capable models in their class, used as primary models in Hermes.

How do I set up GLM in Hermes?

Configure the z.ai/GLM provider with your API key and select GLM-4-Plus or GLM-5. Some users buy a coding plan for predictable monthly cost.

Direct or via an aggregator for GLM?

Direct usually gives better latency. Aggregators add reach but can be slower; pick based on whether you value speed or single-account convenience.

Related Guides