External Data Tracking
Install
pip install briefcase-ai[external]Quick Example
from briefcase.external import ExternalDataTracker
tracker = ExternalDataTracker()tracker.register("weather_api", url="https://api.weather.com/v1")tracker.register("stock_prices", url="https://api.stocks.com/v1")
with tracker.track(): result = my_agent.run(task)All external data fetched during execution is recorded in the DecisionSnapshot.
Architecture
flowchart LR
A["Agent"] --> B["ExternalDataTracker context"]
B --> C["Weather API"]
B --> D["Stock API"]
B --> E["Other sources"]
C & D & E --> F["Response hashes"]
F --> G["DecisionSnapshot"]
Key Classes
ExternalDataTracker— registers and monitors external data sources
Configuration
| Option | Default | Description |
|---|---|---|
record_responses | False | Store full API responses |
hash_responses | True | Store response hashes for drift detection |