Skip to main content
This notebook demonstrates how to turn your OpenClaw assistant into a PII-safe inbox summarizer, so that any long or messy message you forward it comes back as a short, shareable summary with a topic and urgency label, and never drags raw personal data into your primary model’s context. You send a wall-of-text support email, a forwarded thread, or a noisy group-chat recap to the assistant in whatever chat app you already use, and it replies with the gist plus a couple of labels, having redacted the names, emails, and phone numbers first. By combining OpenClaw’s chat-app gateway with ZeroGPU’s edge-optimized nano models, this notebook walks you through a practical pattern where OpenClaw handles the conversation while ZeroGPU does the high-volume, well-defined summarize, classify, and redact work for a fraction of a frontier-model call. For the full reference, see the OpenClaw integration guide. In this notebook, you’ll explore:
  • OpenClaw: A self-hosted, open-source personal AI assistant that connects the chat apps you already use - Telegram, Slack, Discord, WhatsApp, iMessage, and more - to AI agents and tools through a plugin system. Here it receives the messages you forward in your channel of choice and routes the cheap summarize, classify, and redact steps to ZeroGPU instead of your primary model.
  • ZeroGPU: An ultra-fast, compute-efficient inference provider for apps and agents. We run purpose-built small and nano language models across an edge-powered network for the high-volume, purpose-specific tasks your app or agent runs constantly. Plug in our OpenAI-compatible API and you’re live - zero GPU infrastructure, serverless, auto-scaling by default.
This setup not only demonstrates a practical application of privacy-safe message triage, but also provides a flexible framework that can be adapted to other real-world scenarios requiring fast, low-cost handling of high-volume, free-text messages.

🎥 Watch the Video Guide

Video walkthrough coming soon.

📦 Installation

This recipe assumes you already have an OpenClaw gateway installed (see the OpenClaw docs). You’ll add the zerogpu-router plugin and the zerogpu CLI here, then connect a Telegram channel in a moment so you can actually talk to your assistant. First, install the CLI and confirm it’s on your PATH:
Next, log in once, then add the plugin from ClawHub. This is what exposes every ZeroGPU command as an OpenClaw skill your assistant can auto-invoke:
A freshly installed plugin loads its skills on the next gateway start, so if your gateway is already running, restart it (a managed gateway with config reload restarts itself). In a self-hosted or containerized OpenClaw gateway, also make sure the zerogpu binary is available inside the same environment the assistant runs in, not just on your laptop. For the full setup, including how skills auto-invoke, see the OpenClaw integration guide.

🔑 Setting Up API Keys

You’ll need to set up your ZeroGPU credentials so every skill call works without re-prompting. This ensures your OpenClaw assistant can reach ZeroGPU’s inference API securely. You can go to here to get an API key from ZeroGPU. The key starts with zgpu-api-. Sign in once. zerogpu login takes just your API key - no Project ID required - and persists it to your config file so every skill call is authenticated:
Before you forward anything, confirm the CLI is installed and you’re signed in. status exits 0 and prints your masked API key when everything is wired up:
If status reports you’re not signed in, ask your assistant to sign you in, or run zerogpu login again before continuing.

💬 Connect a Telegram Channel

OpenClaw talks to you through the chat apps you already use, and Telegram is the quickest to wire up: you create a bot, drop its token into your OpenClaw config, start the gateway, and approve a pairing code. Every message you send the bot from then on reaches your assistant, which is where the triage workflow runs. Here’s the whole thing, start to finish.

Step 1: Create a bot with BotFather

In Telegram, message @BotFather (confirm the handle is exactly @BotFather), send /newbot, and follow the prompts to pick a display name and a username ending in bot. BotFather replies with a token. Copy it and keep it secret, since anyone with the token controls your bot.

Step 2: Add the token to your OpenClaw config

OpenClaw reads its config from ~/.openclaw/openclaw.json (it’s JSON5, so comments, unquoted keys, and trailing commas are all fine). If that file isn’t there yet, create it, or run openclaw configure for a guided wizard. To keep config elsewhere, point OPENCLAW_CONFIG_PATH at the file. Open it and add a channels.telegram block with your token. dmPolicy: "pairing" means new direct-message senders have to be approved with a pairing code (Step 4), and requireMention keeps the bot quiet in groups unless it’s mentioned:
Rather than hand-edit the file, you can set the same values from the CLI (or use the Config tab in the Control UI at http://127.0.0.1:18789):
Prefer to keep the token out of the config file? Set it as an environment variable instead (this resolves for the default account only):
You can also point tokenFile at a file that holds the token if you’d rather not inline it.

Step 3: Start the gateway

This launches OpenClaw and connects your bot to Telegram. Leave it running, since it’s the process that receives your messages and runs the skills.

Step 4: Pair your Telegram account

Open Telegram, find your bot by its username, and send it any message, like hi. Because dmPolicy is pairing, OpenClaw holds that first request and prints a pairing code instead of replying. Approve it from another terminal:
Pairing codes expire after 1 hour, so approve promptly. Once approved, your DMs reach the assistant and it starts replying.

Step 5: Triage a shared group (optional)

To triage a shared support channel instead of your own DMs, add the bot to a Telegram group. With requireMention on, it only acts when someone mentions it, so it won’t respond to every message in the group. To control who can invoke it, add your numeric Telegram user ID to allowFrom. The safest way to find that ID is to DM your bot and watch the logs:
Read the from.id value from your message. Group chat IDs are the negative numbers that start with -100.

Verify it works

Send your bot a quick message in Telegram:
Everything in the sections below happens right here in this Telegram chat: you message the assistant, it runs the ZeroGPU skills, and it replies inline.

📨 Summarize a Message with ZeroGPU

ZeroGPU is an ultra-fast, compute-efficient inference provider for apps and agents. We run purpose-built small and nano language models across an edge-powered network for the high-volume, purpose-specific tasks your app or agent runs constantly. Plug in our OpenAI-compatible API and you’re live - zero GPU infrastructure, serverless, auto-scaling by default. In this section, we will summarize a single forwarded message as an example, so you can see exactly what comes back before wiring it into your assistant’s inbox workflow. The summarize skill condenses a passage into a few sentences. It routes to llama-3.1-8b-instruct-fast. Send your assistant a message like this in your chat app:
The assistant recognizes the intent, routes to the summarize skill, and replies:
Notice the trailing model: line: the work ran on a nano model, not your primary one. That single call is the building block for the whole inbox workflow below. 🎉 ZeroGPU effortlessly turns a wall of text into a few clean lines in one call, providing a cheap, consistent summarization layer for AI integration!

🦞 Set Up an Automatic Triage Workflow

This is the recipe: you configure the triage workflow once by saving it to your assistant’s memory, and from then on every message you forward is redacted, summarized, and labeled automatically on ZeroGPU’s nano models. Set it up once, use it forever. The pattern is set-and-forget. Instead of describing the pipeline every time, you teach it to the assistant a single time as a standing rule. OpenClaw keeps that instruction in its memory for the channel, so future messages trigger the same redact-summarize-label workflow without you typing anything but the forward.

Step 1: Save the workflow to memory (once)

Give your assistant the workflow as a standing instruction and ask it to remember it for this channel. You do this a single time:
The assistant confirms and stores the rule:
That’s the whole setup. You never send that instruction again. (Exactly how a rule is persisted depends on your OpenClaw configuration; see the OpenClaw docs.)

Step 2: Forward a message

Day to day, you do just one thing: forward the raw message, with no instruction attached.

Step 3: The saved workflow runs automatically

The forward matches the rule you stored, so the assistant runs the three ZeroGPU skills in order on its own, each on a nano model. You don’t send these; they are the tool calls it makes behind the scenes:
  1. redact-pii (gliner-multi-pii-v1) masks the personal data before anything else touches the text:
  1. summarize (llama-3.1-8b-instruct-fast) condenses the masked text:
  1. classify-structured (gliner2-base-v1) tags it against your label schema:
Because redaction runs first, the customer’s name, email, and phone never enter the summary, the labels, or your primary model’s context.

Step 4: The reply you get

The assistant returns the finished result in a single message:
One forward in, one clean result out - no instruction, because the workflow already lives in the assistant’s memory. Your primary model only gets pulled in for the genuinely ambiguous cases.

Step 5: Go fully hands-off (optional)

To remove even the forward, connect a shared support channel as an OpenClaw channel. The saved workflow then fires on every message that arrives, so the channel stays triaged with no action from you at all. Check the running savings any time:
🎉 You set the workflow up once, saved it to your assistant’s memory, and now every forwarded message is redacted, summarized, and labeled automatically on ZeroGPU’s nano models, with the customer’s personal data never reaching your primary model.

🌟 Highlights

This notebook has guided you through setting up and running an OpenClaw workflow with ZeroGPU for triaging forwarded messages into PII-safe, labeled summaries. You can adapt and expand this example for various other scenarios requiring fast, low-cost handling of high-volume, free-text messages. Key tools utilized in this notebook include:
  • OpenClaw: A self-hosted, open-source personal AI assistant that connects the chat apps you already use - Telegram, Slack, Discord, WhatsApp, iMessage, and more - to AI agents and tools through a plugin system. Here it receives the messages you forward in your channel of choice and routes the cheap summarize, classify, and redact steps to ZeroGPU instead of your primary model.
  • ZeroGPU: An ultra-fast, compute-efficient inference provider for apps and agents. We run purpose-built small and nano language models across an edge-powered network for the high-volume, purpose-specific tasks your app or agent runs constantly. Plug in our OpenAI-compatible API and you’re live - zero GPU infrastructure, serverless, auto-scaling by default.
This comprehensive setup allows you to adapt and expand the example for various scenarios requiring fast, low-cost handling of high-volume, free-text messages.