Getting started

Getting started

Quick start

Two lines to start tracing every LLM call — tokens, latency, cost, and anomaly scores captured automatically.

ts
import { Tracer } from '@cernova/sdk'
import Anthropic from '@anthropic-ai/sdk'

const tracer    = new Tracer({ apiKey: 'trace_...' })
const anthropic = tracer.wrapAnthropic(new Anthropic())

// Use exactly like the normal Anthropic client
const response = await anthropic.messages.create({
  model: 'claude-haiku-4-5-20251001',
  max_tokens: 256,
  messages: [{ role: 'user', content: 'Hello!' }],
})
// Every call is now traced in your dashboard
Find your API key in the dashboard under Settings → API Key for each project.

Core concepts

ProjectAn isolated workspace with its own API key, dashboard, and alert config. One API key = one project.
RunA single end-to-end execution of your AI pipeline — one user request handled by multiple steps. All steps sharing a run_id are grouped together.
StepA single LLM call within a run. Named with _trace: { stepName } (TS) or config metadata (Python). Captures model, tokens, latency, cost, and output.
ProfileThe semantic identity of a step — derived from its system prompt embedding. Stable across renames and minor prompt tweaks. Foundation of per-step baselines.

Installation

bash
npm install @cernova/sdk

No background processes, no native dependencies. Works in Node.js 18+ and any runtime with the Fetch API.