Installation
Quick Start
SentrialClient
constructor(config)
createSession(params)
Create a new tracking session. Returns string | null (null when failSilently is true and the request fails).
trackToolCall(params)
Track a tool call event.
trackDecision(params)
Track an agent decision.
completeSession(params)
Complete a session with final metrics.
trackError(params)
Track an error event.
begin(params) / interaction.finish()
Simplified API that auto-manages sessions. Returns an Interaction object.
LLM Auto-Wrappers
Automatically track all LLM calls with token counts, cost, and latency.wrapAnthropic(client), wrapGoogle(model), wrapLLM(client) (auto-detect).

