SAVI

Try SAVI on your laptop in minutes.

Wrap the AI client you already use. No account and no network call to SAVI: every call prints in your terminal, and you get one report file to share.

1Install it

pip install "savi-sdk[openai]"

2Swap one line, and switch on the report

import os
from savi import SaviOpenAI, local_report

local_report.start()   # one line per call in your terminal, and a report file at the end

client = SaviOpenAI(api_key=os.environ["OPENAI_API_KEY"], local_mode=True)

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Summarise this contract."}],
)

3Run your code and read your terminal

[ OK  ] openai     gpt-4o-mini-2024-07-18   in   214  out    96    812 ms  cost ~$0.000090
[CACHE] openai     gpt-4o-mini-2024-07-18   in   214  out    96     14 ms  cost $0.00  answered from cache
[ OK  ] openai     gpt-4o-mini-2024-07-18   in   330  out    60    701 ms  cost ~$0.000085  personal data: EMAIL_ADDRESS x1
[FAIL ] openai     gpt-4o                   in     0  out     0   30.2 s  cost -  failed timeout

Summary  (this computer only; nothing was sent anywhere)
  8 calls, 1 failed   tokens in 3,842 / out 978   average response 1.1 s
  cost about $0.01. Cost covers 6 of 7 calls. No price for: mistral-small-latest.
  1 answered from the cache, saving about $0.000090

4Open the report

When your program ends, SAVI writes savi-report.html: one file with counts, models, tokens, times and costs. It never holds what was asked or answered.

Terminal output from the SDK's demo command, shortened. The calls are made up. No API key? Run python -m savi.local_report --demo.

Built so you can check it, before anyone signs anything.

01

Nothing sent in local mode

No account and no network call to SAVI. Every call prints in your terminal and stays on your machine.

local_mode=True

02

Prompts never leave for SAVI

With an account, SAVI gets the model, token counts, timing and a fingerprint for each call. Never the prompt or the answer.

Fingerprints, not text

03

One wrapper, seven providers

Wrap the client you already use. Your calls, prompts and streaming code stay the same.

Drop-in client wrappers

04

Open source

MIT licensed on PyPI and GitHub. Read every line that touches your calls.

MIT licence

Start on your laptop. Add the company record later.

Local mode, on your laptop

  • Tokens in and out for every call, streamed ones included
  • Response time, failures and answers served from your own cache
  • Repeated prompts, which is how a looping agent shows up
  • Cost from your own prices
  • Personal-data types, with the personal-data option installed
  • One report file you can send to anyone

With a SAVI account, for the whole company

Same code: add your SAVI key and turn local mode off. The same calls then join one record across teams and tools.

Refusing a call needs your application to ask SAVI's pre-call check first.

Wrap the client you already use.

Async versions are included for OpenAI, Anthropic, Azure OpenAI and Cohere.

OpenAISaviOpenAI
AnthropicSaviAnthropic
Azure OpenAISaviAzureOpenAI
Google Vertex AISaviVertexAI
AWS BedrockSaviBedrockRuntime
CohereSaviCohere
MistralSaviMistral

Agent frameworks and gateways are not officially supported yet. What that means

The details engineers ask about.

The report, cost, personal data, what is sent, frameworks and setup.

What is in the report file?

Counts, models, tokens, response times, failures, costs from your prices, personal-data types and repeated prompts, in one HTML file you can open or send. Prompts and answers are never written into it. Pass hide_names=True to swap workflow, agent and user names for neutral labels before you share it.

How is cost worked out in local mode?

Only from prices you give it, in a small JSON file or a dictionary, in US dollars per million input and output tokens. There are no built-in prices in local mode. A model without a price is left out of the total, and the summary names it.

How does the personal-data check work?

Install savi-sdk[pii] and download a spaCy language model. The SDK then scans each prompt on your machine and reports the types it finds, never the text. It does not change the prompt your provider receives: the scan keeps personal data out of SAVI, it is not a filter on the provider call.

What is sent to SAVI once I add an account?

For each call: provider, model, tokens, response time, finish reason, time, a fingerprint used to spot repeats, the personal-data types found and whether it came from the cache. Not the prompt, not the answer.

Does it work with LangChain, LlamaIndex or CrewAI?

They are not officially supported yet, and neither are gateways such as LiteLLM. Because the wrapper sits under the provider's own client, many setups work, but check with us before you rely on one.

Something does not work. Where do I start?

Run python -m savi.doctor. It shows your Python version, what is installed, which keys are set (never the keys themselves) and whether your computer can reach the provider. To see the output without an API key, run python -m savi.local_report --demo.

Tried it on one laptop? Bring it to every team.

When you are ready for the company record, we will set it up with you, starting from the code you already have.