omp packages

pi-agentbar0.2.0

Status bar for Pi: model, real cost today across sessions, context use, working time, and running shells and subagents

harryd39 Published 4 days ago MIT ~0 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-agentbar icon

pi-agentbar

A status bar for Pi that tells you what today has cost, how full the context is, and what is still running.

Model Name (medium) / $12.34 today / 70% (735k / 1.0M) / work 51m / session 11h43m
shell pytest tests 2m   agent reviewer 5m

Why

Pi's default footer does not answer the three questions that come up during a long session: how much have I spent today, how close am I to the context limit, and is something still running? This package puts all three under the input box, updated live.

Quick start

  1. Install it:

    pi install npm:pi-agentbar
    # or straight from GitHub
    pi install git:github.com/Mikasathebest/pi-agentbar
    
  2. Start pi (or run /reload in an open session). The bar appears under the input box.

  3. To see real dollar amounts, give your models a price in ~/.pi/agent/models.json (dollars per million tokens):

    "cost": { "input": 2, "output": 10, "cacheRead": 0.1, "cacheWrite": 2.5 }
    

    Models without a price count as $0.

What each part means

Part Meaning
Model Name (medium) The session's model and reasoning level
$12.34 today Cost of every Pi session written today on this machine, this one included
70% (735k / 1.0M) Context in use. Turns yellow at 60% and red at 85%
work 51m Time the agent has spent working in this session
session 11h43m Time since the session started
Second line Running shell commands and sub-agents: a blue keyword, a short name and the runtime

A shell command is named by a leading # name comment, otherwise by its program and first argument. With several running, the line shows a count and the names.

Commands

Command Effect
/agentbar Toggle the bar
/agentbar on / /agentbar off Show or hide it

The choice is remembered in ~/.pi/agent/agentbar.json ({ "enabled": true }).

Good to know

  • Cost is token counts multiplied by your configured prices; it is an estimate, not your provider's invoice.
  • Only runs that write a session file under ~/.pi/agent/sessions are counted. "Today" is your local day.
  • No network requests and no extra model calls.

Remove

pi remove npm:pi-agentbar

License

MIT © Harry Deng