PHPackages                             klipitkas/opik-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. klipitkas/opik-php

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

klipitkas/opik-php
==================

Opik PHP SDK - LLM observability and evaluation platform

v0.20.1(2mo ago)327MITPHPPHP ^8.1CI passing

Since Dec 7Pushed 2mo agoCompare

[ Source](https://github.com/klipitkas/opik-php)[ Packagist](https://packagist.org/packages/klipitkas/opik-php)[ Docs](https://github.com/klipitkas/opik-php)[ RSS](/packages/klipitkas-opik-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (20)Used By (0)

Opik PHP SDK
============

[](#opik-php-sdk)

> PHP SDK for [Opik](https://www.comet.com/docs/opik/) - an LLM observability and evaluation platform.

**NOTE**: This is a community-maintained SDK, not an official Comet ML product. For official SDKs, see [Python](https://github.com/comet-ml/opik/tree/main/sdks/python) and [TypeScript](https://github.com/comet-ml/opik/tree/main/sdks/typescript).

Table of Contents
-----------------

[](#table-of-contents)

- [SDK Comparison](#sdk-comparison)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Configuration](#configuration)
- [Features](#features)
    - [Tracing](#tracing)
    - [Feedback Scores](#feedback-scores)
    - [Threads](#threads)
    - [Datasets](#datasets)
    - [Experiments](#experiments)
    - [Prompts](#prompts)
    - [Attachments](#attachments)
- [API Reference](#api-reference)
- [Development](#development)

---

SDK Comparison
--------------

[](#sdk-comparison)

This table compares feature coverage between the official SDKs and this community PHP SDK.

CategoryFeaturePythonTypeScriptPHPNotes**Tracing**Traces &amp; Spans✅✅✅Full supportNested Spans✅✅✅Full supportSearch (OQL)✅✅✅Full supportSpan Types✅✅✅Full supportUsage Tracking✅✅✅Full supportCost Calculation✅✅✅User-provided pricing`@track` Decorator✅✅❌PHP lacks decorators**Feedback**Feedback Scores✅✅✅Full supportBatch Feedback✅✅✅Full supportThreads✅❌✅Full support**Datasets**CRUD Operations✅✅✅Full supportFlexible Schema✅✅✅Full supportJSON Import/Export✅✅✅Full support**Experiments**Create &amp; Manage✅✅✅Full supportLog Items✅✅✅Full support**Prompts**Text Prompts✅✅✅Full supportChat Prompts✅✅✅Full supportVersion History✅✅✅Full support**Attachments**Upload/Download✅❌✅Full support**Evaluation**Heuristic Metrics✅✅✅ExactMatch, Contains, RegexMatch, IsJson, Equals, LevenshteinRatioLLM Judge Metrics✅✅❌Not implemented`evaluate()`✅✅✅Full support**Integrations**OpenAI✅✅❌Not implementedLangChain✅✅❌Not implementedOther Frameworks✅✅❌Not implemented**Advanced**Guardrails✅❌❌Not implementedSimulation✅❌❌Not implementedCLI Commands✅❌❌Not implemented### Coverage Summary

[](#coverage-summary)

SDKCore FeaturesAdvanced FeaturesOverall**Python** (Official)100%100%100%**TypeScript** (Official)~90%~60%~80%**PHP** (Community)~95%~25%**~75%**### What's Missing in PHP SDK

[](#whats-missing-in-php-sdk)

**High Priority (Core Functionality):**

- LLM Judge Metrics (AnswerRelevance, Hallucination, etc.)

**Medium Priority (Integrations):**

- OpenAI integration for automatic tracing
- Other LLM provider integrations

**Low Priority (Advanced):**

- Guardrails (PII detection, topic filtering)
- Simulation framework
- CLI commands
- Local recording for testing

### Contributing

[](#contributing)

Contributions are welcome! If you'd like to help implement missing features, please see the [Development](#development) section.

---

Installation
------------

[](#installation)

**Requirements:** PHP 8.1+, Composer

```
composer require klipitkas/opik-php

```

---

Quick Start
-----------

[](#quick-start)

```
