langfuse
🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
Langfuse is an open source AI engineering platform for agent evals and observability. It is one open platform for every AI call your company makes and every agent your teams build: track usage and costs, trace and evaluate agents, and use production data to ship better AI. Use Langfuse Cloud or self-host in minutes; Langfuse is battle-tested at scale.
Watch a quick demo of the project here:
🧑💻 We're hiring
Interested in contributing to Langfuse full-time? Langfuse is growing fast (we doubled the team in the last 6 months). Since January 2026 we're part of ClickHouse. We hire remotely, with offices in Berlin, San Francisco, Amsterdam, and New York. See open roles →
✨ Core Features
-
AI Observability: Instrument your app and start ingesting traces to Langfuse, thereby tracking LLM calls and other relevant logic in your app such as retrieval, embedding, or agent actions. Inspect and debug complex logs and user sessions. Built on OpenTelemetry. Try the interactive demo to see this in action.
-
Prompt Management helps you centrally manage, version control, and collaboratively iterate on your prompts. Thanks to strong caching on server and client side, you can iterate on prompts without adding latency to your application. The LLM Playground lets you test prompts and model configurations; when you see a bad result in tracing, you can jump straight to the playground to iterate on it.
-
Skill Management (beta) brings versioning and labels to agent skills: a
SKILL.mdwith task instructions plus optional supporting files. Promote or roll back versions without changing application code, and link skill versions to the traces they produced. -
Evaluations are key to the AI agent development workflow, and Langfuse adapts to your needs. It supports LLM-as-a-judge, code evaluators, user feedback collection, manual labeling, and custom evaluation pipelines via APIs/SDKs. Use Datasets and Experiments to build test sets and benchmarks for pre-deployment testing and continuous improvement.
-
AI Gateway (beta) gives your organization one endpoint for calls to your model providers. Keep provider credentials in one place, hand out per-user or service account gateway keys, approve models centrally, track AI spend per user, key, and model, and record every call as a Langfuse trace.
-
Metrics and Dashboards: Track latency, cost, and quality across any dimension with custom dashboards, the metrics API, and alerts.
-
Comprehensive API: Langfuse is frequently used to power bespoke AI engineering workflows while using the building blocks provided by Langfuse via the API. An OpenAPI spec, typed SDKs for Python and JS/TS, the Langfuse CLI, and the Langfuse Agent Skill for coding agents are available.
📦 Deploy Langfuse
Langfuse Cloud
Managed deployment by the Langfuse team, generous free tier, no credit card required.
Self-Host Langfuse
Run Langfuse on your own infrastructure:
-
Docker Compose: Run Langfuse on your own machine or a single virtual machine in 5 minutes. The guide also covers configuring Docker log rotation so container logs don't fill up the disk.
# Get a copy of the latest Langfuse repository git clone --depth=1 https://github.com/langfuse/langfuse.git cd langfuse # Run the langfuse docker compose docker compose up -
Kubernetes (Helm): Run Langfuse on a Kubernetes cluster using Helm. This is the preferred production deployment.
See self-hosting documentation to learn more about architecture and configuration options.
[!TIP] Self-hosting Langfuse? Subscribe to the self-hosting update list to get an email about important features and new releases for open source Langfuse — self-hosting updates only, no marketing.
🔌 Integrations
Langfuse is built on OpenTelemetry, so any OpenTelemetry-instrumented application, framework, or collector can send traces to Langfuse.
Main Integrations
| Integration | Supports | Description |
|---|---|---|
| OpenTelemetry | Any language | Send OTLP traces from your application or OpenTelemetry Collector to Langfuse's OpenTelemetry endpoint. |
| Langfuse AI Gateway (beta) | Any OpenAI or Anthropic client | Route model calls through one endpoint to trace every call, keep provider keys in one place, and track cost without SDK or code changes. |
| SDK | Python, JS/TS | Manual instrumentation using the SDKs for full flexibility. |
| OpenAI | Python, JS/TS | Automated instrumentation using drop-in replacement of OpenAI SDK. |
| LangChain & LangGraph | Python, JS/TS | Automated instrumentation by passing callback handler to LangChain or LangGraph application. |
| LlamaIndex | Python | Automated instrumentation via LlamaIndex callback system. |
| Haystack | Python | Automated instrumentation via Haystack content tracing system. |
| LiteLLM | Python, JS/TS (proxy only) | Use any LLM as a drop-in replacement for GPT. Use Azure, OpenAI, Cohere, Anthropic, Ollama, VLLM, Sagemaker, HuggingFace, Replicate (100+ LLMs). |
| Vercel AI SDK | JS/TS | TypeScript toolkit designed to help developers build AI-powered applications with React, Next.js, Vue, Svelte, Node.js. |
| Mastra | JS/TS | Open source framework for building AI agents and multi-agent systems. |
| API | Directly call the public API. OpenAPI spec available. |
Packages integrated with Langfuse
| Name | Type | Description |
|---|---|---|
| OpenAI Agents SDK | Agent Framework | Lightweight framework from OpenAI for building multi-agent workflows. |
| Claude Agent SDK | Agent Framework | Anthropic's open source framework for building tool-using agents with native MCP support. |
| Pydantic AI | Agent Framework | Python agent framework for building production-grade applications with type safety. |
| Google ADK | Agent Framework | Google's open source Agent Development Kit for building agents. |
| Strands Agents | Agent Framework | Open source SDK by AWS for building and running AI agents. |
| Spring AI | Agent Framework | Java framework for building AI applications in the Spring ecosystem. |
| CrewAI | Agent Framework | Multi agent framework for agent collaboration and tool use. |
| AutoGen | Agent Framework | Open source LLM platform for building distributed agents. |
| smolagents | Agent Framework | Open source AI agents framework. |
| Instructor | Library | Library to get structured LLM outputs (JSON, Pydantic). |
| DSPy | Library | Framework that systematically optimizes language model prompts and weights. |
| Mirascope | Library | Python toolkit for building LLM applications. |
| Ollama | Model (local) | Easily run open source LLMs on your own machine. |
| Amazon Bedrock | Model | Run foundation and fine-tuned models on AWS. |
| Flowise | Chat/Agent UI | JS/TS no-code builder for customized LLM flows. |
| Langflow | Chat/Agent UI | Python-based UI for LangChain, designed with react-flow to provide an effortless way to experiment and prototype flows. |
| Dify | Chat/Agent UI | Open source LLM app development platform with no-code builder. |
| OpenWebUI | Chat/Agent UI | Self-hosted LLM Chat web ui supporting various LLM runners including self-hosted and local models. |
| LobeChat | Chat/Agent UI | Open source chatbot platform. |
| Gradio | Chat/Agent UI | Open source Python library to build web interfaces like Chat UI. |
| Promptfoo | Tool | Open source LLM testing platform. |
| Vapi | Platform | Open source voice AI platform. |
| Inferable | Agent Framework | Open source LLM platform for building distributed agents. |
| Goose | Agent | Open source AI agent by Block that automates engineering tasks. |
See the integrations overview for the full list of 100+ integrations.
🚀 Quickstart
Instrument your app and start ingesting traces to Langfuse, thereby tracking LLM calls and other relevant logic in your app such as retrieval, embedding, or agent actions. Inspect and debug complex logs and user sessions.
🤖 Agentic installation (recommended)
Install the Langfuse Agent Skill to let your coding agent access all Langfuse features, then ask it to add tracing to your application:
Install the Langfuse Agent Skill from github.com/langfuse/skills
and use it to add tracing to this application with Langfuse
following best practices.
You can also install the skill with the skills CLI (npx skills add langfuse/skills --skill "langfuse") or the Langfuse Cursor plugin. If your agent supports MCP, add the Langfuse Docs MCP server (https://langfuse.com/api/mcp, no authentication) so it can look up current documentation while it works. See the get started guide for details.
🛠️ Manual installation
1️⃣ Create new project
- Create Langfuse account or self-host
- Create a new project
- Create new API credentials in the project settings
2️⃣ Log your first LLM call
The @observe() decorator makes it easy to trace any Python LLM application. In this quickstart we also use the Langfuse OpenAI integration to automatically capture all model parameters.
[!TIP] Not using OpenAI? Visit our documentation to learn how to log other models and frameworks.
pip install langfuse openai
LANGFUSE_SECRET_KEY="sk-lf-..."
LANGFUSE_PUBLIC_KEY="pk-lf-..."
LANGFUSE_BASE_URL="https://cloud.langfuse.com" # 🇪🇺 EU region
# LANGFUSE_BASE_URL="https://us.cloud.langfuse.com" # 🇺🇸 US region
# LANGFUSE_BASE_URL="https://jp.cloud.langfuse.com" # 🇯🇵 Japan region
# LANGFUSE_BASE_URL="https://hipaa.cloud.langfuse.com" # ⚕️ HIPAA 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()
3️⃣ See traces in Langfuse
See your language model calls and other application logic in Langfuse.
Public example trace in Langfuse
💭 Support
Finding an answer to your question:
- Our documentation is the best place to start looking for answers. It is comprehensive, and we invest significant time into maintaining it. You can also suggest edits to the docs via GitHub.
- Langfuse FAQs where the most common questions are answered.
- Use "Ask AI" to get instant answers to your questions.
Support Channels:
- Ask any question in our public Q&A on GitHub Discussions. Please include as much detail as possible (e.g. code snippets, screenshots, background information) to help us understand your question.
- Request a feature on GitHub Discussions.
- Report a Bug on GitHub Issues.
- For time-sensitive queries, ping us via the in-app chat widget.
🤝 Contributing
Your contributions are welcome!
- Vote on Ideas in GitHub Discussions.
- Raise and comment on Issues.
- Open a PR - see CONTRIBUTING.md for details on how to setup a development environment.
🥇 License
This repository is MIT licensed, except for the ee folders. See LICENSE and docs for more details.
Dependencies
We deploy this code base in Docker containers. See web/Dockerfile and worker/Dockerfile for how the images are built, including the base images they use.
⭐️ Star History
❤️ Open Source Projects Using Langfuse
Top open-source projects that use the Langfuse Python or JS/TS SDK, ranked by stars (Source):
🔒 Security & Privacy
We take data security and privacy seriously. Please refer to our Security and Privacy page for more information.
Telemetry
By default, Langfuse automatically reports basic usage statistics of self-hosted instances to a centralized server (PostHog).
This helps us to:
- Understand how Langfuse is used and improve the most relevant features.
- Track overall usage for internal and external (e.g. fundraising) reporting.
The telemetry does not include raw traces, prompts, observations, scores, or dataset contents. We document the exact fields that are collected, where they are sent, and the implementation reference in our telemetry docs.
For Langfuse OSS, you can opt out by setting TELEMETRY_ENABLED=false.


