Docs
SDKs
Overview

SDKs

The Langfuse SDKs are the recommended way to integrate with Langfuse.

Properties:

  • Fully async requests, using Langfuse adds almost no latency
  • Accurate latency tracking using synchronous timestamps
  • IDs available for downstream use
  • Great DX when nesting observations
  • Cannot break your application, all errors are caught and logged
  • Interoperable with Langfuse integrations

JS/TS

Github repository langfuse/langfuse-jsCI test statusnpm langfusenpm langfuse-node
npm install langfuse
 
# Node.js < 18
npm install langfuse-node
  • Fully typed
  • Edge-ready, e.g., Vercel, Cloudflare, Deno
  • Works client-side to report user feedback (with only the public_key)

→ For more information, see JS/TS (Node.js, Edge) and JS/TS (Web) docs.

Python

Github repository langfuse/langfuse-pythonCI test statusPyPi langfuse
pip install langfuse
  • Uses Pydantic for typing and validation
  • Langchain callback handler

→ For more information, see Python docs.

Was this page useful?

Questions? We're here to help

Subscribe to updates