Langfuse.Core
1.4.0
See the version list below for details.
dotnet add package Langfuse.Core --version 1.4.0
NuGet\Install-Package Langfuse.Core -Version 1.4.0
<PackageReference Include="Langfuse.Core" Version="1.4.0" />
<PackageVersion Include="Langfuse.Core" Version="1.4.0" />
<PackageReference Include="Langfuse.Core" />
paket add Langfuse.Core --version 1.4.0
#r "nuget: Langfuse.Core, 1.4.0"
#:package Langfuse.Core@1.4.0
#addin nuget:?package=Langfuse.Core&version=1.4.0
#tool nuget:?package=Langfuse.Core&version=1.4.0
Langfuse .NET SDK (Unofficial) 🪢
Unofficial .NET SDK for Langfuse - the open-source LLM engineering platform.
Features
| Feature | Description | Docs |
|---|---|---|
| OpenTelemetry Tracing | Export .NET OTEL traces to Langfuse | OTEL Integration |
| Prompt Management | Fetch, compile, and cache text & chat prompts | Prompt Management |
| Scores | Create user feedback and evaluation scores | Scores |
| Trace Management | List, get, and delete traces via API | Public API |
| Datasets | Create and manage evaluation datasets | Datasets |
| Experiments | Log agent runs with datasets | Experiments |
Packages
| Package | Description | Install |
|---|---|---|
| Langfuse.OpenTelemetry | Export OTEL traces to Langfuse | dotnet add package Langfuse.OpenTelemetry |
| Langfuse.Client | Prompt management, scores, traces, datasets, experiments | dotnet add package Langfuse.Client |
| Langfuse.Core | Shared config & types (auto-installed) | dotnet add package Langfuse.Core |
Quick Start
Configuration
Set environment variables:
LANGFUSE_PUBLIC_KEY=pk-lf-...
LANGFUSE_SECRET_KEY=sk-lf-...
LANGFUSE_BASE_URL=https://cloud.langfuse.com # EU region (default)
# LANGFUSE_BASE_URL=https://us.cloud.langfuse.com # US region
OpenTelemetry Tracing
Export traces from any OTEL-instrumented library (including Semantic Kernel) to Langfuse:
using Langfuse.OpenTelemetry;
using OpenTelemetry;
using OpenTelemetry.Trace;
using var tracerProvider = Sdk.CreateTracerProviderBuilder()
.AddSource("Microsoft.SemanticKernel*")
.AddLangfuseExporter()
.Build();
Langfuse Client
Access Langfuse features directly from .NET:
using Langfuse.Client;
var client = new LangfuseClient();
// Prompts, Scores, Datasets, Experiments
Documentation
- Features - Detailed feature documentation
- Testing Guide - How to run tests
- Contributing - How to contribute
Running the Sample
cd samples/SemanticKernel.Sample
dotnet run
Check your Langfuse dashboard to see the traces.
License
MIT License - see LICENSE for details.
Links
- Langfuse - Open-source LLM engineering platform
- Langfuse Docs - Official documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
-
net9.0
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Langfuse.Core:
| Package | Downloads |
|---|---|
|
Langfuse.OpenTelemetry
A bridge between .NET OpenTelemetry (OTEL) and Langfuse. Automatically exports OTEL traces to Langfuse with a single line of code. |
|
|
Langfuse.Client
Unofficial .NET client for Langfuse. Provides access to Langfuse features like Prompt Management, with client-side caching. |
GitHub repositories
This package is not used by any popular GitHub repositories.