Langfuse
Langfuse is an open-source platform for LLM observability. It provides tracing and monitoring capabilities for AI applications, helping developers debug, analyze, and optimize their AI systems. Langfuse integrates with various tools and frameworks, including workflow builders and runtimes like SkillFlaw.
This guide explains how to configure SkillFlaw to collect tracing data about your flow executions and automatically send the data to Langfuse.
Prerequisites
- An account in a Langfuse Cloud or Langfuse self-hosted instance
- A running SkillFlaw server with a flow that you want to trace
If you need a flow to test the Langfuse integration, see the SkillFlaw quickstart.
Set Langfuse credentials as environment variables
-
Create a set of Langfuse API keys.
-
Copy the following API key information:
- Secret Key
- Public Key
- Host URL
-
Set your Langfuse project credentials as environment variables in the same environment where you run SkillFlaw.
In the following examples, replace
SECRET_KEY,PUBLIC_KEY, andHOST_URLwith your API key details from Langfuse.- Linux or macOS
- Windows
These commands set the environment variables in a Linux or macOS terminal session:
_10export LANGFUSE_SECRET_KEY=SECRET_KEY_10export LANGFUSE_PUBLIC_KEY=PUBLIC_KEY_10export LANGFUSE_HOST=HOST_URLThese commands set the environment variables in a Windows command prompt session:
_10set LANGFUSE_SECRET_KEY=SECRET_KEY_10set LANGFUSE_PUBLIC_KEY=PUBLIC_KEY_10set LANGFUSE_HOST=HOST_URL
Start SkillFlaw and view traces in Langfuse
-
Start SkillFlaw in the same environment where you set the Langfuse environment variables:
_10uv run skillflaw run -
Run a flow.
SkillFlaw automatically collects and sends tracing data about the flow execution to Langfuse.
-
View the collected data in your Langfuse dashboard.
Langfuse also provides a public live trace example dashboard.
Disable Langfuse tracing
To disable the Langfuse integration, remove the Langfuse environment variables, and then restart SkillFlaw.