Skip to content
NexAiNexAi home
Back to blog·
AIאוטומציהטיפים

OpenClaw + Jev: Stop Burning 26,000 Tokens on "Thank You"

ByGilad Dor Levi

A single "thank you" can cost OpenClaw around 26,000 tokens. Here's how I put TypeSafe AI's Jev in front of it, a model that returns a decision instead of text, and cut that to about 400.

OpenClaw + Jev: Stop Burning 26,000 Tokens on "Thank You"

Say your business runs on OpenClaw and customers write to it all day. You're the one responsible for the token bill, so you check how many tokens it burns. But you should also check what the customers actually wrote to cause that usage. Which raises a simple question: how many tokens does OpenClaw use when a customer says "thank you very much" and it has to answer "you're welcome," maybe with a smiley?

The answer: when OpenClaw forwards that "thank you very much" to a large language model (LLM), it can waste around 26,000 tokens. On top of that, you wait a few seconds for a one-line reply. That's how it goes with every incoming message: a plain "okay, received," or spam that arrives, quite happily, as the business grows.

What fixes this is a model that can't write even a single sentence. In this guide I show how I connected OpenClaw to Jev, a new model from TypeSafe AI, and where I placed it so it saves money, time and tokens. I wrote about Jev itself separately: Jev, the new AI model that answers with probabilities, not words.

How it works

Most of those 26,000 tokens are the agent's instructions and tools, which get sent to the model again with every message. That leads to a surprising question: how can a model that writes nothing help my agent? Sounds a bit odd.

The trick is that instead of text, Jev returns a decision. You give it a message and a closed list of options, for example thanks, spam, question, bug, and it sends back exactly one of them with a score beside it: how confident the model is in that option, a value between zero and one. No sentences, just a specific choice that code can act on. As you'll see, that score is what saves us later.

Jev's response time is between 70 and 500 milliseconds. A million input tokens cost about 4.2 cents, and the output is free because there is no output, only a decision, and a decision costs roughly 400 tokens. So 100 messages a day cost about 5 cents a month.

In OpenClaw, from version 2026.9.6, this kind of model has a role of its own: the Decision Model, and there's an official plugin that connects it to Jev. A plugin is an add-on, a small piece of code that adds a capability. But according to the documentation, installing and enabling the plugin doesn't select a decision model or start anything on its own, so there's some work to do here. That's why I wrote a small plugin of about 60 lines (and no, I didn't write all of it by myself) that forwards every message to Jev before the large language model even wakes up. I'm sharing all of the code, so you can take it for free.

The server

For your agent to answer at 3:00 AM when your computer is off, it has to live on a server that runs all the time: a VPS (Virtual Private Server) that you rent, running 24/7 with backups, bandwidth and hardware that scales with your monthly or yearly plan. Some providers offer one-click OpenClaw installs on a VPS with no hassle, and that's exactly what I used. If OpenClaw already runs for you, you can keep going.

Seeing the problem in practice

From here we're already talking to the agent, and everything works, but let's look at what's wrong. First I send my bot a /new command to start a completely fresh conversation. Then I turn on a token counter with /usage tokens. The /usage command adds a usage line under every reply, and "tokens" makes that line show the token count.

I sent: "thank you very much, the website is back up." The reply came back after about nine seconds, which is a lot, and under it nearly 26k, meaning about 26,000 tokens for that one small message. Then I sent some spam, "10,000 free followers, click here," and the agent answered the spammer, once again sending all the instructions to the model.

There's obviously a lot of waste here. Tokens are very easy to pull out of our pockets, and they just fall out while we walk around the office with a coffee in hand. Jev is going to save us a good deal of that.

Installation

All of the installation happens in the server's terminal, which you open from the Docker Manager by clicking the Terminal button on the OpenClaw container.

The first command installs the official plugin that connects OpenClaw to TypeSafe AI, the company that built Jev:

openclaw plugins install @openclaw/typesafe

After a few seconds a message says the plugin is installed. The red line above it is just a banner, and you can ignore it and carry on.

Now the TypeSafe key has to go in, and you get it from their website. Log in to the console, click API keys in the side menu and then create key, and give the key a name, for example OpenClaw, which is very logical. Copy the key that gets created. This key is like a password: whoever holds it uses your account. (I deleted mine after recording.)

Don't write it into a file. Save it in OpenClaw's secrets store as a secret, and the value is typed without showing on screen. Then tell the plugin where to read the key from: its apiKey setting points at the secrets store, by the name I gave the key there. The last setting in this part makes Jev the default decision model for all agents, in its latest version. This is how it looks in the configuration, per the official documentation:

{
  "plugins": {
    "allow": ["typesafe"],
    "entries": {
      "typesafe": {
        "enabled": true,
        "config": {
          "apiKey": { "source": "store", "provider": "default", "id": "TYPESAFE_API_KEY" }
        }
      }
    }
  },
  "agents": {
    "defaults": { "decisionModel": "typesafe/jev-latest" }
  }
}

My plugin

Now it's my plugin's turn. The full code is on GitHub, so take it and do whatever you want with it. A quick walkthrough: at the top there's a closed list: thanks, spam, question, bug, birthday, and a yes or no check: is this urgent? Every message goes to Jev first, and Jev returns a confidence level between zero and one. If the score is below 0.9, meaning the plugin isn't 90% sure, it leaves the message alone. For thanks, it returns a generic reply like "you're welcome." Spam ends quietly, as spam should. And a question or a bug continues to the large model, with Jev's decision and confidence level attached.

The plugin installs directly from GitHub. After the install command comes the repository address, meaning where to download from, then a force flag that authorizes an unchecked source in the hub, and a flag that accepts the permissions the plugin requests. OpenClaw naturally warns that the source hasn't been checked, so only install code this way that you really, really trust. A plugin that reads conversations gets no access until you explicitly allow it.

After installing, set the plugin's permission to read messages (conversation) to true, meaning yes, we want to grant it. Then reload the secrets so OpenClaw reads the key. One last check: the list of enabled plugins shows only plugins in an active state, and there you can see my plugin and the TypeSafe one.

Finally, restart the container so everything takes effect: in Docker Manager, open the container's menu and wait about three minutes.

The results

Now the moment we were waiting for: messages handled by Jev alone. "Thank you very much, the site is back up and running happily" came back in a second and a half, with no token line, because the large language model never woke up. It's just sleeping there comfortably.

To see what Jev decided, I opened the server logs in the terminal: the OpenClaw log with the -f flag (follow), meaning I want every new line in real time, plus a grep for Jev, which keeps only its lines. In this line you can see the decision with a score of 1.0.

I sent the spam from before, and watch the log: complete silence, also 1.0 confidence, so it's 100% confirmed as spam. Now a customer writes that her site went down after a migration. Jev returns "urgent issue" with a score of 0.97. The message passes to the large model with the decision already attached. It tells her the message was marked urgent and even gives her three quick checks. Excellent.

The catch

But notice, not everything is perfect. One message, in my opinion, teaches more than all the rest: "I was charged twice for the same month." That's a billing question, something very specific, but Jev marked it as an "issue," because nothing else in its list fit. I never defined a billing category, so at this stage it needs to be more specific. The accuracy threshold, that 0.9 value, needs defining too.

So it got this one wrong. What saved the situation was the score: 0.56, below the 0.9 threshold, so the plugin didn't touch the message and the large model answered properly. But it isn't precise, so don't just copy my 0.9. Calibrate it: test it against your own messages and set it accordingly, which is also the recommendation in the documentation.

And now I close my laptop and send "thank you" from my phone. The answer comes back from the server, with no computer of mine involved and no large language model sitting there being bothered.

The bottom line

So how much does it cost for the agent to say "with pleasure"? With Jev, about 400 tokens on a model that doesn't write a single word, instead of 26,000 tokens on the big model we woke up over nothing. And the reply comes back in a second and a half instead of about nine.

Follow us

TikTok · X · Instagram · Telegram

Ready to automate?

Let’s build a system that works for you — not the other way around.