opik

comet-mlApache-2.0活跃维护

面向 LLM 应用、RAG 和 Agent 工作流的可观测与评测平台,提供全链路追踪、自动评估和生产级监控看板,帮团队定位问题并持续优化效果。

Debug, evaluate, and monitor your LLM applications, RAG systems, and agentic workflows with comprehensive tracing, automated evaluations, and production-ready dashboards.

2.2.143发布于 2026-11-06 08:48 UTC23,298star +46 / 7 天1,938fork同步于 2026-11-10 11:23 UTC

怎么上手

由 README 提炼,执行前请确认
pip install opik
opik configure
硬件要求按 README 说明

README 未说明具体硬件要求;自托管通过 Docker 容器运行,另有 Kubernetes/Helm 部署方式

有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

开源 LLM 可观测与评测平台,追踪 Agent 调用、跑自动化评估并做生产监控

面向 LLM 应用、RAG 和 Agent 工作流的可观测与评测平台,提供全链路追踪、自动评估和生产级监控看板,帮团队定位问题并持续优化效果。

核心能力

  • 用完整 trace 树追踪多步 Agent 与工具调用
  • 支持 LLM-as-a-judge 指标检测幻觉、审核与 RAG 评估
  • 用数据集与实验自动化评测 LLM 应用
  • 提供 PyTest 集成把评测接入 CI/CD 流水线
  • 内置 Prompt Playground 调试提示词与模型

容易踩的坑

自托管需先启动 Docker 容器(./opik.sh),默认访问 localhost:5173;SDK 需先运行 opik configure 配置服务地址或 API key;本地自托管可在代码中调用 opik.configure(use_local=True)

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本2.2.143
  1. 2.2.143最新正式版2026-11-06 · 2026-11-06 08:48 UTC

    What's Changed

    Full Changelog: https://github.com/comet-ml/opik/compare/2.2.142...2.2.143

  2. 2.2.1422026-11-05 · 2026-11-05 14:10 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/comet-ml/opik/compare/2.2.141...2.2.142

  3. 2.2.1412026-11-05 · 2026-11-05 11:09 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/comet-ml/opik/compare/2.2.140...2.2.141

  4. 2.2.1402026-11-04 · 2026-11-04 14:12 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/comet-ml/opik/compare/2.2.139...2.2.140

  5. 2.2.1392026-11-03 · 2026-11-03 16:40 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/comet-ml/opik/compare/2.2.138...2.2.139

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Python SDK License Build

    Opik platform screenshot (thumbnail)

    🚀 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 🚀

    ⚡ Quick Start

    Install the Python SDK and configure it:

    pip install opik
    opik configure
    

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

    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.

    Connect your coding agent

    Let Claude Code, Cursor, VS Code Copilot, Codex or opencode read your traces, score outputs and run evaluations from chat. One command sets it up. It needs uv and no SDK:

    uvx opik mcp configure
    

    Add to Cursor Install in VS Code

    The badges and the add-mcp fallback below target Opik Cloud; the command above also handles self-hosted deployments. Other MCP clients on Opik Cloud: npx add-mcp https://www.comet.com/opik/api/v1/mcp --name opik-mcp. Details, troubleshooting and FAQ are in the MCP server guide.

    📊 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 itselfYes, 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 LangChainYesYesYesYesYes

    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.

    ❓ 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.

    🛠️ Opik Server Installation

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

    Option 1: Comet.com Cloud (Easiest & Recommended)

    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:

    # 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:

    # 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"
    

    Installation Script Options

    The opik.sh and opik.ps1 scripts support the following options:

    # 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
    
    # Build the containers from source before starting
    ./opik.sh --build
    
    # Check that all containers are healthy
    ./opik.sh --verify
    
    # Stop all containers
    ./opik.sh --stop
    
    # Stop all containers and remove all Opik data volumes
    # WARNING: ALL OPIK DATA WILL BE LOST
    ./opik.sh --clean
    
    # Show all available options
    ./opik.sh --help
    

    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.

    Kubernetes

    💻 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 and TypeScript, plus first-party OpenTelemetry support: any language with an OpenTelemetry SDK — including Java, Ruby, and .NET — can send traces to Opik. 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:

    # 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):

    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.

    📝 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
    Claude CodeLog traces for Claude Code sessions via the Opik pluginGitHub
    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
    MCP Server (opik-mcp)Drive Opik from Claude Code, Cursor, or VS Code via Model Context ProtocolDocumentation
    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
    TrueFoundryLog traces for TrueFoundry AI Gateway LLM callsDocumentation
    TypeSafe AILog traces for TypeSafe AI (Jev) System One 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:

    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.

    🧑‍⚖️ 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:

    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.

    🔍 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.

    ⭐ 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.

    🤝 Contributing

    There are many ways to contribute to Opik:

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