Skip to content

langfuse/langfuse-vercel-ai-nextjs-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0bf88d7 · Mar 4, 2025

History

8 Commits
Aug 2, 2024
Aug 2, 2024
Aug 2, 2024
Mar 4, 2025
Aug 2, 2024
Aug 2, 2024
Aug 2, 2024
Aug 2, 2024
Aug 2, 2024
Aug 2, 2024
Aug 2, 2024

Repository files navigation

NextJs, Vercel AI SDK, and Langfuse Example

This example repo demostrates how to use Langfuse to instrument a NextJs app with the Vercel AI SDK. This repo is based on the next-openai example.

Relevant Files:

  • instrumentation.ts - Register the LangfuseExporter
  • app/routes/api/* - Enable experimental_telemetry in AI SDK routes

See the integration docs for more information and a step-by-step guide: https://langfuse.com/docs/integrations/vercel-ai-sdk