SDK reference · Python SDK
prov.trace
prov.trace in the Python SDK: 7 methods. Trace.
Methods
compare
prov.trace.compare(a: str, b: str, pattern: Optional[str] = …) -> AnyTwo runs of one prompt side by side (canary + activation delta).
Calls GET /v1/trace/compare.
health
prov.trace.health() -> AnyCalls GET /v1/trace/health.
check
prov.trace.check(trace_id: str, thresholds: Optional[dict] = …, session: Optional[dict] = …, max_age_s: Optional[int] = …, predict: Optional[list] = …, explain: Optional[str] = …) -> AnyAllow | flag | block for a hosted traced inference or a sidecar reading, decided by the account's Trace rules at stage completion.
Calls POST /v1/trace/check.
assess
prov.trace.assess(**params: Any = …) -> AnyAssess an agent's action before it runs (POST /v1/trace/assessments); the raw call under guard_tool.
guard_tool
prov.trace.guard_tool(action: dict, fn: Any, **opts: Any = …) -> AnyAssess action and run fn only on allow; when Provenance can't answer, pay, send and delete never run, write is blocked and read runs unchecked (on_unavailable changes the last two).
guard
prov.trace.guard(fn: Any, thresholds: Optional[dict] = …, session: Optional[dict] = …, preflight: Optional[bool] = …, predict: Optional[list] = …) -> AnyWrap fn so it only sees a completion the account's Trace rules let through.
models
prov.trace.models() -> AnyPublic models + this account's private registry builds.
Calls GET /v1/trace/models.