watch_anthropic wraps any client that exposes messages.create, the Anthropic
SDK shape. It is duck-typed, so the Sakshi SDK does not depend on the anthropic
package: it wraps the client you already hold.
Install
Wrap the client
sakshi
and agent_id are created.
What gets recorded
Each message inside a witness session lands anllm_call step, and the served
model identity auto-fills (para-56):
- The provider, recorded as
anthropic. model_requestedversusmodel_served, so a silent model swap is visible.- The response id and the stop reason.
- Input and output token usage.
- The call latency.
- With content capture on, the last message you sent and the first text block of
the response, each truncated to
content_limit.
Capture options
capture_contentdefaults toTrue. Content capture is safe by design: the platform tokenizes PII at ingest, before storage or hashing. Set it toFalsefor a minimal-capture deployment where only metadata, tokens, and identity are recorded.content_limitcaps how much of each message and response is stored. The default is 1000 characters.
A call made outside a witness session passes through untouched and is not
recorded. Recording is fail-open: it never breaks or delays the message call.
Full SDK reference
The client, the witness session, and enforcement.

