Skip to main content

Lifesaver Lite LLM

License: MIT PyPI

Overview

  • Lightweight toolkit to ingest, analyze, and optimize LLM usage. Includes a simple dashboard, CLI analytics, and optional mitmweb-based live ingestion.
  • Offline-friendly with vendored assets and deterministic tests. No secrets or large models committed.

Prerequisites

  • Python 3.10+
  • Optional: Docker (for mitmweb), make

Quickstart

  • Create env and install
    • python -m venv .venv && source .venv/bin/activate
    • pip install -r requirements.txt -r requirements-dev.txt
    • pip install -e .
  • CLI analytics (ingest + analyze)
    • lifesaver-lite-llm --db data/analysis.db ingest --input examples/sample_requests.json
    • lifesaver-lite-llm --db data/analysis.db analyze --out reports/report.md
  • Dashboard (upload mode)
    • ./run.sh dashboard --upload examples/sample.har
  • Live follow (mitmweb)
    • make mitm-up # mitmweb UI at http://localhost:8081, proxy :8080
    • MITMWEB_URL=http://localhost:8081 ./run.sh dashboard --upload ""
  • Health checks
    • make health # router + dashboard + mitmweb
    • make health-router # GET http://localhost:4000/health
    • make health-dashboard # GET /api/status
    • make health-mitm # GET MITMWEB_URL (default :8081)

Run Tests & Lint

  • pytest -q (ensure package is installed with pip install -e .; alternatively run with PYTHONPATH=src)
  • ruff check .
  • black .

CLI Highlights

  • Ingest HAR/.mitm/JSON and analyze usage
    • make all INPUT=examples/sample_requests.json
    • lifesaver-lite-llm export flows --out exports/flows.json --since now-1h --redact 1
  • magic-cli (agentic REPL + router helpers)
    • docs/AGENT.md
    • Agent via router (no provider-specific CLI):
      • make agent-router-repl MODEL=gpt-4o-mini
      • make agent-router-chat MSG="Hello" MODEL=gpt-4o-mini
      • Claude via router: make agent-claude-repl MODEL=claude-3-haiku-20240307 and make agent-claude-chat MSG="Hello" MODEL=claude-3-haiku-20240307

Dashboard

  • Pages: /, /flows, /timeline, /graph, /techniques
  • APIs: /api/status, /api/flows, /api/graph, /api/techniques, /api/flow/{id}
  • Basic Auth: set DASH_BASIC_USER and DASH_BASIC_PASS
  • Health: make health-dashboard

Environment

  • Core: LITELLM_MASTER_KEY, LITELLM_SALT_KEY, STORE_MODEL_IN_DB, DATABASE_URL, PORT
  • Dashboard: DASHBOARD_PORT, DB_PATH, PROVIDERS_PATH, MITMWEB_URL, MITMWEB_COOKIE, DASH_BASIC_USER/PASS

Docs

  • Start with docs/INTRODUCTION.md and docs/GETTING_STARTED.md
  • See docs/DASHBOARD.md, docs/ARCHITECTURE.md, docs/INGESTION.md, docs/SECURITY.md
  • One-file context: docs/PROJECT_CONTEXT.md (combined docs/prompts)
  • Health checks and liftoff scenarios are documented in Makefile (make menu)

Project Layout

  • src/lifesaver_lite_llm/: core package modules
  • tests/: unit/integration tests
  • configs/: provider presets and settings
  • examples/: minimal inputs
  • assets/: vendored static assets
  • scripts/: helper scripts

License

  • MIT. See LICENSE for details.

Metadata

Release files for lifesaver-lite-llm 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lifesaver-lite-llm 0.1.1
File Size Uploaded Provenance
lifesaver_lite_llm-0.1.1.tar.gz 48.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for lifesaver-lite-llm 0.1.1
File Interpreter ABI Platform
lifesaver_lite_llm-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 98.5 kB

Release files / lifesaver_lite_llm-0.1.1.tar.gz

Download URL lifesaver_lite_llm-0.1.1.tar.gz
Size 48.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bac176e58e8ebcf931bca5acda81b2d49daecb7824e5c4d4358a246919c5b2f1
BLAKE2b-256 checksum
How to use checksums
0c1a0f7750c07328de6894d751da1d260a8c70abed9834f2dae6c9252655060f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / lifesaver_lite_llm-0.1.1-py3-none-any.whl

Download URL lifesaver_lite_llm-0.1.1-py3-none-any.whl
Size 49.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
334cd4076f55165a31808f777dbec38508481ec3dcb7b3d216a9ee715286b6be
BLAKE2b-256 checksum
How to use checksums
d68c02c28fed1f2e9c30467793d430ae2cdb80f478c607e12e5050abfe0405d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for lifesaver-lite-llm 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page