instrument-typescript
Installation
SKILL.md
Instrument TypeScript Agents
Prerequisite: npm install opik (get API key)
Basic Tracing
import { Opik } from "opik";
const client = new Opik({ projectName: process.env.OPIK_PROJECT_NAME || "my-agent" });
const trace = client.trace({ name: "my-agent", input: { query } });
const span = trace.span({ name: "llm-call", type: "llm" });
span.end({ output: { response } });
trace.end({ output: { response } });
await client.flush();