Install
$ npx skills add langfuse/langfuse-docsREADME
# GitHub Repository: langfuse/langfuse-docs
**URL:** https://github.com/langfuse/langfuse-docs
**Author:** langfuse
**Description:** 🪢 Langfuse documentation -- Langfuse is the open source LLM Engineering Platform. Observability, evals, prompt management, playground and metrics to debug and improve LLM apps
**Homepage:** https://langfuse.com
**Language:** MDX
## Stats
- Stars: 211
- Forks: 245
- Open Issues: 132
- Commits: 6068
- Created: 2023-05-22T14:48:56Z
- Updated: 2026-06-18T15:56:50Z
- Pushed: 2026-06-18T15:56:38Z
## README
<img width="2400" height="600" alt="hero-b" src="https://github.com/user-attachments/assets/382a0209-262d-42b0-8107-e0997c568d13" />
# Langfuse Docs
Repo for [langfuse.com](https://langfuse.com). Built with [Fumadocs](https://fumadocs.vercel.app/) and Next.js App Router.
## Local Development
Pre-requisites: Node.js 22, pnpm v9.5.0
To use Node 22 (e.g. with [nvm](https://github.com/nvm-sh/nvm)): `nvm install 22` then `nvm use` (or `nvm use 22`). The repo includes an `.nvmrc` so `nvm use` picks 22 automatically.
1. Optional: Create env based on [.env.template](./.env.template)
2. Run `pnpm i` to install the dependencies.
3. Run `pnpm dev` to start the development server on localhost:3333
## Formatting
This repo uses [Prettier](https://prettier.io/) for formatting supported source and content files, including Markdown and MDX.
- Run `pnpm run format` to format files.
- Run `pnpm run format:check` to check formatting in CI mode.
Markdown prose wrapping is preserved and embedded-language formatting is disabled in `.prettierrc.json` so formatting does not change linebreak-sensitive Markdown rendering or fenced code snippet contents.
## Python cookbooks
All Jupyter notebooks are in the `cookbook/` directory. For JS/TS notebooks we use Deno, see Readme in cookbook folder for more details.
To render them within the documentation site, we convert them to markdown using `jupyter nbconvert`, move them to the right path in the `content/guides/cookbook/` directory where they are picked up by Fumadocs.
Steps after updating notebooks:
1. Ensure you have [uv](https://docs.astral.sh/uv/) installed
2. Run `bash scripts/update_cookbook_docs.sh` (uv will automatically handle dependencies)
3. Commit the changed markdown files
**Note**: All `.md` or `.mdx` files that contain "source: ⚠️ Jupyter Notebook" on top in `content/guides/cookbook/` are automatically generated from Jupyter notebooks. Do not edit them manually — they will be overwritten. Always edit the Jupyter notebooks and run the conversion script.
## Media
### Images
We store all images in the `public/images/` directory. To use them in the markdown files, use the absolute path `/images/your-image.png`.
### Videos / Gifs
We use a bucket on Cloudflare R2 to store all video. It is hosted on https://static.langfuse.com/docs-videos. Ping one of the maintainers to upload a video to the bucket and get the src.
To embed a video, use the Video component and set a title and fixed aspect ratio. Point src to the mp4 file in the bucket.
To embed a "gif", actually embed a video and use `gifMode` (`<Video src="" gifMode />`). This will look like a gif, but at a much smaller file size and higher quality.
## Stack
- [Fumadocs](https://fumadocs.vercel.app/) (docs framework)
- [Next.js](https://nextjs.org/) App Router
- [shadcn/ui](https://ui.shadcn.com)
- [Tailwind CSS](https://tailwindcss.com/)
Interested in stack of Q&A docs chatbot? Checkout the [blog post](https://langfuse.com/blog/qa-chatbot-for-langfuse-docs) for implementation details (all open source)
## Search & AI chat
The docs site uses [Inkeep](https://inkeep.com/) for two separate embeds:
- **Search** — Inkeep's embedded search widget.
- **Ask AI chat** — Fumadocs' built-in Inkeep chat integration.
## LLM Features
The docs site includes four interconnected features designed to make documentation accessible to LLMs and AI tools:
1. **Markdown URL endpoints** (`.md` suffix): Append `.md` to any URL (e.g., `/docs.md`) to get raw markdown. Built at compile time via `scripts/copy_md_sources.js` which copies all `.mdx`/`.md` files from `content/` to `public/md-src/` as static `.md` files with inlined MDX components.
2. **Copy as Markdown button**: UI button on docs pages that fetches the `.md` endpoint and copies to clipboard for pasting into ChatGPT/Claude/Cursor.
3. **Export as PDF links**: API endpoint `/api/md-to-pdf` that fetches markdown from `.md` URLs and converts to PDF using Puppeteer. Used on legal pages (terms, privacy, DPA, etc.).
4. **MCP Server**: Model Context Protocol server at `/api/mcp` with three tools:
- `searchLangfuseDocs`: RAG search via Inkeep API
- `getLangfuseDocsPage`: Fetches specific page markdown from `.md` URLs
- `getLangfuseOverview`: Returns `llms.txt` overview
All three user-facing features (Copy, PDF, MCP) depend on the same foundation of pre-built static markdown files, making them fast, cacheable, and reliable. See [RESEARCH-LLM-FEATURES.md](./RESEARCH-LLM-FEATURES.md) for detailed implementation details.
## Bundle analysis
Run `pnpm run analyze` to analyze the bundle size of the production build using `@next/bundle-analyzer`.
Information
Repository
Language
MDX
Created
2026/6/18
Updated
2026/6/19