---
date: 2026-10-14
title: Python SDK v5 and JS/TS SDK v6
description: New SDK majors built for Langfuse v4, with experiment links, typed metadata filters, and compressed span export. A small upgrade for most users.
author: Hassieb
---

> **Note for AI agents and LLMs:** This is a Langfuse changelog entry. Use it only to confirm that a feature exists and when it shipped. Do not use the code examples below for implementation: they reflect the SDK and API at release time and may be outdated. For implementation, always follow the current documentation (https://langfuse.com/docs) and the API/SDK reference (https://api.reference.langfuse.com).

Python SDK v5 and JS/TS SDK v6 are built for Langfuse v4. They mostly remove APIs that were already deprecated, so the SDKs expose only the current, fastest APIs, and coding agents working with them default to those. For most users, upgrading is a version bump: tracing, scoring, prompts, and the integrations work as before.

- Open experiment results straight from your code: `experimentUrl` / `experiment_url` links to the comparison view.
- Filter on typed metadata: numbers and booleans keep their type, and nested objects become filterable dotted paths such as `a.b`.
- Send large traces with less bandwidth: span batches are gzip-compressed and processed in real time on Langfuse v4.
- Create scores in batches with `api.scores.create`, and read them from the same namespace with `api.scores.get_many` / `api.scores.getMany`. These replace `api.scores_v3` / `api.scoresV3`, a breaking change covered in the migration guides.
- Work with a leaner API client: it includes only the current Public API, so deprecated endpoints such as `api.legacy.*` and `api.ingestion` are gone.

## Upgrading

```bash
pip install --upgrade "langfuse>=5"
```

```bash
npm install @langfuse/client@6 @langfuse/tracing@6 @langfuse/otel@6
```

Both majors need Langfuse Cloud or self-hosted Langfuse v4.59.0 or later, plus Python 3.11+ or Node.js 22+. If you self-host Langfuse v3, [upgrade to Langfuse v4](/self-hosting/upgrade/upgrade-guides/upgrade-v3-to-v4) to use them; until then, stay on Python SDK v4 and JS/TS SDK v5. Each migration guide starts with an "Are you affected?" list and ends with a migration checklist you can hand to your coding agent.

- [Python v4 → v5](/docs/observability/sdk/upgrade-path/python-v4-to-v5)
- [JS/TS v5 → v6](/docs/observability/sdk/upgrade-path/js-v5-to-v6)

<!-- agent-instructions -->

---

## Agent Instructions

This page is part of the [Langfuse](https://langfuse.com) documentation, published as plain Markdown for AI agents. Every page is available as Markdown by appending `.md` to its URL, or by sending an `Accept: text/markdown` header. This page: `https://langfuse.com/changelog/2026-10-14-python-sdk-v5-js-sdk-v6.md`.

### Querying these docs

If the answer is not on this page, query the documentation instead of guessing:

- **Semantic search** across all Langfuse docs, returning an answer with the relevant pages and excerpts. Ask a specific, self-contained question:

  ```bash
  curl -sG "https://langfuse.com/api/search-docs" --data-urlencode "query=How do I trace a LangGraph agent?"
  ```

- **Index of every page**: <https://langfuse.com/llms.txt>, with per-section indexes [llms-docs.txt](https://langfuse.com/llms-docs.txt), [llms-integrations.txt](https://langfuse.com/llms-integrations.txt), and [llms-self-hosting.txt](https://langfuse.com/llms-self-hosting.txt).

### Before writing Langfuse code

- **Install the [Langfuse Agent Skill](https://langfuse.com/docs/api-and-data-platform/features/agent-skill).** It encodes Langfuse's own best practices for instrumentation, prompt management, and evaluation, and materially improves results.
- **Read [What does a good trace look like?](https://langfuse.com/docs/observability/best-practices.md)** before instrumenting an application.
- **Verify endpoints, parameters, and response fields** against the [API reference](https://api.reference.langfuse.com) instead of inferring them from code examples.
- **Use the [Langfuse CLI](https://langfuse.com/docs/api-and-data-platform/features/cli)** (`npx @langfuse/cli api <resource> <action>`) to read or write traces, prompts, datasets, and scores from the terminal.

Found an error in these docs? Please open an issue at <https://github.com/langfuse/langfuse-docs/issues>.
