Langfuse is an open-source LLM engineering platform designed to help teams collaboratively develop, monitor, evaluate, and debug AI applications. It can be quickly self-hosted and is battle-tested, built on the open-source ClickHouse database.
Purpose Langfuse is mainly aimed at LLM application development teams, used to trace, evaluate, and improve LLM applications. It helps teams track LLM calls as well as other related logic in the application, such as retrieval, embeddings, or agent actions, and inspect and debug complex logs and user sessions.
Main capabilities
- LLM application observability: Instrument your application to send trace data to Langfuse, track LLM calls and logic such as retrieval, embeddings, and agent actions, and inspect and debug complex logs and user sessions.
- Prompt management: Centrally manage, version control, and collaboratively iterate prompts. There is strong caching on both the server and client sides, so iterating prompts does not add latency to the application.
- Evaluation: Supports LLM-as-a-judge, code evaluators, user feedback collection, human annotation, and custom evaluation workflows via API/SDK.
- Datasets: Supports test sets and benchmarks for evaluating LLM applications, supports continuous improvement, pre-deployment testing, structured experiments, flexible evaluation, and can seamlessly integrate with frameworks such as LangChain and LlamaIndex.
- LLM Playground: Test and iterate prompts and model configurations to shorten the feedback loop. When you see poor results in a trace, you can jump directly to the Playground to iterate.
- Comprehensive API: Use Langfuse's building blocks via API to power custom LLMOps workflows. Provides OpenAPI specifications, Postman collections, and typed SDKs for Python and JS/TS.
Usage Self-hosting options:
- Local (docker compose): Run Langfuse locally on your machine in 5 minutes using Docker Compose. git clone --depth=1 https://github.com/langfuse/langfuse.git cd langfuse docker compose up
- Virtual machine: Run on a single virtual machine using Docker Compose.
- Kubernetes (Helm): Run on a Kubernetes cluster using Helm, which is the preferred production deployment method.
- Terraform templates: AWS, Azure, GCP.
Quick start:
- Create a new project: Create a Langfuse account or self-host, create a new project, and create API credentials in the project settings.
- Record your first LLM call: The @observe() decorator makes it easy to trace any Python LLM application. The quick start also uses the Langfuse OpenAI integration to automatically capture all model parameters. If you are not using OpenAI, refer to the documentation to learn how to record other models and frameworks.
- View traces in Langfuse: View language model calls and other application logic.
Use cases Suitable for teams that need to monitor, evaluate, debug, and improve LLM applications, especially developers using frameworks such as LangChain and LlamaIndex, as well as scenarios that require self-hosting to meet data control requirements.
Limitations and notes
- By default, Langfuse automatically reports basic usage statistics from self-hosted instances to a centralized server (PostHog). Telemetry does not include raw traces, prompts, observations, scores, or dataset content. You can opt out by setting TELEMETRY_ENABLED=false.
- The default docker-compose.yml inherits the Docker daemon's logging configuration. The Docker default json-file driver does not rotate logs and may exhaust disk space. You need to set the max-size and max-file options, or keep your chosen logging backend and configure a retention policy. Do not use external tools to rotate or truncate Docker-managed JSON log files. After changing the daemon logging defaults, you need to restart Docker and recreate existing containers.
- This repository is licensed under the MIT License, except for the ee directory; see LICENSE and the documentation for details.
- The codebase is deployed in Docker containers based on Linux Alpine images, with Dockerfiles located at web/Dockerfile and worker/Dockerfile。