LL

langfuse/langfuse

Developer tools
37.2K stars Quality 70 Trend 98NOASSERTION

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

Overview

Docs · Report Bug · Feature Request · Changelog · Roadmap Langfuse is an for . It is one open platform for every AI call your company makes and every agent your teams build: track usage and costs, agents, and use production data to ship better AI. Use Langfuse Cloud or ; Langfuse is at scale. 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. - 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.

README

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.md with 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.

Sign up for Langfuse Cloud →

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.

  • Terraform Templates: AWS, Azure, GCP

  • Community-maintained: Render, Railway

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.

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

  1. Create Langfuse account or self-host
  2. Create a new project
  3. 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):

Repository Stars
  Significant-Gravitas / AutoGPT 187903
  langgenius / dify 160407
  langflow-ai / langflow 156333
  bytedance / deer-flow 84985
  cheaper-inference / OmniRoute 84532
  lobehub / lobehub 83873
  abi / screenshot-to-code 81022
  microsoft / ai-agents-for-beginners 78925
  openai / openai-cookbook 76955
  cline / cline 71312
  BerriAI / litellm 62709
  run-llama / llama_index 52806
  LibreChat-AI / LibreChat 46745
  volcengine / OpenViking 41535
  HKUDS / LightRAG 40529
  directus / directus 38820
  DayuanJiang / next-ai-draw-io 36683
  onyx-dot-app / onyx 33212
  labring / FastGPT 29994
  mastra-ai / mastra 29335
  vercel / ai 27740
  onlook-dev / onlook 27117
  promptfoo / promptfoo 26836
  kortix-ai / CompanyOS 20378
  gastownhall / gastown 18691
  camel-ai / camel 18010
  suitenumerique / docs 16967
  Arindam200 / awesome-ai-apps 16712
  apify / apify-mcp-server 14774
  The-PR-Agent / pr-agent 14686
  microsoft / agent-framework 14532
  The-Pocket / PocketFlow 11303
  openai / codex-security 11301
  tambo-ai / tambo 11222
  VoltAgent / voltagent 10920
  mcp-use / mcp-use 10846
  yugabyte / yugabyte-db 10649
  droidrun / mobilerun 9947
  MervinPraison / PraisonAI 9321
  miurla / morphic 9275
  plastic-labs / honcho 7944
  raycast / extensions 7832
  2FastLabs / agent-squad 7799
  xerrors / Yuxi 7601
  refly-ai / refly 7547
  crestalnetwork / intentkit 6524
  coleam00 / ottomator-agents 5791
  zenml-io / zenml 5635
  colanode / colanode 5186
  getzep / zep 4989
  langflow-ai / openrag 4671
  JoshuaC215 / agent-service-toolkit 4564
  FlowElement-xinliuyuansu / m_flow 4509
  panaversity / learn-agentic-ai 4395
  bragai / bRAG-langchain 4196
  strukto-ai / mirage 3763
  awslabs / agentcore-samples 3512
  ding113 / claude-code-hub 3399
  rpamis / comet 3270
  remix-project-org / remix-project 3096
  tsedio / tsed 3091
  MetaMask / metamask-mobile 3080
  pingcap / autoflow 2979
  wassim249 / fastapi-langgraph-agent-production-ready-template 2726
  Agent-Field / agentfield 2644
  suitenumerique / meet 2468
  YFGaia / dify-plus 2263
  PrimeIntellect-ai / prime-rl 2215
  TheSpaghettiDetective / obico-server 1924
  ai-hero-dev / ai-hero 1915
  arabold / docs-mcp-server 1856
  trailofbits / buttercup 1741
  MLSysOps / MLE-agent 1580
  kodustech / kodus-ai 1565
  bugbasesecurity / pentest-copilot 1546
  agentconnect-md / agentconnect 1514
  TIGER-AI-Lab / TheoremExplainAgent 1513
  hashgraph-online / awesome-codex-plugins 1508
  Gsync / jobsync 1493
  inkeep / agents 1490
  zstar1003 / ragflow-plus 1465
  hotovo / aider-desk 1463
  cline / kanban 1376
  wanxingai / LightAgent 1245
  FranciscoMoretti / chat-js 1203
  cognizant-ai-lab / neuro-san-studio 1194
  okou-ai / okou 1162
  alishobeiri / thread-notebook 1106
  openops-cloud / openops 1081
  dynamiq-ai / dynamiq 1073
  trendy-design / llmchat 1072
  cuga-project / cuga-agent 1070
  Minima-AI-Inc / minima 1056
  ZTE-AICloud / Co-Sight 1015
  china-qijizhifeng / agentic-harness-engineering 959
  sanity-io / next-sanity 956
  plastic-labs / tutor-gpt 933
  strands-agents / samples 924
  andysingal / llm-course 891
  groq / openbench 832

🔒 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:

  1. Understand how Langfuse is used and improve the most relevant features.
  2. 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.

View the full README on GitHub

Recommended Tools

Try a different keyword or remove a filter.

Install

npx skillfish add langfuse/langfuse
New to MCP? Start with the mcpskill.org guide →