Langfuse overview
Langfuse records what an LLM application did, step by step, and keeps its prompts, its scores and its test sets in one place.
Langfuse was started in 2023 by Marc Klingen, Max Deichmann and Clemens Rawert during Y Combinator's W23 batch, and is built mostly in Berlin; in January 2026 the company joined ClickHouse. The server is open source, with its core features under the MIT licence, and runs as Langfuse Cloud or on your own machines. The Python SDK below is version 4.15.4.
Traces, observations, prompts and scores
A trace is one request to your application, such as one customer ticket. It holds observations: the steps inside it, like a model call, a tool call or a lookup, nested by which step ran inside which. The SDK is built on OpenTelemetry, the open standard for tracing, and sends observations to the server in the background.
On top of traces, Langfuse keeps prompts with versions and labels, so a prompt can change without a deploy; scores, numbers or labels attached to a trace by your code, a person or a judge; and datasets of test inputs, which experiments run your application against.
Pick one to watch it run, step by step.
A support desk you trace
The running example is a small online shop's support desk: order A17 shipped on 3 March, order B22 cannot be found, and refunds need a person's approval. It starts as a plain Python function. By the end it is traced step by step, calls a model, hides card numbers before anything is sent, takes its prompt from Langfuse, records what customers thought, and refuses to release a prompt that scores worse than the one it replaces.
Pick one to watch it run, step by step.
Each piece is built on its own first, in the lesson the drawing names.
A Langfuse server on your machine
The hosted service needs an account and two API keys. You need neither. Lesson 2 starts local_langfuse.py, a small server on your own machine: it answers the requests the SDK makes, keeps what it receives so you can print it, and refuses any connection to another computer. Every output you will see came back from it. Lesson 29 shows the one change for Langfuse Cloud.
What you need to run the lessons
- Python 3.10 or later, and pip.
- Functions, decorators and dictionaries.
- No account anywhere, and nothing leaves your machine.
The next lesson installs the SDK and shows what it does when no keys are set.
Every expert started right here.