Skip to main content
The @know-your-ai SDK is a TypeScript toolkit for monitoring, tracing, evaluating, and securing AI model interactions. It follows a modular architecture with five packages that work together or independently.

Packages

Requirements

  • Node.js >= 18
  • TypeScript (optional but recommended) — all packages ship with .d.ts type definitions
  • ESM and CommonJS are both supported

Installation

Quick start

1. Get your DSN

Go to Settings → API Keys in the Know Your AI dashboard and copy your DSN. It looks like:

2. Initialize the SDK

3. Instrument your AI client

That’s it. Requests, tokens, latency, cost, and errors are now tracked in your monitoring dashboard.

Configuration reference

All configuration is passed to KnowYourAI.init():

What’s next

Monitoring

Track requests, tokens, cost, and latency in production.

Tracing

Visualize multi-step AI agent interactions as span trees.

Firewall

Block dangerous inputs and flag risky outputs in real time.

Evaluate

Run security evaluations programmatically.