opik
Comet tool for logging and evaluating LLM traces
What it is and what it does
Opik is a Python SDK and full-stack platform for observing, evaluating, and optimizing LLM applications and AI agents. It wraps functions with a `@track` decorator to automatically log traces of LLM calls, nested function calls, and agent activity, capturing full execution trees for multi-step workflows. The platform includes evaluation tools—datasets, experiments, and LLM-as-a-judge metrics—for testing hallucinations, moderation, and RAG quality. It also provides prompt management, a playground for experimentation, CI/CD integration via pytest, and production dashboards for monitoring feedback scores and token usage.
The package is built by Comet and released under Apache 2.0, meaning you can self-host the entire backend in your own infrastructure. It supports modern Python versions (3.10–3.14) and integrates with popular LLM frameworks. The SDK depends on litellm, openai, pydantic, httpx, and other standard libraries for tracing, configuration, and API communication.
Use it for:
- Log and inspect full execution traces of multi-step agents and LLM pipelines during development and in production.
- Evaluate LLM outputs for hallucinations, factual accuracy, and moderation using LLM-as-a-judge metrics.
- Test RAG systems by measuring answer relevance and context precision across datasets and experiments.
- Integrate LLM evaluation into CI/CD pipelines using pytest to validate prompts and models on every commit.
- Monitor production LLM applications by tracking trace counts, token usage, and feedback scores over time.
- Manage and version prompts, then experiment with different models and parameters in a shared playground.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Opik is an open-source LLM observability and evaluation platform that logs traces of LLM calls, agents, and pipelines, then evaluates them with datasets, experiments, and LLM-as-a-judge metrics.
Yes. Opik is actively maintained with no known vulnerabilities and offers low install friction. It is genuinely open-source (Apache 2.0) with a self-hostable full platform, not just a client SDK. If you are building LLM agents or need observability and evaluation for LLM applications, this is a solid choice—especially if you want to avoid vendor lock-in or need to keep traces within your own infrastructure.
Install
opik on PyPI
pip
pip install opikuv
uv add opikpoetry
poetry add opikInstalling opik
Before you install
Low install friction with a pure-Python wheel. Active maintenance with a recent release. Requires Python 3.10+. Depends on 19 runtime packages including litellm, openai, and pydantic, which are widely used and stable.
License in practice
Apache 2.0 licensed and permissive. The full platform—server backend, web application, tracing, evaluation, and prompt management—is free to self-host with no data leaving your environment, not just the client SDK.
Quickstart
pip install opik
opik configure
from opik import track
@track
def my_function(input: str) -> str:
return input
my_function("test")
Requires Python 3.10 or later. The `opik configure` step sets up connection to a backend (cloud or self-hosted); without it, tracing may not persist.
Verify before relying
- Whether the self-hosted platform deployment requires additional system dependencies or infrastructure beyond the Python package.
- Performance characteristics and scalability limits when self-hosting at scale (the description mentions 40M+ traces/day capability).
- Whether all integrations mentioned (Google ADK, Autogen, Flowise AI) are included in this package version or require separate setup.
Package facts
| License | Apache 2.0 License (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 19 — boto3-stubs, click, httpx, rapidfuzz, litellm, openai, pydantic-settings, pydantic, pytest, rich, sentry_sdk, tenacity, tqdm, uuid6, jinja2, watchfiles, tree-sitter, tree-sitter-javascript, tree-sitter-typescript |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,695,539/month — #2,523 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opik-2.2.29-py3-none-any.whl
Keywords: opik
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
arize-phoenixPhoenix is an open-source AI observability…
unclear · top 5,000 on PyPI
langfuseLangfuse is a Python SDK for observability,…
permissive · top 1,000 on PyPI
mlflow-tracingInstrument GenAI applications with distributed…
permissive · top 1,000 on PyPI
trulensTruLens instruments LLM applications to trace…
permissive · top 15,000 on PyPI
traceloop-sdkTraceloop SDK instruments LLM applications to…
permissive · top 5,000 on PyPI
mlflowMLflow is an open-source platform for managing…
permissive · top 1,000 on PyPI
judgevalJudgeval is an SDK for tracing and evaluating…
permissive · top 15,000 on PyPI
promptflow-devkitProvides a development toolkit for building,…
permissive · top 15,000 on PyPI
regopyregopy wraps the Open Policy Agent's Rego…
permissive · top 15,000 on PyPI
evidentlyEvidently evaluates, tests, and monitors ML and…
permissive · top 5,000 on PyPI