[KongchangAI]
Producttokenprune

TokenPrune

An open-source, zero-dependency Python package that reduces redundant tokens in Agent tool output through deterministic pruning and table compression. It does not require calling a second model and is installed with pip install tokenprune.

Timeline (last 90 days)

Oct 23

TokenPrune is an open-source, zero-dependency Python package that reduces redundant tokens in tool output through deterministic pruning and table compression in local memory, without calling any external model.

Unverified50%
Oct 23

TokenPrune can be installed via pip install tokenprune.

Unverified50%
Oct 23

The core usage of TokenPrune is to wrap tool functions with the @prune_tool decorator, which automatically analyzes the structure of the returned dictionary, strips null values, compresses repetitive key-value patterns, and converts list-type data into a compact table form.

Unverified50%
Oct 23

According to benchmark tests published by the author, TokenPrune achieves 70%–90% token reduction on enterprise-grade API payloads.

Unverified50%
Oct 23

TokenPrune's runtime overhead is under 0.5 milliseconds, and the number of external API calls is 0.

Unverified50%
Oct 23

TokenPrune is implemented based on AST tree-shaking using only the pure Python standard library.

Unverified50%
Oct 23

The TokenPrune project is open-sourced on GitHub (GeekyMK/tokenprune) and published to PyPI.

Unverified50%
Oct 23

TokenPrune's pruning logic consists of deterministic heuristic rules, so the same input always yields the same pruning result.

Unverified50%
Oct 23

When the object structures in a list are inconsistent, TokenPrune's table compression may fail or produce ambiguity.

Unverified50%
Oct 23

TokenPrune's default pruning prioritizes stripping metadata such as HATEOAS link fields, and if these links are indeed necessary for traceability or subsequent calls, developers need to explicitly preserve them.

Unverified50%

1 more timeline events

All Facts (11)

Unverified

TokenPrune has not yet been validated in large-scale production environments; the 70%–90% reduction figures come from the author's own tests, and actual results will vary depending on the type of API workload.

50%
Unverified

TokenPrune can be installed via pip install tokenprune.

50%
Unverified

The core usage of TokenPrune is to wrap tool functions with the @prune_tool decorator, which automatically analyzes the structure of the returned dictionary, strips null values, compresses repetitive key-value patterns, and converts list-type data into a compact table form.

50%
Unverified

According to benchmark tests published by the author, TokenPrune achieves 70%–90% token reduction on enterprise-grade API payloads.

50%
Unverified

TokenPrune's runtime overhead is under 0.5 milliseconds, and the number of external API calls is 0.

50%
Unverified

TokenPrune is implemented based on AST tree-shaking using only the pure Python standard library.

50%
Unverified

TokenPrune is an open-source, zero-dependency Python package that reduces redundant tokens in tool output through deterministic pruning and table compression in local memory, without calling any external model.

50%
Unverified

TokenPrune's pruning logic consists of deterministic heuristic rules, so the same input always yields the same pruning result.

50%
Unverified

When the object structures in a list are inconsistent, TokenPrune's table compression may fail or produce ambiguity.

50%
Unverified

TokenPrune's default pruning prioritizes stripping metadata such as HATEOAS link fields, and if these links are indeed necessary for traceability or subsequent calls, developers need to explicitly preserve them.

50%
Unverified

The TokenPrune project is open-sourced on GitHub (GeekyMK/tokenprune) and published to PyPI.

50%

Source Articles