Metadata-Version: 2.4
Name: forgesight-langfuse
Version: 0.1.0
Summary: ForgeSight Langfuse exporter — OTLP ingest with native langfuse.* observation mapping.
Project-URL: Homepage, https://github.com/Scaffoldic/forgesight
Project-URL: Repository, https://github.com/Scaffoldic/forgesight
Project-URL: Issues, https://github.com/Scaffoldic/forgesight/issues
Project-URL: Changelog, https://github.com/Scaffoldic/forgesight/blob/main/docs/releases/v0.1.md
Author: kjoshi
License-Expression: Apache-2.0
Keywords: ai-agents,forgesight,langfuse,llm,observability,otlp
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: System :: Monitoring
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: forgesight-core
Requires-Dist: forgesight-otel
Description-Content-Type: text/markdown

# forgesight-langfuse

The Langfuse exporter for [ForgeSight](https://github.com/Scaffoldic/forgesight).
Ships ForgeSight records to Langfuse over its OTLP ingest endpoint
(`/api/public/otel`, Basic auth), enriched with the native **`langfuse.*`**
attributes so LLM calls render as **generation** observations, tools as **tool**
observations, and the run's `user`/`session`/`tags` lift to the trace.

```bash
pip install forgesight-langfuse
```

```python
import forgesight
from forgesight_langfuse import LangfuseExporter

forgesight.configure(exporters=[
    LangfuseExporter(public_key="pk-lf-...", secret_key="sk-lf-...",
                     host="https://cloud.langfuse.com"),
])
```

Or by name: `exporters: [{name: langfuse, config: {public_key: …, secret_key: …}}]`.

## Two paths

- **First-party (this package):** native `langfuse.*` observation mapping + the SDK's
  computed cost (`forgesight.usage.cost_usd`) ingested.
- **OTLP-native (no package):** point `forgesight-otel` at
  `https://cloud.langfuse.com/api/public/otel` with `Authorization: Basic base64(pk:sk)`.

Prompt/response content is captured only with `capture_content=True` (off by default).

## License

Apache-2.0
