Skip to content

External Data Tracking

Install

Terminal window
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

OptionDefaultDescription
record_responsesFalseStore full API responses
hash_responsesTrueStore response hashes for drift detection