**Julian Goldie** (0:00)
Today, we've been testing out RTK, which is a really powerful way to reduce the amount of tokens that you use. In fact, on our own tests, and I'll show you proof in a minute, we actually saved 82.9% in tokens. Now, the readme of RTK actually claimed 60 to 90% savings in tokens, and this is just a really powerful way to get more out of your models without paying more, because you can reduce the amount of tokens you use and be more efficient, which means you can get more out of it, especially if you use this for like Fable 5 on the subscription, there'll be models in the future that you probably need this for as well. I'm also going to show you how to combine this with other open-source projects to reduce the amount of tokens you use even more in terms of being more efficient. So this is a really powerful system, and it's got 68,000 Github stars, it's trending right now, pretty fast to use.
If you're wondering, okay, what does this do in plain English? You'll probably read this and wonder, okay, what on earth does this mean? So it basically means that you have a filter that sits in the middle between you and your AI agent. So you still get the same back, you still get the same outputs and they're just as good. But all the padding, all the fluff, about 80 percent of it actually gets removed in between. And so what this means essentially is that you just reduce the amount of tokens you use depending on what you're trying to do. And you can see a bunch of tests that they've run over here, average saving was 80 percent.
And it's pretty quick and easy to install. It works on Linux and Mac OS, so you can install it one single command. And then once you've done that, you can start using it. Now, this could work, for example, inside Claude. It could work inside all your favorite coding agents. And it's pretty simple and easy to use. So I'll give you an example. On one test we did, we had 82.9 percent less text for the AI to read across all of our tests. And we ran loads of different stuff, which I'll show you in a second. Also, there's no real delay. So it was like a 14 millisecond delay between using the filter and not using it. So an extra 14 milliseconds, which is not too bad. That's not going to slow you down when you're using it as well. It's basically like a sieve for your computer's replies.
And that just removes all the fluff in between. So let's say, for example, you ask Claude to fix a bug. Well, this will be super useful. Or if Claude asks your computer a question, those sort of things will reduce the amount of tokens you use massively. So here's how it works step by step. So if you asked Claude to fix a bug or on something you're building, that could be a website, tool, app, game, whatever, then Claude would ask your computer a question to check that it works.
Now, without RTK, my computer would reply with like 373,000 characters according to our tests. And we got Fable 5 to test this all out in terms of the facts and everything else. And so Claude has to read all of it.
And that text sits in its memory being read. That means they use a lot more tokens on every message after that. If you use RTK, then a small rule swap swaps a command to RTK git diff instead of git diff before it runs. And that means Claude doesn't really know, but it typed the same thing it always types. And so this means that it runs the exact same git command, but it strips out all the padding, so all the repeated headers, all the unchanged lines, all the decoration, and what's left is the actual change. So in the end, we would normally get 373,000 characters back, but with this, we got 29,000 characters back. And so it was 92% less for Claude to read. So Claude then reads the short version, fixes the bug exactly the same before, you get the same result, but it's using a fifth of the tokens, hour after hour, command after command. And if something actually goes wrong, then RTK saves a complete unshortened reply to the file and prints it where it is. So you don't ever actually lose anything if you need to revert it back. And also the good thing about this is it doesn't change how you work, doesn't change how the AI works, the replies just get shorter. So here's an example of how it works. So normally you have your agent, it will run like git diff, then the shell answers honestly, and you get your context back, like 373,000 tokens. With your agent, it would run the same, but it gets filtered through RTK, the same command runs in the shell, and then you get a much lower context back, you get 92% less context back. And so when it filters and truncates everything that's doing, it reduces duplicates, you just use a lot less tokens. Now, the way that we've tested it is we used it on our Agent OS dashboard. We ran every test with one command, but we ran it twice, one the normal way and one through the RTK in the same folder, on the same machine with the same minute. And we measured the size of what came back, so every command answers in text, and we counted the characters of both answers because that text is exactly what an AI has to read and exactly what you're usually paying for in terms of tokens. Now, it's pretty easy to install, so it's just like one line to install this, and then you get the latest RTK version, and it's a really small program, it's like 6.6 megabytes, and it knows how to shorten replies of 100 everyday commands that Claude would normally use. So we tested it, for example, with auto rewrite hook, with 14 agents including Hermes, a bunch of other stuff like this, but everything seemed to reduce the amount of tokens that we were using. Now, you might say if you're filtering stuff, you know, if you're filtering the output, doesn't that mean you lose information? But you actually don't lose information, it just reduces the amount of tokens that your agent would use. Now, also what's interesting about this is if you want to reduce the tokens even more, you could stack this in with the rest of our token minimization playbook. So the things that we're using right now is Ponytail, and that's basically way more efficient in coding. We have RTK, which shrinks what commands return. And then you can also use Headroom, which compresses the whole context. Now, if you're not familiar with each of those, RTK is the open source project for reducing LLM token consumption. Then you have Ponytail, which basically makes your AI agent think like a lazy senior developer to be super efficient. And additionally, you have Headroom, which compresses the amount of tokens you use as well.
4 more minutes of transcript below
Try it now — copy, paste, done:
curl -H "x-api-key: pt_demo" \
https://spoken.md/transcripts/1000651996090
Works with Claude, ChatGPT, Cursor, and any agent that makes HTTP calls.
From $0.10 per transcript. No subscription. Credits never expire.
Using your own key:
curl -H "x-api-key: YOUR_KEY" \
https://spoken.md/transcripts/1000775686988