Skip to content

Quick Start

Install

Terminal window
pip install briefcase-ai

Capture a Decision

from briefcase import capture
@capture()
def summarize(text: str) -> str:
# call your LLM here
return llm.complete(text)
result = summarize("Quarterly earnings report...")

The @capture decorator records every call — inputs, outputs, model parameters, and timing — as a DecisionSnapshot.

Replay a Decision

from briefcase.replay import ReplayEngine
engine = ReplayEngine()
snapshot = engine.load("snapshot-id")
replayed = engine.replay(snapshot)

Check the Result

assert replayed.output == snapshot.output
print("Decision replayed successfully.")

That’s it. Every call to summarize is now recorded and replayable. Next, explore Installation for extras or Core Concepts to understand how snapshots work.