Go from install to a report you can send in 5 steps
SAVI watches the AI calls your code makes and shows you what they cost, which ones failed and where personal data went. You do not need a SAVI account or server to start.
About 5 minutes ยท PythonThe 5 steps
Do these in order. Each step shows what you should see when it works.
Install
Install the package. It is the only thing you need.
You should see: pip finishes with no errors.pip install "savi-sdk[openai]"
Wrap your client
Swap your AI client for the SAVI one, and switch on the report. It replaces one line in your code and adds two.
You should see: your app starts as normal.import os from savi import SaviOpenAI, local_report local_report.start() client = SaviOpenAI(api_key=os.environ["OPENAI_API_KEY"], local_mode=True)
Call as usual
Change nothing else. Your calls go straight to your AI provider.
You should see: the same answers as before.SAVI takes notes
For every call, SAVI writes down the model, tokens, time, failures, repeats and cost (from the prices you enter). Streamed answers are counted too.
You should see: one short line printed for each call.Read your report
When your program ends you get a short summary and a file called
You should see: a page like the sample report.savi-report.html. Open it in any browser, or send it to anyone.
Try it before you use it
Want to see a report first? This command makes one from made-up calls.
python -m savi.local_report --demo
Your data stays private
Here is exactly what SAVI keeps and what it does not.
| What | Recorded? |
|---|---|
| Your question (the prompt) | Never, by default |
| The model's answer | Never, by default |
| Model name, tokens, time, failures, repeats | Yes |
| Cost, from prices you enter | Yes |
Optional add-on: personal-data flags. It marks calls that include things like names or emails. It still does not save the text.
pip install "savi-sdk[pii]"
Choose where the notes go
You can change this later without changing your code much.
Local mode: everything stays on this computer
- No account and no server
- Nothing is sent anywhere
- Add your own prices to see cost
- Send the report file to anyone
Connected mode: notes go to your SAVI account
- Same code, plus a key and a tenant id
- Notes are sent in batches in the background
- SAVI sets it up with you
Common questions
Do I need to change my code?
You change the line where you create the client, and add two lines to switch on the report. The rest stays the same.
Will it slow my app down?
Your calls go straight to your provider. SAVI runs inside your program and is not in the network path. In connected mode, notes are sent in batches in the background.
Where is my report saved?
In a file named savi-report.html. Check the folder you ran your code from.