Python SDK for AI observability, replay, and decision tracking - Rust-powered performance
Project description
Briefcase AI Python SDK
Python SDK for AI observability, replay, and decision tracking.
briefcase-ai provides Rust-powered performance with a Python-native API.
Overview
Briefcase AI helps you:
- Capture AI decision inputs/outputs as structured snapshots
- Track estimated model costs and monitor drift signals
- Sanitize sensitive values before storage or transport
- Store, query, and replay decisions with SQLite or lakeFS backends
The package is built from the briefcase-core Rust runtime and exposed through PyO3 bindings.
Installation
pip install briefcase-ai
For live lakeFS integrations:
pip install "briefcase-ai[lakefs]"
Requirements:
- Python
>=3.10 - Rust toolchain only if building from source
Artifact note:
- Releases can include native wheels and a source distribution (sdist).
- If a wheel is unavailable for your environment,
pipcan install from sdist.
Canonical Import Surface
Use briefcase_ai for all new code.
Compatibility aliases exposed in briefcase_ai include:
versionedlakefs_versionedversioned_contextlakefs_contextbriefcase_workflow
The legacy briefcase namespace remains available in 2.1.30 as a compatibility alias
and emits DeprecationWarning. Alias removal is planned for 2.1.31.
Quick Start
import briefcase_ai
briefcase_ai.init()
decision = briefcase_ai.DecisionSnapshot("chat_completion")
decision.add_input(briefcase_ai.Input("prompt", "Summarize this text", "string"))
decision.add_input(briefcase_ai.Input("model", "gpt-4o-mini", "string"))
decision.add_output(
briefcase_ai.Output("response", "Summary output", "string").with_confidence(0.94)
)
decision.with_execution_time(42.5)
decision.add_tag("environment", "prod")
storage = briefcase_ai.SqliteBackend.in_memory()
decision_id = storage.save_decision(decision)
loaded = storage.load_decision(decision_id)
print(loaded.function_name)
Core Capabilities
1) Decision Snapshot Modeling
DecisionSnapshot,Input,Output,ModelParameters,ExecutionContext- Build reproducible records for AI decisions and annotate with tags/metadata
2) Storage and Query
SqliteBackendfor local/in-memory usageLakeFSBackendfor versioned storage workflows- Save/load/query snapshots and decision records
3) Drift Monitoring
calculator = briefcase_ai.DriftCalculator()
metrics = calculator.calculate_drift(["answer A", "answer A", "answer B"])
print(metrics.consistency_score, metrics.drift_score)
4) Cost Estimation
cost = briefcase_ai.CostCalculator()
estimate = cost.estimate_cost("gpt-4", 1200, 300)
print(estimate.total_cost, estimate.currency)
5) PII Sanitization
sanitizer = briefcase_ai.Sanitizer()
result = sanitizer.sanitize("Email me at user@example.com")
print(result.sanitized)
6) Replay
ReplayEnginecan replay persisted snapshots/decisions from a configured backend- Useful for debugging determinism and policy validation workflows
7) Feature Modules via briefcase_ai
The distribution exposes feature modules through briefcase_ai.*, including:
briefcase_ai.integrations(lakeFS, framework handlers, VCS adapters)briefcase_ai.correlationbriefcase_ai.compliancebriefcase_ai.ragbriefcase_ai.external_databriefcase_ai.validation
Optional provider libraries (for example Pinecone/Weaviate/Chroma or framework-specific SDKs) may still be required at runtime depending on the integration you use.
Documentation Links
- Product docs: https://docs.jalebiventures.com
- Getting started: https://docs.jalebiventures.com/docs/getting-started/installation
- Quick start: https://docs.jalebiventures.com/docs/getting-started/quickstart
License
This project is licensed under GNU General Public License v3.0 (GPL-3.0-or-later). See the LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file briefcase_ai-2.4.1.tar.gz.
File metadata
- Download URL: briefcase_ai-2.4.1.tar.gz
- Upload date:
- Size: 244.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0f8a0e740be3d6c1af98c0b486ec9a71f9a658e1110fa15e571624009bf3875
|
|
| MD5 |
04e1160faf6f438facbb21583f2acf63
|
|
| BLAKE2b-256 |
f4e091ed2a49e55bd6c99d41f2def484e221307c73c5197183ceaf8eb04bed60
|
File details
Details for the file briefcase_ai-2.4.1-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: briefcase_ai-2.4.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaaea7ebbbe5360167b5fc44d70a1eb31c7c5b019e91edf6af6089c71459eaab
|
|
| MD5 |
5b2042dd1a6c472943142d9fca6baeea
|
|
| BLAKE2b-256 |
d66e88a3c8da7da4ec0959ea1a2bb051687e0f48c8c39c5c20f9ab2bee12db72
|
File details
Details for the file briefcase_ai-2.4.1-cp311-cp311-manylinux_2_38_x86_64.whl.
File metadata
- Download URL: briefcase_ai-2.4.1-cp311-cp311-manylinux_2_38_x86_64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.11, manylinux: glibc 2.38+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3762ccfd50ac67753cbcce3d09df385a38bf510e45948b6eb80d1df8fdd2120
|
|
| MD5 |
7fbddf54ac0a24b05a8800e6e9db5c34
|
|
| BLAKE2b-256 |
8b794f01868ef26d1c6f6ceea0620c66ac62ab56187f0fdb60c72aa9b4258ed5
|
File details
Details for the file briefcase_ai-2.4.1-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: briefcase_ai-2.4.1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2628a56ff3d5ba68fa5d49cf49d435ddf263324c3df8fbe1783aadc200af499
|
|
| MD5 |
9e83da2904f2d38601cdda35b7adf99a
|
|
| BLAKE2b-256 |
fb89548d18dafeee3bcb0455c9b54730fa42eacede8d66aa9741dc01eb9f2284
|