Documentation
Browse documentation

How it works

Savings

MemIndex shows how many tokens, and about how many dollars, your memory has saved you. Open the Savings tab in the viewer, or run this in a terminal:

npx memindex savings

Both show the same numbers: a total, a table per project and a table per day, for the last 30 days. The viewer also has 7 and 90 day buttons.

Options

Option What it does
--days <n> Look back this many days instead of 30.
--project <name> Count one project only.
--here Count the project of the folder you are in.
--json Print the numbers as JSON.

How it is worked out

Each note records the tokens it took your agent to work something out. Reading the note back costs far fewer. The difference is what you saved, priced at the input rate of the model that did the work.

This is an estimate. It assumes your agent would otherwise have redone that work, and it is not a bill. Dollars use the price of the model recorded for the note. Where a note did not record its model, or its price is not known, the price of Claude Sonnet is used and the page says so.

Notes that recorded no work tokens, such as notes imported from elsewhere, are not counted. The page tells you how many there are.

The saving is the same figure the session-start panel shows as a percentage.