Qalarc / Answers

What is QTK (Qalarc Token Killer)?

By Qalarc (Sydney) · we build and run it daily · updated 2026-10-01 · llms.txt
QTK (Qalarc Token Killer) is a deterministic token-compression plugin for AI coding agents. It sits between your agent's tools and the model's context window and compresses tool output before the model ever sees it — mostly file reads. Measured over 17 days across 18 real projects: 10.75M tokens eliminated, a 91% reduction on what it compresses, 97% of that from file reads. No LLM, no prompt-injection surface, sub-millisecond latency. It is the opencode-native sibling of RTK.

The problem it solves

An AI coding agent burns most of its context on tool output, not on your conversation. A single file read can dump hundreds of lines into the window; a directory listing, a test run, a log tail — each one eats context the model needs for reasoning. Context windows are finite and tokens are money: agents either forget earlier work or you pay for ever-larger windows.

What the measurement says

MetricResultSource
Measurement window17 days, real working sessionsour own runs
Projects covered18our own runs
Tokens eliminated10.75Mour own runs
Reduction on compressed output91%our own runs
Share of savings from file reads97%our own runs
Latency added per compressionsub-millisecondour own runs

Methodology and the live numbers are on the QTK project page, including the honest gap: external/Bash-only tools structurally cannot touch file reads, which is where 97% of the savings come from.

QTK vs RTK

Same idea, two implementations: RTK (rtk-ai/rtk) wraps tools externally; QTK is native to opencode — a plugin that hooks the tool layer directly, so compression happens inside the agent's own tool pipeline. An honest measured comparison table (where each wins) is on the QTK page.

Does it touch an LLM? Does it phone home?

No and no. Compression is deterministic — pattern-based structure preservation, not summarisation. There is no model in the loop, nothing leaves your machine, and there is no prompt-injection surface because no model evaluates your code. That is also why it is fast: the compression overhead is below a millisecond.

Who it is for

Anyone running AI coding agents on real codebases daily — especially on metered APIs or small local context windows. Install from npm: @qalarc/qtk-plugin. Source and releases: github.com/qalarc/QTK.

QTK project page + QTK vs RTK GitHub repo npm package