← Catalog

@the-agency/pi-tokenshrink

Reduce token usage of a Pi agent's conversation context using TokenShrink.

Package

Install

Install with PiG

pig install npm:@the-agency/pi-tokenshrink

Install with Pi

pi install npm:@the-agency/pi-tokenshrink
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.2 (README.md). PiG does not review it.

pi-tokenshrink

A Pi extension that uses tokenshrink to reduce token count of a prompt in a deterministic way that does not depend on LLM-based inference.

Install

pi install npm:@the-agency/pi-tokenshrink

Usage

Token reduction will be turned on automatically, and its status, plus an estimated count of saved tokens, will appear in the Pi status bar.

Commands:

  • /tokenshrink on: enable
  • /tokenshrink off: disable
  • /tokenshrink toggle: toggle between on and off