How to Use GLM-5 in OpenClaw (Clawdbolt): Build a Telegram AI Agent in Minutes

Use GLM-5 in OpenClaw

OpenClaw helps you connect an AI agent to the chat apps you already use (Telegram/Discord/WhatsApp/iMessage, etc.) via a gateway process that routes conversations to your chosen model provider.

In this tutorial, you’ll run GLM-5 inside OpenClaw using Novita AI’s API—so you can spin up a working Telegram-style demo quickly, then scale usage without changing your integration surface.

If you don’t have one yet, create your Novita API key in the Novita console, and open the GLM-5 model page to confirm the model ID (zai-org/glm-5) and endpoint format.

What is OpenClaw

OpenClaw is an open-source AI agent framework that enables developers to quickly connect large language models (LLMs) to real-world communication channels such as Telegram. Rather than being a model itself, OpenClaw acts as an orchestration layer that routes user messages to a selected LLM, manages configuration, and handles deployment through a simple CLI workflow. By removing the need to build backend infrastructure from scratch, it allows developers to turn powerful models into production-ready AI agents within minutes.

Why Choose GLM-5 for OpenClaw

OpenClaw works best with a model that can finish multi-step tasks, write real integration code, and use tools reliably inside long chat sessions. GLM-5 is built for Agentic Engineering—and its benchmark record reflects that.

  • Proven coding strength on industry-standard evaluations
    GLM-5 reports open-source state-of-the-art results on widely used software-engineering and terminal-based coding benchmarks, aligning well with OpenClaw setups where the agent often edits configs, debugs issues, or generates “glue code” for tools.
  • Strong agent/tool performance in multi-step benchmarks
    It also leads open-source rankings on agent-oriented evaluations that emphasize tool calling, planning, and execution across multiple steps—exactly the failure mode you want to avoid when routing real conversations through an agent gateway.
  • Long-session reliability
    GLM-5’s long-horizon capability is supported by benchmark claims measuring long-term operational performance, which maps directly to chat-app agents that must stay on-task over extended threads and intermittent user replies.

On Novita AI, GLM-5 is offered with straightforward usage-based pricing: $1 per 1M input tokens and $3.2 per 1M output tokens. If you enable context caching, cache read is $0.2 per 1M tokens, which can reduce costs for repeated prompts and long-running agent sessions.

How to install OpenClaw

Hardware / environment checklist

Before you start, prepare:

  • Node.js 22+
  • A machine that can access the internet (Windows users often use WSL2)
  • Deployment choice: OpenClaw can run on a local machine or on a cloud VM/container, depending on how you want to expose the gateway and manage ops.

Install OpenClaw

Follow the same install pattern as the reference guide:

  • macOS / Linux / WSL2
curl -fsSL https://openclaw.ai/install.sh | bash
  • Windows (PowerShell)
iwr -useb https://openclaw.ai/install.ps1 | iex

Use GLM-5 in OpenClaw

Step 1: Get your Novita API key

In Novita, create an API key (it’s typically shown once—store it immediately). The reference flow is:

  1. Visit https://novita.ai, Create/login to your Novita account
  2. Go to API Keys
  3. Click Add new key
  4. Copy and save it right away

Step 2: Run the OpenClaw configuration

Start the configuration flow:

openclaw config

1. Workspace

Where will the Gateway run?-Local (this machine)
Select sections to configure-Workspace

2. Model

Choose Manual input, then set the default model novita/zai-org/glm-5:

Select sections to configure-Model
Model/auth provider-Skip for now
Filter models by provider-All providers
Default model- Enter model manually
Default model-novita/zai-org/glm-5

    novita/zai-org/glm-5 mirrors the “novita/<model-id>” format used in the reference tutorial, where novita is the provider prefix and the remaining portion is the model ID you see on Novita.

    You can find available model IDs on the Novita website, and replace the model ID with any other supported model (keep the novita/ provider prefix).

    On Model Card you can find the Model ID

    3. Gateway

    Keep defaults for a first run, just press Enter to continue

    Select sections to configure-Gateway
Gateway port
18789
Gateway bind mode
Loopback (Local only)
Gateway auth
Token
Tailscale exposure
Off
Gateway token (blank to generate)

    4. Channels

    • Select Configure/link
    • Choose a channel: Telegram (Bot API) and enter Telegram Bot Token (follow the guide below to get it from @BotFather)
    • Enter Finished
    • Configure DM access policies now and choose Pairing

    💡How to Get Telegram Bot Token?

    Search for @BotFather in Telegram and Enter /newbot to create a new bot, when you finished creating the new bot, you will get bot token.

    The Guide to getting your Telegram Bot Token

    5. Continue (Done)

    Step 3: Apply the Novita Provider Configuration (GLM-5)

    OpenClaw can integrate with Novita through an OpenAI-compatible endpoint. We’ll add Novita as a provider in your OpenClaw config file.

    Config path:~/.openclaw/openclaw.json

    # Open the file:
    open ~/.openclaw/openclaw.json

    Now paste the configuration block below into your config. Only update one field:<Your APi Key> → your Novita API key

    "models": {
      "providers": {
        "novita": {
          "baseUrl": "https://api.novita.ai/openai/v1",
          "apiKey": "<Your API Key>",
          "api": "openai-completions",
          "models": [
            {
              "id": "zai-org/glm-5",
              "name": "GLM-5 (Novita)",
              "reasoning": false,
              "input": [
                "text"
              ],
              "cost": {
                "input": 0,
                "output": 0,
                "cacheRead": 0,
                "cacheWrite": 0
              },
              "contextWindow": 200000,
              "maxTokens": 8192
            }
          ]
        }
      }
    },

    Notes:

    • The fields reasoning, cost, contextWindow, and maxTokens are optional; OpenClaw also documents defaults if you omit them.
    • The model ID for GLM-5 on Novita is zai-org/glm-5, you can also change the model you like.

    Step 4: Start the Gateway

    Install and restart the OpenClaw gateway:

    openclaw gateway install
    openclaw gateway restart

    Step 5: Pair Telegram

    In Telegram, open the bot you created and send /start. The bot will give you pairing code, then approve it in a new terminal:

    openclaw pairing approve --channel telegram <your-pairing-code>

    Step 6: Quick verification in Telegram (10 seconds)

    In Telegram, send /model to confirm the active model

    Conclusion

    OpenClaw gives you a practical gateway to put an agent where users already work (chat apps), while GLM-5 brings strong agentic reasoning, tool calling, and long-context support for multi-step workflows.

    Using Novita AI’s API, you can integrate GLM-5 with minimal glue code and scale usage as your demo becomes a production workload

    Novita AI is a leading AI cloud platform that provides developers with easy-to-use APIs and affordable, reliable GPU infrastructure for building and scaling AI application.

    Frequently Asked Questions

    What does OpenClaw do?

    OpenClaw runs a long-lived Gateway process that connects the chat apps you already use (Telegram, Discord, WhatsApp, iMessage, etc.) to an always-on assistant. The Gateway acts as the control plane—handling channels, sessions, and routing—so messages from your chat app can be delivered to the right agent context and tools.

    Is OpenClaw an AI agent?

    OpenClaw itself is not the model—it’s the agent runtime + gateway that hosts and routes agent sessions. The “intelligence” comes from the model(s) you configure; OpenClaw provides the plumbing to make that model behave like an agent across messaging channels, tools, and sessions.

    Is Clawdbot free?

    Yes—Clawdbot refers to OpenClaw’s earlier name, and the software is free and open-source under the MIT license. Your real costs come from what you plug into it (model/API usage, hosting, and any paid tools/services you enable).

    Recommended Reading


    Discover more from Novita

    Subscribe to get the latest posts sent to your email.

    Leave a Comment

    Scroll to Top

    Discover more from Novita

    Subscribe now to keep reading and get access to the full archive.

    Continue reading