← Catalog

pi-efficient-tool-use

Pi extension that reminds the agent to batch independent lookups, shows how often that worked, and fixes a few wasteful tool calls where they happen.

Package

Install

Install with PiG

pig install npm:pi-efficient-tool-use

Install with Pi

pi install npm:pi-efficient-tool-use
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.

{
  "image": "https://raw.githubusercontent.com/Don-Yin/pi-efficient-tool-use/main/assets/demo.png",
  "extensions": [
    "./src/index.ts"
  ]
}

README

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

English · 简体中文 · Español · Русский · 日本語

pi-efficient-tool-use

Reminds a Pi agent to send independent lookups together instead of one at a time, and shows in the footer how often that worked (⚒ 2/3 batched: of 3 reminders, 2 were followed by a batch of several calls). It also fixes a few wasteful tool calls where they happen.

A real Pi session: three files read one at a time, the reminder, then three files read together in one turn; the footer shows ⚒ 1/1 batched

https://github.com/user-attachments/assets/e4a9c709-f00f-43d9-b4b6-634a06507758

Also on YouTube.

pi install npm:pi-efficient-tool-use

Check on your own logs

npx pi-efficient-tool-use

It reads your Pi sessions in ~/.pi/agent/sessions (nothing leaves your machine) and prints per model how often the next batch had several calls: before install, after a reminder, and after install without one. A few thousand sessions take about two minutes.

Development

npm install && npm test

Contributing

I am still learning, so ideas, issues and pull requests are all very welcome.

License

MIT