explaingit

blazeup-ai/pi-insights

Analysis updated 2026-05-18

49TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

An extension for the Pi coding agent that analyzes your session history and generates a report on token usage, cost, and workflow patterns, comparing recent weeks against past ones to spot trends.

Mindmap

mindmap
  root((Pi Insights))
    What it does
      Analyzes session history
      Tracks cost trends
      Generates HTML report
    Tech stack
      TypeScript
      LLM
      HTML
    Use cases
      Spot wasteful model use
      Compare weekly trends
      Get suggestions
    Audience
      Developers using Pi

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Generate a self-contained HTML report of your Pi coding agent usage and costs.

USE CASE 2

Identify sessions where an expensive AI model was used on a task a cheaper one could handle.

USE CASE 3

Compare this week's cost and error trends against previous weeks.

USE CASE 4

Get configuration or skill suggestions based on your actual project setup.

What is it built with?

TypeScriptLLMHTML

How does it compare?

blazeup-ai/pi-insightsalemtuzlak/kiiradeepelementlab/jupyter-studio
Stars494949
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderateeasy
Complexity2/52/52/5
Audiencedeveloperdeveloperdata

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires Pi version 0.74.0 or later with an AI model already configured.

You can use and modify the code, but if you run a modified version as a network service, you must share your source code changes under the same license.

In plain English

Pi Insights is an extension for the Pi coding agent that analyzes your session history and generates a report about how you are actually using the tool. If you work with Pi across many sessions over weeks or months, this gives you a structured look at where your time and money are going and where your workflow could improve. The report covers several things. Basic statistics include token usage, cost, lines of code changed, commits made, tool errors, and parallel session counts. A model spend section identifies cases where you are using an expensive model on simple tasks or a cheaper model on complex ones that it handles poorly, and it estimates potential savings from adjusting. A suggestions section recommends Pi features, skills, or configuration changes based on your actual projects and tools, pulling from your existing setup so it does not suggest things you already have. A separate section flags patterns that are costing you time or money and suggests concrete alternatives. What distinguishes this from simpler analytics tools, according to the README, is that it tracks changes over time rather than producing a static snapshot. It compares the current week against previous weeks, weights recent sessions more heavily when computing satisfaction and friction metrics, detects whether costs and errors are trending better or worse, and only surfaces friction points that are still ongoing rather than problems you have already resolved. The pipeline works in five phases: scanning session log files, extracting deterministic stats from each session, using an LLM to classify goals and outcomes per session, aggregating everything with decay weighting and anomaly detection, and finally generating a self-contained HTML report (or Markdown if preferred) using a set of parallel LLM prompts. Results are cached so repeated runs are fast. Installation is one command within Pi. The extension requires Pi version 0.74.0 or later and an active AI model configured in Pi. It is released under the AGPL-3.0 license.

Copy-paste prompts

Prompt 1
Install Pi Insights and generate a usage report for my last month of Pi sessions.
Prompt 2
Explain how this extension decides which model-spend patterns are wasteful.
Prompt 3
Show me how the five-phase analysis pipeline in this project works.
Prompt 4
Help me interpret the friction points this report flags as still ongoing.

Frequently asked questions

What is pi-insights?

An extension for the Pi coding agent that analyzes your session history and generates a report on token usage, cost, and workflow patterns, comparing recent weeks against past ones to spot trends.

What language is pi-insights written in?

Mainly TypeScript. The stack also includes TypeScript, LLM, HTML.

What license does pi-insights use?

You can use and modify the code, but if you run a modified version as a network service, you must share your source code changes under the same license.

How hard is pi-insights to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is pi-insights for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.