opik — Open-source LLM Observability, Evaluation & Optimization
Opik (built by Comet) streamlines the
entire LLM application lifecycle: deep tracing of LLM calls and agent
activity, LLM-as-a-judge evaluation, experiment management, production
monitoring at scale (40M+ traces/day), plus the Opik Agent Optimizer and
Opik Guardrails. This skill is the routing-first wrapper — it picks the
right deployment mode, wires the SDK, and drives the trace → evaluate →
monitor → optimize loop.
When to use this skill
- The user asks to install or configure Opik (
pip install opik,
opik configure, ./opik.sh)
- The user wants tracing for LLM calls or agents — via
@opik.trackor a
framework integration (OpenAI, Anthropic, LangChain, LangGraph, LlamaIndex,
CrewAI, DSPy, Haystack, Ollama, Bedrock, Vercel AI SDK, Pydantic AI, …)
- The user wants LLM-as-a-judge metrics: hallucination detection, moderation,
answer relevance, context precision/recall for RAG
- The user wants Datasets + Experiments evaluation, or PyTest-integrated
LLM evaluation in CI/CD
- The user wants production LLM monitoring dashboards, online evaluation
rules, prompt playground experiments, agent/prompt optimization, or
guardrails
When not to use this skill
- The stack is LangSmith, not Opik → use
langsmith - The user needs generic service dashboards/alerts (non-LLM telemetry,
uptime, infra metrics) → use monitoring-observability
- The user wants offline dataset/KPI interpretation rather than LLM
tracing/eval plumbing → use data-analysis
- The user is doing root-cause log forensics on app/container logs →
use log-analysis
Prerequisites
| Requirement | Notes |
|-------------|-------|
| Python 3.8+ (SDK) | pip install opik or uv pip install opik |
| Docker + Docker Compose | Only for local self-hosting via ./opik.sh |
| Kubernetes + Helm | Only for scalable self-hosted deployments |
| Comet.com account | Only for the zero-setup cloud option |
Instructions
Step 1 — Choose the server mode
| Mode | When | How |
|------|------|-----|
| Comet.com cloud (easiest) | Quick start, no maintenance | Create a free account, get API key + workspace |
| Docker Compose (local) | Local dev & testing, full control | git clone https://github.com/comet-ml/opik.git && cd opik && ./opik.sh → UI at localhost:5173 |
| Kubernetes / Helm | Production-scale self-hosting | Upstream Helm chart guide |
Docker service profiles (development scenarios):
./opik.sh # full Opik suite (default)
./opik.sh --infra # infrastructure only (databases, caches)
./opik.sh --backend # infrastructure + backend services
./opik.sh --guardrails # enable guardrails with any profile
./opik.sh --help # troubleshooting
Windows: powershell -ExecutionPolicy ByPass -c ".\opik.ps1".
Step 2 — Install and configure the SDK
pip install opik # or: uv pip install opik
opik configure # prompts for server address (self-hosted) or API key + workspace (cloud)
Or configure in code:
import opik
opik.configure(use_local=True) # local self-hosted instance
TypeScript, and Ruby (via OpenTelemetry) SDKs are also available — see the
Step 3 — Log traces
Prefer a native integration when the framework is supported (50+ available:
ADK, AG2, Agno, Anthropic, Autogen, Bedrock, CrewAI, DSPy, Dify, Flowise,
Gemini, Haystack, Instructor, LangChain, LangGraph, LiteLLM, LlamaIndex,
Mastra, Ollama, OpenAI, OpenAI Agents, OpenRouter, OpenTelemetry, Pydantic AI,
Ragas, Semantic Kernel, Smolagents, Spring AI, Vercel AI SDK, WatsonX, …).