Metadata-Version: 2.4
Name: langfuse-omega
Version: 0.1.0
Summary: OmegaEngine governance integration for langfuse-omega
Project-URL: Homepage, https://omegaengine.ai
Project-URL: Repository, https://github.com/TheArkhitect/Omegaengine
Author-email: OmegaEngine <team@omegaengine.ai>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: ai-safety,governance,llm,omegaengine
Requires-Python: >=3.8
Requires-Dist: httpx>=0.24.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

<p align="center">
  <img src="logo.png" alt="OmegaEngine Logo" width="200" height="200">
</p>

<h1 align="center">langfuse-omega</h1>

<p align="center">
  <strong>Langfuse + OmegaEngine Integration</strong>
</p>

<p align="center">
  <a href="https://pypi.org/project/langfuse-omega/"><img src="https://img.shields.io/pypi/v/langfuse-omega?color=blue&label=PyPI" alt="PyPI"></a>
  <a href="https://github.com/TheArkhitect/Omegaengine/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-blue" alt="License"></a>
</p>

---

## ✨ Features

- 📊 **Unified Observability** — Langfuse tracing + OmegaEngine governance
- 🔗 **Bi-directional Sync** — Traces flow both ways
- 📈 **Policy Metrics** — Governance data in Langfuse dashboard
- 🛡️ **Alert on Violations** — Trigger Langfuse alerts on policy blocks
- ⚡ **Zero Config** — Auto-detect and integrate

---

## 📦 Installation

```bash
pip install langfuse-omega
```

---

## 🚀 Quick Start

```python
from langfuse_omega import OmegaLangfuseCallback

callback = OmegaLangfuseCallback(
    langfuse_secret_key="your-langfuse-key",
    langfuse_public_key="your-public-key",
    omega_api_key="your-omega-key",
)

# Use with any LLM framework
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(callbacks=[callback])
response = llm.invoke("Hello!")

# View in Langfuse dashboard with governance metadata
```

---

## 📊 Dashboard Integration

In your Langfuse dashboard, you'll see:
- ✅ Omega Decision (APPROVE/DENY/REVIEW)
- 📊 Risk Score
- 🏷️ Policy Tags
- 🔗 Link to Omega audit trail

---

## 🔔 Alert Configuration

```python
callback = OmegaLangfuseCallback(
    alert_on_deny=True,
    alert_on_high_risk=True,
    risk_threshold=70,
)
```

---

## 📄 License

Licensed under the [Apache License 2.0](LICENSE).
