SAVIHow the SDK works

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 ยท Python

The 5 steps

Do these in order. Each step shows what you should see when it works.

  1. Install

    Install the package. It is the only thing you need.

    pip install "savi-sdk[openai]"
    You should see: pip finishes with no errors.
  2. 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.

    import os
    from savi import SaviOpenAI, local_report
    
    local_report.start()
    client = SaviOpenAI(api_key=os.environ["OPENAI_API_KEY"], local_mode=True)
    You should see: your app starts as normal.
  3. Call as usual

    Change nothing else. Your calls go straight to your AI provider.

    You should see: the same answers as before.
  4. 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.
  5. Read your report

    When your program ends you get a short summary and a file called savi-report.html. Open it in any browser, or send it to anyone.

    You should see: a page like the sample report.

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.

WhatRecorded?
Your question (the prompt)Never, by default
The model's answerNever, by default
Model name, tokens, time, failures, repeatsYes
Cost, from prices you enterYes

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.

Start here

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
For your company

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
Contact SAVI

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.