DRIFT adds automatic token compression for multi-language code

DRIFT now includes a token feature that automatically shrinks code before it enters the . It works across s, not only structured formats like JSON. Code pulled from memory, scraped from , or inserted from workspace context goes through a language-aware minification step first.

For Python, it removes , inline comments, repeated spaces, and blank lines. For and CSS, it removes single-line and multi-line comments, then reduces spaces and line breaks while keeping the code structure intact. For HTML, it removes developer comments and cuts extra spacing between tags while keeping the .

In a mixed Python, , and HTML test, 433 characters were reduced to 240 characters, a 44.57% reduction.

Key points

  • DRIFT compresses code automatically before sending it into the .
  • It supports Python, , CSS, and HTML.
  • It removes comments, , extra spacing, and unnecessary line breaks.
  • A mixed-language example shrank from 433 characters to 240 characters, a 44.57% reduction.
  • This can help AI agents fit more code into and reduce token cost.
Read original