Knowledge Base Regulation Tracker Standards & Frameworks OSS Directory AI Incident Database Research Paper Library Case Studies Society Articles News Jobs About Charter Sign inBecome a Member

Langfuse

LLM observability and tracing

Open-source LLM engineering platform for tracing agents and applications, managing and versioning prompts, running evaluations and tracking cost, with OpenTelemetry-based SDKs and many framework integrations. Self-hostable; a hosted cloud edition exists. Named in the taxonomy.

observabilitytracingprompt managementlangfuse

Introduction

Langfuse is an open-source LLM engineering platform designed to support the development, monitoring, evaluation, and debugging of AI applications. Since its inception in 2023, Langfuse has evolved into a comprehensive tool that integrates tracing, prompt management, evaluations, and analytics dashboards into a single platform. It is widely adopted by over 50,000 companies and processes billions of observations monthly, making it a critical component for teams building production-grade LLM applications.

The platform is built on open standards and open-source components, ensuring data portability and avoiding vendor lock-in. Langfuse is developed with TypeScript and supports self-hosting, allowing teams to deploy it on their own infrastructure using Docker, Kubernetes, or cloud providers like AWS, Azure, and GCP. It also offers a managed cloud edition, providing a balance between control and convenience.

Langfuse is powered by ClickHouse, an open-source database optimized for analytical workloads, which enables fast querying of millions of traces in milliseconds. The platform adheres to strict compliance frameworks, making it suitable for enterprise-scale deployments. Its architecture is designed for reliability, with features like queued trace ingestion, background processing, and automatic batching to ensure minimal latency impact on applications.

How It Works

Langfuse operates by instrumenting LLM applications to capture traces of every interaction, including LLM calls, tool invocations, retrieval steps, and agent actions. These traces are stored in ClickHouse, allowing for efficient querying and analysis. The platform supports OpenTelemetry-based SDKs for Python, TypeScript, and other languages, enabling seamless integration with existing observability pipelines.

The core components of Langfuse include the Langfuse Web application, which serves the UI and APIs, and the Langfuse Worker, which processes events asynchronously. Storage is managed through PostgreSQL for transactional workloads, ClickHouse for analytical queries, Redis for caching, and S3 or a blob store for persisting events and multi-modal inputs. This architecture ensures scalability and reliability, even under high loads.

  • Queued Trace Ingestion: Traces are received in batches by the Langfuse Web container and immediately written to S3. A reference is stored in Redis for queueing, while the Langfuse Worker processes these traces into ClickHouse, preventing timeouts or errors during database writes.
  • Caching Mechanisms: API keys, prompts, and frequently accessed data are cached in Redis to reduce database load and improve response times. Prompts are cached client-side by the SDKs and revalidated in the background.
  • Hyper-Optimized ClickHouse Schema: The database schema is designed to minimize read-time joins and deduplication, leveraging ClickHouse’s performance optimizations for analytical queries.
  • Multi-Modal Trace Support: Large files, such as videos or documents, are uploaded directly to S3 from client SDKs, ensuring efficient handling of multi-modal data.
  • Recoverability of Events: All incoming events are persisted in S3 first. Only after successful processing are they written to the database, ensuring no data loss during temporary unavailability.
  • Background Migrations: Non-blocking migrations required for upgrades are offloaded to background jobs, reducing downtime during updates.

Use Cases

Langfuse addresses multiple critical aspects of LLM application development, making it indispensable for teams aiming to build, monitor, and improve AI systems at scale.

LLM Application Observability

Langfuse provides end-to-end tracing of LLM applications, capturing every call, tool invocation, and retrieval step. This enables developers to inspect and debug complex logs and user sessions in real time. The platform supports hierarchical traces, allowing filtering by user, session, cost, latency, or custom metadata. For example, Canva’s AI team uses Langfuse to trace and debug generative design features in production, ensuring high-quality outputs and efficient debugging.

The LLM Playground feature allows developers to test and iterate on prompts and model configurations directly within the platform. If a trace reveals a suboptimal result, developers can quickly jump to the playground to refine prompts, shortening the feedback loop and accelerating development.

Prompt Management

Langfuse centralizes prompt management, enabling version control and collaborative iteration. Prompts are separated from application code, allowing for one-click deployments and rollbacks. Strong caching on both server and client sides ensures that prompt iterations do not introduce latency to applications. Teams can compare prompts side-by-side using production data, facilitating data-driven decision-making.

The platform supports structured experiments, enabling teams to define test cases and compare model performance across different configurations. This is particularly useful for A/B testing and continuous improvement of LLM applications.

Evaluations and Datasets

Evaluations are a cornerstone of Langfuse’s functionality, supporting LLM-as-a-judge, code evaluators, user feedback collection, manual labeling, and custom evaluation pipelines via APIs/SDKs. Evaluators can be run on production data or during experiments, providing actionable insights into model performance. For instance, teams can use TypeSafe’s Jev decision model as a judge to score observations with calibrated metrics at a fraction of the cost and latency of traditional LLM judges.

Datasets in Langfuse serve as test sets and benchmarks for evaluating LLM applications. They support pre-deployment testing, structured experiments, and flexible evaluation workflows. Integration with frameworks like LangChain and LlamaIndex ensures seamless adoption in existing pipelines. Human-in-the-loop workflows allow collaborative review of traces, enabling the creation of golden datasets for training and validation.

Cost, Latency, and Quality Monitoring

Langfuse provides dashboards and automated alerts for monitoring cost, latency, and quality metrics. Teams can set up monitors to track OpenAI Fast mode costs, including long-context rates for models like GPT-5.6. Alerts can be configured to notify teams via Slack, webhooks, or GitHub Actions when metrics deviate from expected ranges. This proactive approach helps maintain operational efficiency and cost-effectiveness.

The platform also supports experiment tracking, allowing teams to compare evaluators on the same sample of observations. This is particularly valuable for iterative development, where incremental improvements need to be validated against baseline performance.

Integration with AI Agents and Frameworks

Langfuse integrates with a wide range of AI frameworks, agentic systems, and LLM providers. For LLM providers, Langfuse supports OpenAI, Anthropic, Amazon Bedrock, Azure OpenAI, Mistral AI, Google Gemini, and over 100 additional models via LiteLLM. This broad compatibility ensures that Langfuse can be embedded into diverse AI workflows without framework lock-in.

Additionally, Langfuse provides tools for AI agents to interact with its features programmatically. The Langfuse Assistant allows agents to investigate production data, understand issues, and take approved actions without leaving the platform. The Langfuse CLI offers full API access from the terminal, while the MCP (Machine-to-Machine Protocol) server enables structured access for IDE agents to manage prompts, query traces, and utilize Langfuse data.

OpenTelemetry-Based SDKs

Langfuse’s SDKs for Python and TypeScript are built on OpenTelemetry, ensuring compatibility with existing observability tools and standards.

Comprehensive API and Developer Tools

Langfuse offers a robust public API with OpenAPI specifications, Postman collections, and typed SDKs for Python and JavaScript/TypeScript. This API enables bespoke LLMOps workflows, allowing teams to extend Langfuse’s functionality to fit their specific needs.

The Langfuse CLI has been rewritten for performance, with invocations starting 10x faster. It supports union endpoints with plain flags and provides clear error codes for agentic workflows. The CLI is particularly useful for scripting, automation, and integrating Langfuse into developer workflows.

Scalability and Performance

Langfuse v4 introduced significant performance improvements, with up to 165x faster processing speeds for large-scale deployments. The platform is optimized to handle billions of observations per month, with initial table loads in milliseconds and at least 10x faster dashboards for large projects. Background processing and automatic batching ensure that tracing does not block application performance, even under heavy loads.

The ClickHouse backend is a key enabler of Langfuse’s scalability, allowing for fast analytical queries on millions of traces. The database schema is designed to avoid read-time joins and deduplication, further enhancing query performance. Multi-modal traces are stored efficiently in S3, ensuring that large files do not impact database performance.

Security and Compliance

Langfuse is designed with enterprise-grade security in mind. It supports deployment within private VPCs or on-premises environments, with optional internet access. All incoming events are persisted in S3 before processing, ensuring data recoverability even during database unavailability. The platform follows strict compliance frameworks, making it suitable for regulated industries.

Self-hosted deployments use the same codebase as Langfuse Cloud, ensuring consistency in security practices. Enterprise-grade support is available for self-hosted instances, with options for dedicated assistance and compliance audits.

Collaborative Workflows

Langfuse emphasizes collaborative development, with features that enable teams to work together on prompt management, evaluations, and debugging. The LLM Playground allows developers to iterate on prompts in real time, while the Human-in-the-Loop workflows facilitate collaborative review of traces and creation of golden datasets. Organization admins can roll out previews to all members, with global opt-outs and per-user controls.

The platform also supports skill-based automation, where AI agents can manage prompts, traces, and evaluations through natural language commands via the SKILL.md interface.

Advanced Evaluation Capabilities

Langfuse supports a variety of evaluation methods, including LLM-as-a-judge, code evaluators, heuristic functions, and human review. Evaluators can be attached to rules, with backfilling of scores for recent observations. Teams can compare evaluators side-by-side, restore previous versions as drafts, and manage evaluation rules through stable, ID-based public APIs.

New evaluation workflows allow developers to define evaluators, test them on real data, and run them online. Built-in scoring approaches for chatbots, topic detection, exact matches, and coding agents provide flexibility for different use cases. Alerts can be created directly from evaluator pages, with notifications sent to Slack or webhooks for automated workflows.

Multi-Modal and Multi-Framework Support

Langfuse supports multi-modal traces, including images, audio, video, and documents. These traces are uploaded directly to S3 from client SDKs, ensuring efficient storage and retrieval. The platform integrates with over 100 LLM providers and frameworks, including LiteLLM for proxying requests to multiple models, Vercel AI SDK for React/Next.js applications, and Mastra for building AI agents.

This broad ecosystem ensures that Langfuse can be adapted to virtually any AI workflow.

Deployment Flexibility

Langfuse offers multiple deployment options to suit different organizational needs. The Langfuse Cloud edition is fully managed by the Langfuse team, with a generous free tier (50,000 observations/month) and no credit card requirement. For self-hosting, teams can deploy Langfuse using Docker Compose for local testing, a single VM for small-scale production, or Kubernetes for large-scale deployments.

Terraform templates are available for AWS, Azure, and GCP, simplifying cloud deployments. Community-supported options include Render and Railway, though these are maintained on a best-effort basis. Self-hosted deployments use the same infrastructure as Langfuse Cloud, ensuring consistency in performance and reliability.

Enterprise Features

Langfuse is trusted by 21 of the Fortune 50 companies and processes over 90 billion observations monthly. Its Docker images have been pulled over 38 million times, reflecting its widespread adoption. Enterprise features include advanced security configurations, high-availability deployments, and dedicated support. The platform’s architecture is optimized for large-scale AI systems, with features like queued ingestion, background processing, and hyper-optimized database schemas ensuring reliability at scale.

Sources

Contribute

Spot an error, or know a record we should add? Members can propose additions and submit corrections.