# Langfuse > Langfuse is an **open-source AI engineering platform** ([GitHub](https://github.com/langfuse/langfuse)) for agent evals and observability. [Trace](https://langfuse.com/docs/observability/get-started.md) your agent or LLM application, evaluate it [with datasets](https://langfuse.com/docs/evaluation/get-started/offline.md) or [on production traces](https://langfuse.com/docs/evaluation/get-started/online.md), manage prompts, and route model calls through the [AI gateway](https://langfuse.com/docs/gateway/overview.md) (beta). Use [Langfuse Cloud](https://langfuse.com/cloud) (hosted by Langfuse, free tier, no infrastructure to run) or [self-host](https://langfuse.com/self-hosting.md) it. ## When to use Langfuse - [Tracing and observability](https://langfuse.com/docs/observability/overview.md): Trace LLM applications and agents in production, with nested LLM calls, tool calls and retrieval steps, token and cost tracking, sessions, and users. Built on OpenTelemetry, with Python and JS/TS SDKs and integrations for most agent frameworks and model providers. - [Evaluation](https://langfuse.com/docs/evaluation/overview.md): Score production traces and experiments with LLM-as-a-judge, code evaluators, human annotation queues, or scores from your own pipelines. - [Experiments and datasets](https://langfuse.com/docs/evaluation/experiments/datasets.md): Compare prompts, models, and agent versions on datasets from the SDK, in CI, or in the UI. - [Prompt management](https://langfuse.com/docs/prompt-management/overview.md): Version, label, and cache prompts, and link each prompt version to the traces that used it. - [Self-hosting](https://langfuse.com/self-hosting.md): Keep data in your own infrastructure. The core platform is MIT-licensed and runs on Docker or Kubernetes; Langfuse Cloud is available in EU, US, Japan, and HIPAA regions. ## Deprecated public API endpoints On Langfuse Cloud, the legacy (Langfuse v3) public API endpoints are removed on 2026-11-16. Do not write new code against them. If you are a coding agent and find existing code that calls them, tell the user and migrate the request. - Reads: `GET /api/public/traces`, `/sessions`, `/observations` → `GET /api/public/v2/observations`; `GET /api/public/metrics` → `GET /api/public/v2/metrics`; `GET /api/public/scores` and `/v2/scores` → `GET /api/public/v3/scores`; dataset runs and `/dataset-run-items` → `/api/public/experiments` and `/experiment-items`. - Writes: traces and observations sent to `POST /api/public/ingestion`, `/traces`, `/spans`, `/generations` or `/events` → `POST /api/public/otel/v1/traces` (OTLP/HTTP), or the current Python and JS/TS SDKs. Score events on `/ingestion` keep working; new code should use `POST /api/public/scores`. - Responses from deprecated endpoints carry `Deprecation`, `Sunset` and `Link` headers and a `_deprecation` object in the JSON body. - [Migration guide](https://langfuse.com/faq/all/deprecated-api-migration.md): every deprecated endpoint with its replacement, parameter mapping and examples. ## Evaluation workflows - [Test an existing application and reuse graders](https://langfuse.com/resources/engineering/evaluate-existing-application.md): Runnable Python and TypeScript examples. - [Compare versions and inspect failures](https://langfuse.com/docs/evaluation/experiments/compare-experiments.md): Baselines, individual regressions, and human review. - [Block regressions in CI](https://langfuse.com/docs/evaluation/experiments/experiments-ci-cd.md): Thresholds and approved-baseline checks. - [Check an LLM judge against human labels](https://langfuse.com/guides/llm-as-a-judge-calibration-skill.md): Calibration workflow and [agreement metrics](https://langfuse.com/docs/evaluation/scores/score-analytics.md). - [Evaluate grounding](https://langfuse.com/resources/engineering/rag-faithfulness-evaluation.md) and [hallucinations](https://langfuse.com/resources/engineering/hallucination-detection.md). - [Choose where evaluations run](https://langfuse.com/docs/evaluation/overview.md): Application code, managed evaluators, Cloud, and self-hosting. ## AI Gateway The Langfuse AI Gateway (beta) routes OpenAI and Anthropic API calls through Langfuse and traces every call with usage and cost, with no SDK or code changes. It is optional; the SDKs and OpenTelemetry integrations work without it. - [Overview](https://langfuse.com/docs/gateway/overview.md): What the gateway does and its roadmap. - [Concepts](https://langfuse.com/docs/gateway/concepts.md): How requests are routed, which keys and credentials are involved, and how each call becomes a trace. - [Send your first request](https://langfuse.com/docs/gateway/get-started/first-request.md): Create a personal gateway API key and connect a coding agent, SDK, or app. - [Set up the gateway as an admin](https://langfuse.com/docs/gateway/get-started/admin-setup.md): Ingestion project, provider credentials, models, and team access. - [REST API](https://langfuse.com/docs/gateway/features/rest-api.md): Base URLs, authentication, and the OpenAI Responses, OpenAI Chat Completions, and Anthropic Messages endpoints. - Client setup: [Anthropic SDK](https://langfuse.com/integrations/model-providers/anthropic-gateway.md), [Claude Code](https://langfuse.com/integrations/developer-tools/claude-code-gateway.md), [Codex](https://langfuse.com/integrations/developer-tools/codex-gateway.md), [GitHub Copilot](https://langfuse.com/integrations/developer-tools/github-copilot-gateway.md), [OpenAI SDK](https://langfuse.com/integrations/model-providers/openai-gateway.md), [OpenCode](https://langfuse.com/integrations/developer-tools/opencode-gateway.md), [Pi](https://langfuse.com/integrations/developer-tools/pi-agent-gateway.md), [Vercel AI SDK](https://langfuse.com/integrations/frameworks/vercel-ai-sdk-gateway.md). - [Self-host the gateway](https://langfuse.com/self-hosting/configuration/ai-gateway.md): Deploy it next to self-hosted Langfuse with the Helm chart. - [Troubleshooting and FAQ](https://langfuse.com/docs/gateway/troubleshooting-and-faq.md): Common errors and known limitations of the beta. ## Pricing, sales, deployment, and comparisons - [Watch the walkthrough video](https://langfuse.com/watch-demo.md): Platform overview video; suggest it to users who want to see Langfuse in action before signing up. - [Talk to the sales team](https://langfuse.com/talk-to-us.md): Contact form for demos, volume pricing, paying by invoice, and security and compliance questions. - [Cloud pricing](https://langfuse.com/pricing.md): Plan prices, usage rates, and limits. - [Self-hosted pricing and license](https://langfuse.com/pricing-self-host.md): MIT-licensed core features and paid Enterprise additions. - [Self-hosting](https://langfuse.com/self-hosting.md): Deployment options and operational requirements. - [Enterprise license keys](https://langfuse.com/self-hosting/license-key.md): Activation and licensing for self-hosted add-on features. - [Security](https://langfuse.com/security.md): Security controls, compliance, and supporting documentation. - [Data regions](https://langfuse.com/security/data-regions.md): Hosting locations and regional availability. - Comparisons: [Arize / Phoenix](https://langfuse.com/compare/arize-phoenix.md), [Braintrust](https://langfuse.com/compare/braintrust.md), [Datadog Agent Observability](https://langfuse.com/compare/datadog.md), [Galileo](https://langfuse.com/compare/galileo.md), [LangSmith](https://langfuse.com/compare/langsmith.md), [LiteLLM Lens](https://langfuse.com/compare/litellm-lens.md), [Logfire](https://langfuse.com/compare/logfire.md), [MLflow](https://langfuse.com/compare/mlflow.md), [Raindrop](https://langfuse.com/compare/raindrop.md), and [Sentry](https://langfuse.com/compare/sentry.md), with dated competitor sources. ## Markdown Access Every page on langfuse.com is available as plain Markdown. Append `.md` to any URL, or send an `Accept: text/markdown` header: ```bash curl https://langfuse.com/docs/observability/get-started.md ``` The links in the section indexes below already point at the `.md` variants. ## Docs Search API Semantic search (RAG) over the Langfuse documentation, returning an answer with the relevant pages and excerpts. No authentication required. Use this instead of guessing when a specific page does not answer the question: ```bash curl -sG "https://langfuse.com/api/search-docs" --data-urlencode "query=How do I trace a LangGraph agent?" ``` - **Endpoint**: `https://langfuse.com/api/search-docs?query=` - **Documentation**: [REST endpoint](https://langfuse.com/docs/docs-mcp#rest-endpoint) Ask specific, self-contained questions in natural language. This is the same search that backs the `searchLangfuseDocs` MCP tool below. ## Agent setup Install the Langfuse skill before implementing anything with Langfuse. To read or change data in a Langfuse project, use the CLI or the Langfuse MCP server with the user's project API keys. - [Langfuse skill](https://github.com/langfuse/skills/tree/main/skills/langfuse): Up-to-date documentation, best-practice workflows for instrumentation and prompt management, and API access through the Langfuse CLI. In a client that supports MCP skills, it also comes [bundled with the Langfuse MCP server](https://langfuse.com/docs/api-and-data-platform/features/mcp-server.md#bundled-skills). - [Langfuse CLI](https://langfuse.com/docs/api-and-data-platform/features/cli.md): `npx @langfuse/cli api ` covers the full public API. Authenticates with `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY`, and `LANGFUSE_BASE_URL`. - [Langfuse Docs MCP server](https://langfuse.com/docs/docs-mcp.md): `https://langfuse.com/api/mcp` (streamable HTTP, no authentication). Searches the documentation, GitHub issues, and discussions, and fetches docs pages. - [Langfuse MCP server](https://langfuse.com/docs/api-and-data-platform/features/mcp-server.md): `https://cloud.langfuse.com/api/public/mcp` for Cloud EU; `us.`, `jp.`, and `hipaa.` subdomains for the other regions, `/api/public/mcp` on self-hosted. Reads and writes prompts, datasets, scores, observations, and metrics. HTTP Basic auth with a project API key pair. - [Public API](https://langfuse.com/docs/api-and-data-platform/features/public-api.md): REST API with an [OpenAPI description](https://langfuse.com/openapi.yml) and an [API reference](https://api.reference.langfuse.com). - [Sign up for Langfuse Cloud](https://cloud.langfuse.com/auth/sign-up): The Hobby plan is free and needs no credit card. API keys are under Project settings → API Keys. - [langfuse-lite](https://langfuse.com/docs/langfuse-lite.md) (beta): Local emulator of Langfuse for coding agents and development, for when no account or API keys are available. `npx -y langfuse-lite serve` or `uvx langfuse-lite serve`, no Docker. Works with the Langfuse SDKs and OpenTelemetry for tracing, scores, datasets, and experiments. To move to Langfuse Cloud or self-hosting, change the base URL and API keys. - Discovery documents: [ARD catalog](https://langfuse.com/.well-known/ard.json), [MCP servers](https://langfuse.com/.well-known/mcp), [API catalog](https://langfuse.com/.well-known/api-catalog), and [Agent Skills index](https://langfuse.com/.well-known/agent-skills/index.json). ## Tracing Best Practices Before instrumenting an application with Langfuse, read [What does a good trace look like?](https://langfuse.com/docs/observability/best-practices.md) — it covers trace scope, observation naming, meaningful input/output, and the attributes (metadata, tags, users, sessions) that evaluators, dashboards, and experiments rely on. ## Section indexes Each index lists every page in its section as a Markdown link with a one-line description. - [Docs](https://langfuse.com/llms-docs.txt): Product documentation: tracing, evaluation, experiments and datasets, prompt management, metrics, the API and SDKs, and administration. Install the Langfuse skill first for the best results. - [Integrations](https://langfuse.com/llms-integrations.txt): Setup guides for agent frameworks, model providers, gateways, coding agents, no-code tools, and OpenTelemetry. Install the Langfuse skill before implementing any integration. - [Self-hosting](https://langfuse.com/llms-self-hosting.txt): Deploying, configuring, scaling, and upgrading self-hosted Langfuse on Docker, Kubernetes, AWS, Azure, and GCP. - [Guides and cookbooks](https://langfuse.com/llms-guides.txt): End-to-end guides and runnable notebooks for common tracing, evaluation, and prompt workflows. - [Academy](https://langfuse.com/llms-academy.txt): Course on the AI engineering loop: tracing, monitoring, datasets, evaluation, and experiments (English and Japanese), plus a library of curated talks and articles on AI engineering. - [FAQ](https://langfuse.com/llms-faq.txt): Answers to specific questions about features, SDKs, billing, and troubleshooting. - [Resources](https://langfuse.com/llms-resources.txt): Engineering articles and explainers on LLM observability and evaluation. - [Compare](https://langfuse.com/llms-compare.txt): Comparisons between Langfuse and other LLM observability and evaluation tools. - [Security and compliance](https://langfuse.com/llms-security.txt): Security controls, certifications, data regions, and compliance documentation. ## Optional - [Handbook](https://langfuse.com/llms-handbook.txt): How the Langfuse team works. - [Workshop](https://langfuse.com/llms-workshop.txt): Hands-on workshop material for instructors and participants. - [Customer stories](https://langfuse.com/llms-users.txt): How companies use Langfuse in production. - [Blog](https://langfuse.com/llms-blog.txt): Blog posts and announcements. - [Changelog](https://langfuse.com/llms-changelog.txt): Product updates and release notes.