← The Directory
Skill

langfuse

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

View source
Langfuse by ClickHouse

MIT License Y Combinator W23 Docker Pulls langfuse Python package on PyPi @langfuse/core npm package
chat on Discord follow on X(Twitter) follow on LinkedIn Commits last month Issues closed Discussion posts

README in English 简体中文版自述文件 日本語のREADME README in Korean

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:

Langfuse Overview Video

🧑‍💻 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

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

deploy

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

integrations

Langfuse is built on OpenTelemetry, so any OpenTelemetry-instrumented application, framework, or collector can send traces to Langfuse.

Main Integrations

IntegrationSupportsDescription
OpenTelemetryAny languageSend OTLP traces from your application or OpenTelemetry Collector to Langfuse's OpenTelemetry endpoint.
Langfuse AI Gateway (beta)Any OpenAI or Anthropic clientRoute model calls through one endpoint to trace every call, keep provider keys in one place, and track cost without SDK or code changes.
SDKPython, JS/TSManual instrumentation using the SDKs for full flexibility.
OpenAIPython, JS/TSAutomated instrumentation using drop-in replacement of OpenAI SDK.
LangChain & LangGraphPython, JS/TSAutomated instrumentation by passing callback handler to LangChain or LangGraph application.
LlamaIndexPythonAutomated instrumentation via LlamaIndex callback system.
HaystackPythonAutomated instrumentation via Haystack content tracing system.
LiteLLMPython, 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 SDKJS/TSTypeScript toolkit designed to help developers build AI-powered applications with React, Next.js, Vue, Svelte, Node.js.
MastraJS/TSOpen source framework for building AI agents and multi-agent systems.
APIDirectly call the public API. OpenAPI spec available.

Packages integrated with Langfuse

NameTypeDescription
OpenAI Agents SDKAgent FrameworkLightweight framework from OpenAI for building multi-agent workflows.
Claude Agent SDKAgent FrameworkAnthropic's open source framework for building tool-using agents with native MCP support.
Pydantic AIAgent FrameworkPython agent framework for building production-grade applications with type safety.
Google ADKAgent FrameworkGoogle's open source Agent Development Kit for building agents.
Strands AgentsAgent FrameworkOpen source SDK by AWS for building and running AI agents.
Spring AIAgent FrameworkJava framework for building AI applications in the Spring ecosystem.
CrewAIAgent FrameworkMulti agent framework for agent collaboration and tool use.
AutoGenAgent FrameworkOpen source LLM platform for building distributed agents.
smolagentsAgent FrameworkOpen source AI agents framework.
InstructorLibraryLibrary to get structured LLM outputs (JSON, Pydantic).
DSPyLibraryFramework that systematically optimizes language model prompts and weights.
MirascopeLibraryPython toolkit for building LLM applications.
OllamaModel (local)Easily run open source LLMs on your own machine.
Amazon BedrockModelRun foundation and fine-tuned models on AWS.
FlowiseChat/Agent UIJS/TS no-code builder for customized LLM flows.
LangflowChat/Agent UIPython-based UI for LangChain, designed with react-flow to provide an effortless way to experiment and prototype flows.
DifyChat/Agent UIOpen source LLM app development platform with no-code builder.
OpenWebUIChat/Agent UISelf-hosted LLM Chat web ui supporting various LLM runners including self-hosted and local models.
LobeChatChat/Agent UIOpen source chatbot platform.
GradioChat/Agent UIOpen source Python library to build web interfaces like Chat UI.
PromptfooToolOpen source LLM testing platform.
VapiPlatformOpen source voice AI platform.
InferableAgent FrameworkOpen source LLM platform for building distributed agents.
GooseAgentOpen 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

  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.

example-trace-for-github

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

Star History Chart

❤️ Open Source Projects Using Langfuse

Top open-source projects that use the Langfuse Python or JS/TS SDK, ranked by stars (Source):

RepositoryStars
  Significant-Gravitas / AutoGPT187903
  langgenius / dify160407
  langflow-ai / langflow156333
  bytedance / deer-flow84985
  cheaper-inference / OmniRoute84532
  lobehub / lobehub83873
  abi / screenshot-to-code81022
  microsoft / ai-agents-for-beginners78925
  openai / openai-cookbook76955
  cline / cline71312
  BerriAI / litellm62709
  run-llama / llama_index52806
  LibreChat-AI / LibreChat46745
  volcengine / OpenViking41535
  HKUDS / LightRAG40529
  directus / directus38820
  DayuanJiang / next-ai-draw-io36683
  onyx-dot-app / onyx33212
  labring / FastGPT29994
  mastra-ai / mastra29335
  vercel / ai27740
  onlook-dev / onlook27117
  promptfoo / promptfoo26836
  kortix-ai / CompanyOS20378
  gastownhall / gastown18691
  camel-ai / camel18010
  suitenumerique / docs16967
  Arindam200 / awesome-ai-apps16712
  apify / apify-mcp-server14774
  The-PR-Agent / pr-agent14686
  microsoft / agent-framework14532
  The-Pocket / PocketFlow11303
  openai / codex-security11301
  tambo-ai / tambo11222
  VoltAgent / voltagent10920
  mcp-use / mcp-use10846
  yugabyte / yugabyte-db10649
  droidrun / mobilerun9947
  MervinPraison / PraisonAI9321
  miurla / morphic9275
  plastic-labs / honcho7944
  raycast / extensions7832
  2FastLabs / agent-squad7799
  xerrors / Yuxi7601
  refly-ai / refly7547
  crestalnetwork / intentkit6524
  coleam00 / ottomator-agents5791
  zenml-io / zenml5635
  colanode / colanode5186
  getzep / zep4989
  langflow-ai / openrag4671
  JoshuaC215 / agent-service-toolkit4564
  FlowElement-xinliuyuansu / m_flow4509
  panaversity / learn-agentic-ai4395
  bragai / bRAG-langchain4196
  strukto-ai / mirage3763
  awslabs / agentcore-samples3512
  ding113 / claude-code-hub3399
  rpamis / comet3270
  remix-project-org / remix-project3096
  tsedio / tsed3091
  MetaMask / metamask-mobile3080
  pingcap / autoflow2979
  wassim249 / fastapi-langgraph-agent-production-ready-template2726
  Agent-Field / agentfield2644
  suitenumerique / meet2468
  YFGaia / dify-plus2263
  PrimeIntellect-ai / prime-rl2215
  TheSpaghettiDetective / obico-server1924
  ai-hero-dev / ai-hero1915
  arabold / docs-mcp-server1856
  trailofbits / buttercup1741
  MLSysOps / MLE-agent1580
  kodustech / kodus-ai1565
  bugbasesecurity / pentest-copilot1546
  agentconnect-md / agentconnect1514
  TIGER-AI-Lab / TheoremExplainAgent1513
  hashgraph-online / awesome-codex-plugins1508
  Gsync / jobsync1493
  inkeep / agents1490
  zstar1003 / ragflow-plus1465
  hotovo / aider-desk1463
  cline / kanban1376
  wanxingai / LightAgent1245
  FranciscoMoretti / chat-js1203
  cognizant-ai-lab / neuro-san-studio1194
  okou-ai / okou1162
  alishobeiri / thread-notebook1106
  openops-cloud / openops1081
  dynamiq-ai / dynamiq1073
  trendy-design / llmchat1072
  cuga-project / cuga-agent1070
  Minima-AI-Inc / minima1056
  ZTE-AICloud / Co-Sight1015
  china-qijizhifeng / agentic-harness-engineering959
  sanity-io / next-sanity956
  plastic-labs / tutor-gpt933
  strands-agents / samples924
  andysingal / llm-course891
  groq / openbench832

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