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)
- Interfaces
- Server-side
- Client-side, meant to be used in the browser to report scores
Python
pip install langfuse
- Based on OpenTelemetry, so you can use any OTEL-based instrumentation library for your LLM. See our docs for more details.
- Uses Pydantic for typing and validation
- Interfaces
Was this page helpful?