OOtis Docs

Otis SDK

TypeScript SDK for tracing AI applications, custom functions, and user events.

The Otis SDK (@runotis/sdk) traces AI operations, custom functions, and user events from your app. It works in Node.js, serverless runtimes, and the browser, with first-class Next.js support.

Instrument your products with AI

Otis provides several paths to integrating the SDK and instrumenting your apps using coding agents.

Framework integration guides

Start here to manually integrate the SDK. Each guide is self-contained — follow it end to end and your integration will be correct the first time.

SDK Reference

Deeper details on each part of the SDK. Read these when you want to go beyond what the integration guide covers.

What gets captured

Otis is privacy-first

By default, Otis redacts Personally Identifiable Information (PII), and user, session and other identifiers are pseudo-anonymized. Otis also makes it simple to follow consent processes for browser cookies to ensure GDPR compliance.

With otis.wrap(ai) around your AI framework:

  • Prompts and responses (user-facing messages, not internal system prompts unless you enable it)
  • Model ID and provider
  • Token usage (input, output, cache)
  • Tool calls with inputs and outputs
  • Streaming metrics — time to first token, total duration, tokens per second
  • Errors with stack traces

With context passed to wrap() or withContext():

  • User, session, chat, and document IDs
  • Group memberships (e.g. company, team)
  • Custom metadata

With sendEvent(), identifyUser(), sendFeedbackSignal():

  • Custom events (document exports, feature usage)
  • User identity and persistent properties
  • Feedback linked to specific AI responses

On this page