Langfuse 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
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
pip install langfuse
- Uses Pydantic for typing and validation
- Langchain callback handler
→ For more information, see Python docs.