Python SDK
Install
pip install briefcase-aiImport Paths
from briefcase import DecisionSnapshot, Snapshot, initfrom briefcase.decorators import capturefrom briefcase.replay import ReplayEnginefrom briefcase.drift import DriftCalculator, DriftMetricsfrom briefcase.cost import CostCalculator, CostEstimatefrom briefcase.sanitize import Sanitizerfrom briefcase.storage import SqliteBackend, BufferedBackendfrom briefcase.validation import PromptValidationEnginefrom briefcase.guardrails import GuardrailEnv, GuardrailRegistryfrom briefcase.rag import VersionedEmbeddingPipelinefrom briefcase.correlation import BriefcaseWorkflowContextfrom briefcase.external_data import ExternalDataTrackerfrom briefcase.routing import BaseRouter, RoutingDecisionfrom briefcase.events import BriefcaseEvent, emitfrom briefcase.exporters import BaseExporterThe @capture Decorator
from briefcase import capture
@capture()def my_llm_call(prompt: str) -> str: return client.chat(prompt)Every call to my_llm_call creates a DecisionSnapshot containing inputs, outputs, model parameters, and execution context.
Configuration
from briefcase import configure
configure( storage_backend="sqlite", database_path="./decisions.db", enable_otel=True,)Extras
Install only what you need. See Installation for the full extras table.
Lazy Imports
Extras use lazy imports. If you try to use a feature without its extra installed, you get a clear error:
ImportError: briefcase.replay requires the 'replay' extra.Install it with: pip install briefcase-ai[replay]