Reporting doesn’t gate the work.
The SDK is designed to fail open. A reporting failure should not prevent the AI call or replace its result. Telemetry errors are handled locally.
A start report before your AI call. A finish report after it. Sam receives the measurements that explain behaviour while your prompts and replies stay in your application.
See the integration shapeDescribe the job and review the checks Sam proposes. Then connect one feature in a test environment, starting with observe-only authority.
Report a start, run your AI call as usual, then report its finish. The reports go to the Sam platform. Your model call follows its existing route, and your prompts and replies stay in your application.
Send the call identity and locally measured input shape asynchronously.
Your prompt goes to your chosen model. The reply comes back to your application.
Send timing, outcome and available usage or shape measurements asynchronously.
// Illustrative pseudocode, not a published SDK API.
// sendStart / sendEnd enqueue metadata asynchronously.
async function runWithSam(input) {
const callId = crypto.randomUUID();
const started = performance.now();
let status = "error";
// 1. Report the start. Never send input itself.
void sendStart({
callId,
featureId: "nightly-digest",
inputBytes: new TextEncoder().encode(input).length
}).catch(handleTelemetryFailure);
try {
const reply = await yourAgent(input);
status = "ok";
return reply; // Your reply stays in your application.
} finally {
// 2. Report the finish, including failed calls.
void sendEnd({
callId,
status,
durationMs: performance.now() - started
}).catch(handleTelemetryFailure);
}
}
// Handle reporting failures locally; do not throw.
// Do not log or forward prompts, replies or raw errors.
function handleTelemetryFailure() {}
This is pseudocode to explain the boundary, not copy-and-paste SDK documentation. The reporting helpers represent non-blocking metadata delivery. Token counts and output-shape fields can be added from local measurements; no prompt or reply belongs in either payload.
The SDK is designed to fail open. A reporting failure should not prevent the AI call or replace its result. Telemetry errors are handled locally.
Asynchronous reporting can arrive late or be missing. Sam must distinguish incomplete visibility from a successful, healthy run.
Sam never sits between your application and your model. Your call goes straight to your provider or your own hardware, with your credentials, the way it does today.
The start report is sent and forgotten. Sam does its work while your model is generating, so the finish report gets its answer without holding anything up.
If Sam can’t be reached, your AI calls run and return as normal. You lose visibility for that time, and Sam shows the gap, but your work carries on.
The inspector SDK will measure each AI call inside your application and send the two reports for you. You see how your AI behaves on your customers’ devices. Your prompts stay yours. The SDK is coming. Until then, send the two reports directly, as shown above.
Timings, sizes, token counts and shape statistics are computed in your application. A fingerprint lets Sam compare patterns without receiving the text.
There is no code path that sends a prompt, a reply or conversation context. Only measurements, identifiers and the fingerprint leave your application.
Consent is built in. On someone else’s device, nothing is sent until that person agrees.
If reporting fails, your AI call still runs and returns its normal result. Telemetry errors are handled inside the SDK, not thrown into your code.
Use the same call identity for both reports. Check one successful call and one failed call. A missing finish report must not look like success.
Inspect both payloads. Include measurements and identifiers; exclude prompts, replies, conversation context and raw errors that could contain content.
Confirm your application still gets its normal result or error if telemetry delivery fails. Reporting must not replace the application’s outcome.
Check that Sam can name the feature, show the relevant evidence and identify the owner. Review the finding before expanding the watch.
Sam is in pilot. The example above explains the pattern; package names, installation commands and production SDK documentation are not published here yet.
Use the onboarding guide to prepare your feature description and work through the first connection.
Get startedRead our privacy promise