Tokenless uses five complementary strategies to reduce redundancy before content enters the LLM context window:
-
Schema compression(~57%): Streamline Function Calling tool definition, remove markdown syntax in description, delete examples and title Fields, truncated function and parameter descriptions that are too long. The effect is most significant on Agent scenarios that contain a large number of tool definitions (dozens of Function Calling schemas).
-
response compression(26–78%): Apply 7 rules to API returns and tool execution results - remove low-value fields such as debug/trace/stack/logs (R3), remove nulls and empty values (R4/R5), truncate very long strings exceeding 4096 characters (R1), truncate arrays exceeding 32 elements (R2), truncate nesting depths exceeding 8 levels (R6). The input types with the best optimization results: API responses containing a lot of debugging information (such as Kubernetes API, cloud resource query results), web_fetch results containing redundant fields (measured ~78%), and deeply nested JSON structures.
-
TOON encoding(15–40%): Losslessly encode JSON into a token-oriented compact format, eliminating JSON syntax overhead such as quotes, commas, and curly braces. For data with regular structure and long field names (such as containing description、resource_id Objects with keys of equal length) have the best optimization effect.
-
Command rewriting(60–90%): The integrated RTK engine intelligently filters the output of 70+ CLI commands to eliminate interference information such as progress bars, ANSI escape codes, and redundant logs. Input types that optimize best: build tool output (cargo/npm/go/pytest), package manager output (dnf/yum/apt), and lengthy results of file listing commands (ls -la, find).
-
Tool readiness check: Verify binaries, configurations, permissions and network dependencies before calling the tool, automatically fix missing items and mark environment class failures as "Skip retry" to prevent LLM from wasting tokens by repeatedly retrying commands that must fail.
Overall, Tokenless has the greatest optimization effect on the following input and output:Agent configuration with extensive tool definitions(Schema compression),API response with debug/redundant fields(response compression),Structured JSON data(TOON encoding),CI/CD build and package management command output(RTK rewrite).