https://github.com/langfuse/langfuse-js
🪢 Langfuse JS/TS SDKs - Instrument your LLM app and get detailed tracing/observability. Works with any LLM or framework
https://github.com/langfuse/langfuse-js
javascript langfuse llmops observability sdk-js typescript
Last synced: 5 days ago
JSON representation
🪢 Langfuse JS/TS SDKs - Instrument your LLM app and get detailed tracing/observability. Works with any LLM or framework
- Host: GitHub
- URL: https://github.com/langfuse/langfuse-js
- Owner: langfuse
- License: other
- Created: 2023-07-02T21:43:44.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2026-05-20T09:38:03.000Z (15 days ago)
- Last Synced: 2026-05-20T13:20:22.701Z (15 days ago)
- Topics: javascript, langfuse, llmops, observability, sdk-js, typescript
- Language: TypeScript
- Homepage: https://langfuse.com/docs/sdk/typescript
- Size: 5.66 MB
- Stars: 140
- Watchers: 2
- Forks: 86
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Agents: AGENTS.md
Awesome Lists containing this project
- awesome-side-quests - langfuse/langfuse-js
README

# langfuse-js
[](https://opensource.org/licenses/MIT)
[](https://github.com/langfuse/langfuse-js/actions/workflows/ci.yml?query=branch%3Amain)
[](https://github.com/langfuse/langfuse)
[](https://discord.gg/7NXusRtqYU)
[](https://www.ycombinator.com/companies/langfuse)
Modular mono repo for the Langfuse JS/TS client libraries.
## Packages
> [!IMPORTANT]
> The SDK was rewritten in v5 and released in March 2026. Refer to the [v5 migration guide](https://langfuse.com/docs/observability/sdk/upgrade-path/js-v4-to-v5) for instructions on updating your code.
| Package | NPM | Description | Environments |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | ------------ |
| [@langfuse/client](./packages/client) | [](https://www.npmjs.com/package/@langfuse/client) | Langfuse API client for universal JavaScript environments | Universal JS |
| [@langfuse/tracing](./packages/tracing) | [](https://www.npmjs.com/package/@langfuse/tracing) | Langfuse instrumentation methods based on OpenTelemetry | Node.js 20+ |
| [@langfuse/otel](./packages/otel) | [](https://www.npmjs.com/package/@langfuse/otel) | Langfuse OpenTelemetry export helpers | Node.js 20+ |
| [@langfuse/openai](./packages/openai) | [](https://www.npmjs.com/package/@langfuse/openai) | Langfuse integration for OpenAI SDK | Universal JS |
| [@langfuse/langchain](./packages/langchain) | [](https://www.npmjs.com/package/@langfuse/langchain) | Langfuse integration for LangChain | Universal JS |
## Documentation
- [Docs](https://langfuse-docs-git-add-js-sdk-v4-docs-langfuse.vercel.app/docs/observability/sdk/typescript/overview)
- [Reference](https://langfuse-js-git-main-langfuse.vercel.app/)
## Development
This is a monorepo managed with pnpm. See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed development instructions.
Quick start:
```bash
pnpm install # Install dependencies
pnpm build # Build all packages
pnpm test # Run tests
pnpm ci # Run full CI suite
```
## License
[MIT](LICENSE)