Langfuse.Client
1.4.1
dotnet add package Langfuse.Client --version 1.4.1
NuGet\Install-Package Langfuse.Client -Version 1.4.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Langfuse.Client" Version="1.4.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Langfuse.Client" Version="1.4.1" />
<PackageReference Include="Langfuse.Client" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Langfuse.Client --version 1.4.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Langfuse.Client, 1.4.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Langfuse.Client@1.4.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Langfuse.Client&version=1.4.1
#tool nuget:?package=Langfuse.Client&version=1.4.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Langfuse.Core (>= 1.4.1)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
-
net9.0
- Langfuse.Core (>= 1.4.1)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.