instrument-typescript
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();
Entrypoint (Local Runner)
More from comet-ml/opik-skills
opik
Opik observability for LLM agents — Agent Configuration, Local Runner (opik connect), Test Suites, threads, integrations. Use for "configure my agent", "connect my agent", "evaluate my agent" or "integrate with Opik".
168instrument
Add Opik tracing to an existing codebase. Detects language (Python/TypeScript), identifies LLM frameworks, adds appropriate decorators and integrations, marks entrypoints, and wires up environment config. Use for "instrument my code", "add opik tracing", "add observability", or "trace my agent".
152agent-config
Opik Agent Configuration — Blueprints, get_agent_config() with selectors, environment tags, Prompt/ChatPrompt fields, deploy_to(), MaskIDs, and config lifecycle.
5agent-ops
Agent lifecycle — architecture, configuration (Blueprints), Local Runner, evaluation, threads, production monitoring. Use for "evaluate my agent", "connect my agent", "configure my agent", "add guardrails".
5opik-connect
Opik Connect (Local Runner) — pair your local agent with the Opik browser UI for Python and TypeScript.
5evaluation-suites
Opik Evaluation Suites — assertions, execution policies, CI integration. Replaces old Datasets API.
5