Back to Opik

README

README.md

2.2.0-606737.7 KB
Original Source
<div align="center"><b><a href="README.md">English</a> | <a href="readme_CN.md">简体中文</a> | <a href="readme_JP.md">日本語</a> | <a href="readme_PT_BR.md">Português (Brasil)</a> | <a href="readme_KO.md">한국어</a> <a href="readme_ES.md">Español</a> | <a href="readme_FR.md">Français</a> | <a href="readme_DE.md">Deutsch</a> | <a href="readme_RU.md">Русский</a> | <a href="readme_AR.md">العربية</a> | <a href="readme_HI.md">हिन्दी</a> | <a href="readme_TR.md">Türkçe</a></b></div> <h1 align="center" style="border-bottom: none"> <div> <a href="https://www.comet.com/site/products/opik/?from=llm&utm_source=opik&utm_medium=github&utm_content=header_img&utm_campaign=opik"><picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/comet-ml/opik/refs/heads/main/apps/opik-documentation/documentation/static/img/logo-dark-mode.svg"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/comet-ml/opik/refs/heads/main/apps/opik-documentation/documentation/static/img/opik-logo.svg">
    </picture></a>
    

    Opik: Open-Source LLM Observability, Evaluation & AI Agent Tracing
</div>
</h1> <p align="center"> <b>Opik is the open-source LLM observability and evaluation platform for AI agent tracing, LLM evaluation, prompt management, and production monitoring.</b> Built by <a href="https://www.comet.com?from=llm&utm_source=opik&utm_medium=github&utm_content=what_is_opik_link&utm_campaign=opik">Comet</a>. Apache-2.0 licensed, free to self-host the full platform, with 20,000+ GitHub stars. </p> <div align="center">

<!-- [![Quick Start](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/comet-ml/opik/blob/main/apps/opik-documentation/documentation/docs/cookbook/opik_quickstart.ipynb) --> </div> <p align="center"> <a href="https://www.comet.com/site/products/opik/?from=llm&utm_source=opik&utm_medium=github&utm_content=website_button&utm_campaign=opik"><b>Website</b></a> • <a href="https://chat.comet.com"><b>Slack Community</b></a> • <a href="https://x.com/Cometml"><b>Twitter</b></a> • <a href="https://www.comet.com/docs/opik/changelog"><b>Changelog</b></a> • <a href="https://www.comet.com/docs/opik/?from=llm&utm_source=opik&utm_medium=github&utm_content=docs_button&utm_campaign=opik"><b>Documentation</b></a> </p> <p align="center"><sub>Last updated: 2026-07-17</sub></p> <div align="center" style="margin-top: 1em; margin-bottom: 1em;"> <a href="#-what-is-opik">🚀 What is Opik?</a> • <a href="#-quick-start">⚡ Quick Start</a> • <a href="#-how-opik-compares">📊 How Does Opik Compare?</a> • <a href="#-frequently-asked-questions">❓ FAQ</a> • <a href="#%EF%B8%8F-opik-server-installation">🛠️ Opik Server Installation</a> • <a href="#-opik-client-sdk">💻 Opik Client SDK</a> • <a href="#-logging-traces-with-integrations">📝 Logging Traces</a>

<a href="#-llm-as-a-judge-metrics">🧑‍⚖️ LLM as a Judge</a><a href="#-evaluating-your-llm-application">🔍 Evaluating your Application</a><a href="#-star-us-on-github">⭐ Star Us</a><a href="#-contributing">🤝 Contributing</a>

</div>

<a id="-what-is-opik"></a>

🚀 What is Opik?

Opik covers the full LLM application lifecycle, from the first trace in development to production monitoring, for teams building LLM apps and AI agents. Key offerings include:

  • AI Agent Tracing & Observability: Deep tracing of LLM calls, conversation logging, and agent activity, with full trace trees for multi-step agents and tool calls.
  • LLM Evaluation: Datasets, experiments, and LLM-as-a-judge metrics for hallucination detection, moderation, and RAG assessment.
  • Prompt & Agent Optimization: The Opik Agent Optimizer SDK to improve prompts and agents.
  • Production-Ready Monitoring: Scalable dashboards and online evaluation rules.
  • Opik Guardrails: Features to help you implement safe and responsible AI practices.
  • CI/CD Evaluation: A PyTest integration to test LLM pipelines on every commit.

Key capabilities include:

  • Development & Tracing:

    • Track all LLM calls and traces with detailed context during development and in production (Quickstart).
    • Extensive 3rd-party integrations for easy observability: Seamlessly integrate with a growing list of frameworks, supporting many of the largest and most popular ones natively (including recent additions like Google ADK, Autogen, and Flowise AI). (Integrations)
    • Annotate traces and spans with feedback scores via the Python SDK or the UI.
    • Experiment with prompts and models in the Prompt Playground.
  • Evaluation & Testing:

  • Production Monitoring & Optimization:

    • Log high volumes of production traces: Opik is designed for scale (40M+ traces/day).
    • Monitor feedback scores, trace counts, and token usage over time in the Opik Dashboard.
    • Utilize Online Evaluation Rules with LLM-as-a-Judge metrics to identify production issues.
    • Leverage Opik Agent Optimizer and Opik Guardrails to continuously improve and secure your LLM applications in production.

Who it's for: ML engineers building LLM-powered agents, AI teams moving from prototype to production, and engineering teams that need open-source, self-hostable observability they can run in their own environment.

Why open source matters here: Opik is Apache-2.0 licensed and free to self-host: the full platform, backend included, not just a client SDK. The repository includes the server backend, web application, tracing, datasets, experiments, evaluations, prompt management, online evaluation, and agent optimization components, all under Apache-2.0. You can run LLM observability inside your own infrastructure with no data leaving your environment and no Enterprise sales conversation required.

[!TIP] If you are looking for features that Opik doesn't have today, please raise a new Feature request 🚀

<a id="-quick-start"></a>

⚡ Quick Start

Install the Python SDK and configure it:

bash
pip install opik
opik configure

Wrap any function with the @track decorator to start logging traces:

python
from opik import track

@track
def my_function(input: str) -> str:
    return input

Every call to my_function is now logged to Opik, including nested calls, so this works for full agent and pipeline traces, not just single LLM calls. See the Quickstart guide for the TypeScript SDK and other setup options.

<a id="-how-opik-compares"></a>

📊 How Does Opik Compare?

Opik competes in the LLM observability / AI agent evaluation category alongside LangSmith, Arize (Phoenix and Arize AX), Weights & Biases (Weave), Langfuse, and Braintrust.

CapabilityOpikLangSmithPhoenixArize AXWeights & Biases (Weave)LangfuseBraintrust
Open sourceYes, Apache-2.0 (full platform)NoSource-available (Elastic License 2.0, not OSI-approved)NoOpen-source SDK/toolkit; self-managed platform requires a commercial licenseMIT-licensed core platform; commercial enterprise modulesNo
Self-hosted deploymentYesEnterprise onlyYesEnterprise onlyEnterprise only for Weave itself*Yes, coreEnterprise only
Free tier available (cloud or self-hosted)Yes, bothYes, cloudYes, self-hostedYes, cloudYes, cloudYes, bothYes, cloud
Agent / multi-step tracingYesYesYesYesYesYesYes
LLM-as-a-judge evaluationYesYesYesYesYesYesYes
Prompt managementYesYesPartlyPartlyPartlyYesYes
Framework-agnosticYesPartly, built around LangChain**YesYesYesYesYes

Created by: Opik (Comet), LangSmith (LangChain), Phoenix and Arize AX (Arize AI), Weave (Weights & Biases, acquired by CoreWeave in 2025), Langfuse (joined ClickHouse in 2026), Braintrust (independent). Every competitor here has some accessible free way to start, cloud or self-hosted, but only Opik, Phoenix, and Langfuse's core let you run the whole thing yourself for free; the rest gate that specifically to an Enterprise plan, confirmed directly on each vendor's own current pricing page. *W&B does have a free, self-hosted "Personal" tier, but per its own pricing page it covers classic experiment tracking only (runs, registry, lineage). Weave's LLM tracing and evaluation features aren't included, and per W&B's own Weave self-hosting docs, running Weave itself outside the cloud still requires a separate commercial license. **LangSmith's own docs describe it as framework-agnostic and it does work outside LangChain, but its tooling, docs, and integration depth are built around the LangChain ecosystem first; expect more setup outside it.

When teams choose Opik: Opik's full observability, evaluation, and optimization platform is Apache-2.0 licensed and free to self-host. Unlike closed platforms whose self-hosted deployment requires an Enterprise plan, Opik can be deployed without a commercial license, and it's framework-agnostic so it won't lock you into a single agent ecosystem. See the table above for where self-hosting and licensing differ across alternatives.

<a id="-frequently-asked-questions"></a>

❓ Frequently Asked Questions

Is Opik open source?

Opik is licensed under Apache 2.0. Its server, web application, and core observability and evaluation capabilities can be self-hosted without a commercial license.

Can I self-host Opik?

Yes. Opik can be deployed locally or in your own infrastructure using the documented self-hosting options.

Does Opik support AI agent tracing?

Yes. Opik captures multi-step traces containing LLM calls, tool executions, retrieval steps, and other agent activity.

Does Opik support LLM evaluation?

Yes. Opik supports datasets, experiments, code-based metrics, LLM-as-a-judge evaluation, and online evaluation.

Is Opik tied to a specific agent framework?

No. Opik is framework-agnostic and supports its SDK, OpenTelemetry, and framework-specific integrations.

<a id="%EF%B8%8F-opik-server-installation"></a>

🛠️ Opik Server Installation

Get your Opik server running in minutes. Choose the option that best suits your needs:

Access Opik instantly without any setup. Ideal for quick starts and hassle-free maintenance.

👉 Create your free Comet account

Option 2: Self-Host Opik for Full Control

Deploy Opik in your own environment. Choose between Docker for local setups or Kubernetes for scalability.

Self-Hosting with Docker Compose (for Local Development & Testing)

This is the simplest way to get a local Opik instance running. Note the new ./opik.sh installation script:

On Linux or Mac Environment:

bash
# Clone the Opik repository
git clone https://github.com/comet-ml/opik.git

# Navigate to the repository
cd opik

# Start the Opik platform
./opik.sh

On Windows Environment:

powershell
# Clone the Opik repository
git clone https://github.com/comet-ml/opik.git

# Navigate to the repository
cd opik

# Start the Opik platform
powershell -ExecutionPolicy ByPass -c ".\\opik.ps1"

Service Profiles for Development

The Opik installation scripts now support service profiles for different development scenarios:

bash
# Start full Opik suite (default behavior)
./opik.sh

# Start only infrastructure services (databases, caches etc.)
./opik.sh --infra

# Start infrastructure + backend services
./opik.sh --backend

# Enable guardrails with any profile
./opik.sh --guardrails # Guardrails with full Opik suite
./opik.sh --backend --guardrails # Guardrails with infrastructure + backend

Use the --help or --info options to troubleshoot issues. Dockerfiles now ensure containers run as non-root users for enhanced security. Once all is up and running, you can now visit localhost:5173 on your browser! For detailed instructions, see the Local Deployment Guide.

Self-Hosting with Kubernetes & Helm (for Scalable Deployments)

For production or larger-scale self-hosted deployments, Opik can be installed on a Kubernetes cluster using our Helm chart. Click the badge for the full Kubernetes Installation Guide using Helm.

[!IMPORTANT] Version 1.7.0 Changes: Please check the changelog for important updates and breaking changes.

<a id="-opik-client-sdk"></a>

💻 Opik Client SDK

Opik provides a suite of client libraries and a REST API to interact with the Opik server. This includes SDKs for Python, TypeScript, and Ruby (via OpenTelemetry), allowing for seamless integration into your workflows. For detailed API and SDK references, see the Opik Client Reference Documentation.

Python SDK Quick Start

To get started with the Python SDK:

Install the package:

bash
# install using pip
pip install opik

# or install with uv
uv pip install opik

Configure the python SDK by running the opik configure command, which will prompt you for your Opik server address (for self-hosted instances) or your API key and workspace (for Comet.com):

bash
opik configure

[!TIP] You can also call opik.configure(use_local=True) from your Python code to configure the SDK to run on a local self-hosted installation, or provide API key and workspace details directly for Comet.com. Refer to the Python SDK documentation for more configuration options.

You are now ready to start logging traces using the Python SDK.

<a id="-logging-traces-with-integrations"></a>

📝 Logging Traces with Integrations

The easiest way to log traces is to use one of our direct integrations. Opik supports a wide array of frameworks, including recent additions like Google ADK, Autogen, AG2, and Flowise AI:

IntegrationDescriptionDocumentation
ADKLog traces for Google Agent Development Kit (ADK)Documentation
AG2Log traces for AG2 LLM callsDocumentation
Agent SpecLog traces for Agent Spec callsDocumentation
AIsuiteLog traces for aisuite LLM callsDocumentation
AgnoLog traces for Agno agent orchestration framework callsDocumentation
AnthropicLog traces for Anthropic LLM callsDocumentation
AutogenLog traces for Autogen agentic workflowsDocumentation
BedrockLog traces for Amazon Bedrock LLM callsDocumentation
BeeAI (Python)Log traces for BeeAI Python agent framework callsDocumentation
BeeAI (TypeScript)Log traces for BeeAI TypeScript agent framework callsDocumentation
BytePlusLog traces for BytePlus LLM callsDocumentation
Cloudflare Workers AILog traces for Cloudflare Workers AI callsDocumentation
CohereLog traces for Cohere LLM callsDocumentation
CrewAILog traces for CrewAI callsDocumentation
CursorLog traces for Cursor conversationsDocumentation
DeepSeekLog traces for DeepSeek LLM callsDocumentation
DifyLog traces for Dify agent runsDocumentation
DSPYLog traces for DSPy runsDocumentation
Fireworks AILog traces for Fireworks AI LLM callsDocumentation
Flowise AILog traces for Flowise AI visual LLM builderDocumentation
Gemini (Python)Log traces for Google Gemini LLM callsDocumentation
Gemini (TypeScript)Log traces for Google Gemini TypeScript SDK callsDocumentation
GroqLog traces for Groq LLM callsDocumentation
GuardrailsLog traces for Guardrails AI validationsDocumentation
HaystackLog traces for Haystack callsDocumentation
HarborLog traces for Harbor benchmark evaluation trialsDocumentation
InstructorLog traces for LLM calls made with InstructorDocumentation
LangChain (Python)Log traces for LangChain LLM callsDocumentation
LangChain (JS/TS)Log traces for LangChain JavaScript/TypeScript callsDocumentation
LangGraphLog traces for LangGraph executionsDocumentation
LangflowLog traces for Langflow visual AI builderDocumentation
LiteLLMLog traces for LiteLLM model callsDocumentation
LiveKit AgentsLog traces for LiveKit Agents AI agent framework callsDocumentation
LlamaIndexLog traces for LlamaIndex LLM callsDocumentation
MastraLog traces for Mastra AI workflow framework callsDocumentation
Microsoft Agent Framework (Python)Log traces for Microsoft Agent Framework callsDocumentation
Microsoft Agent Framework (.NET)Log traces for Microsoft Agent Framework .NET callsDocumentation
Mistral AILog traces for Mistral AI LLM callsDocumentation
n8nLog traces for n8n workflow executionsDocumentation
Novita AILog traces for Novita AI LLM callsDocumentation
OllamaLog traces for Ollama LLM callsDocumentation
OpenAI (Python)Log traces for OpenAI LLM callsDocumentation
OpenAI (JS/TS)Log traces for OpenAI JavaScript/TypeScript callsDocumentation
OpenAI AgentsLog traces for OpenAI Agents SDK callsDocumentation
OpenClawLog traces for OpenClaw agent runsDocumentation
OpenRouterLog traces for OpenRouter LLM callsDocumentation
OpenTelemetryLog traces for OpenTelemetry supported callsDocumentation
OpenWebUILog traces for OpenWebUI conversationsDocumentation
PipecatLog traces for Pipecat real-time voice agent callsDocumentation
PredibaseLog traces for Predibase LLM callsDocumentation
Pydantic AILog traces for PydanticAI agent callsDocumentation
RagasLog traces for Ragas evaluationsDocumentation
Semantic KernelLog traces for Microsoft Semantic Kernel callsDocumentation
SmolagentsLog traces for Smolagents agentsDocumentation
Spring AILog traces for Spring AI framework callsDocumentation
Strands AgentsLog traces for Strands agents callsDocumentation
Together AILog traces for Together AI LLM callsDocumentation
Vercel AI SDKLog traces for Vercel AI SDK callsDocumentation
VoltAgentLog traces for VoltAgent agent framework callsDocumentation
WatsonXLog traces for IBM watsonx LLM callsDocumentation
xAI GrokLog traces for xAI Grok LLM callsDocumentation

[!TIP] If the framework you are using is not listed above, feel free to open an issue or submit a PR with the integration.

If you are not using any of the frameworks above, you can also use the track function decorator to log traces:

python
import opik

opik.configure(use_local=True) # Run locally

@opik.track
def my_llm_function(user_question: str) -> str:
    # Your LLM code here

    return "Hello"

[!TIP] The track decorator can be used in conjunction with any of our integrations and can also be used to track nested function calls.

<a id="-llm-as-a-judge-metrics"></a>

🧑‍⚖️ LLM as a Judge metrics

The Python Opik SDK includes a number of LLM as a judge metrics to help you evaluate your LLM application. Learn more about it in the metrics documentation.

To use them, simply import the relevant metric and use the score function:

python
from opik.evaluation.metrics import Hallucination

metric = Hallucination()
score = metric.score(
    input="What is the capital of France?",
    output="Paris",
    context=["France is a country in Europe."]
)
print(score)

Opik also includes a number of pre-built heuristic metrics as well as the ability to create your own. Learn more about it in the metrics documentation.

<a id="-evaluating-your-llm-application"></a>

🔍 Evaluating your LLM Applications

Opik allows you to evaluate your LLM application during development through Datasets and Experiments. The Opik Dashboard offers enhanced charts for experiments and better handling of large traces. You can also run evaluations as part of your CI/CD pipeline using our PyTest integration.

<a id="-star-us-on-github"></a>

⭐ Star Us on GitHub

If you find Opik useful, please consider giving us a star! Your support helps us grow our community and continue improving the product.

<a id="-contributing"></a>

🤝 Contributing

There are many ways to contribute to Opik:

To learn more about how to contribute to Opik, please see our contributing guidelines.