Langfuse
Langfuse is an open source LLM engineering platform that helps teams develop, monitor, evaluate, and debug AI applications. It provides observability, prompt management, evaluations, datasets, and a playground, and can be self-hosted or used as a cloud service. It is designed for developers and teams building LLM-powered applications.
✨ Key features
- LLM application observability with tracing and debugging
- Prompt management with version control and caching
- Evaluations: LLM-as-a-judge, code, user feedback, custom
- Datasets for test sets and benchmarks
- LLM Playground for prompt and model iteration
- Comprehensive API with typed SDKs for Python and JS/TS
🎯 Use cases
- Instrument LLM applications to track calls and logic
- Manage and version prompts centrally
- Evaluate LLM outputs with automated or manual methods
- Create datasets for benchmarking and regression testing
- Iterate on prompts and models in the playground
📦 Installation
🧰 Requirements: Self-hosting requires Docker or Kubernetes; cloud requires account. Python or JS/TS SDKs require API keys.
Self-Host with Docker Compose
git clone --depth=1 https://github.com/langfuse/langfuse.git
cd langfuse
docker compose up
For other deployment options (VM, Kubernetes, Terraform), see the self-hosting documentation.
🚀 Usage
Quickstart
- Create a Langfuse account or self-host.
- Create a project and API credentials.
- Install the SDK and log your first LLM call:
pip install langfuse openai
Set environment variables:
LANGFUSE_SECRET_KEY="sk-lf-..."
LANGFUSE_PUBLIC_KEY="pk-lf-..."
LANGFUSE_BASE_URL="https://cloud.langfuse.com" # EU region
from langfuse import observe
from langfuse.openai import openai # OpenAI integration
@observe()
def story():
return openai.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "What is Langfuse?"}],
).choices[0].message.content
@observe()
def main():
return story()
main()
❓ FAQ
How can I self-host Langfuse?
You can run Langfuse locally using Docker Compose with git clone and docker compose up, or on a VM, Kubernetes (Helm), or via Terraform templates for AWS, Azure, and GCP.
What integrations are available?
Langfuse provides SDKs for Python and JS/TS, and integrations with OpenAI, LangChain, LlamaIndex, Haystack, LiteLLM, Vercel AI SDK, Mastra, and many other libraries and platforms.
How do I log my first LLM call?
Install the langfuse and openai packages, set your API keys and base URL, then use the @observe() decorator and the OpenAI integration to automatically trace your calls.
What are the core features?
Core features include LLM observability, prompt management, evaluations, datasets, an LLM playground, and a comprehensive API.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.