Langfuse
Langfuse

Go through Langfuse traces and catch quality drops

Connect Langfuse to the AI agent: traces, generations, scores, sessions, prompts and datasets. The agent finds failed generations and quality drops.

How the agent works with Langfuse

The agent reads the Langfuse public API: traces and the generations nested inside them, scores, sessions, prompt versions and the dataset items of the project. On top of that it builds the analysis — how many traces there were over the period and what share of them ended in an error, which steps lost time, how scores moved and which conversations dropped in quality the most. The same analysis arrives as a digest on schedule.

A trace here is not a flat record but a tree of observations, so slow at the trace level does not yet mean a slow generation: the time may be going into a neighbouring step, and the agent names the specific link. A score likewise lives as its own entity attached to a trace, while a session glues many traces into one conversation — the agent looks for a quality drop across that connection, not at a single rating detached from the dialogue.

The agent only reads observability data: it sends no traces of its own into your project and does not change prompt versions without an explicit request — editing a prompt stays your action, the agent merely ties it to the change in scores. This connection has no webhooks from Langfuse, so it reports a drop when you ask or on the digest schedule you agreed, not at the moment the drop happened.

The keys are stored encrypted and sent as basic auth with every request; revoking the pair in the key list kills the connection at once, with no waiting for an expiry. The pair covers a single project: neighbouring projects of the same organisation stay invisible, and each one needs its own pair. Long periods are fetched page by page at a deliberately modest request rate, so one report does not eat the project quota. When there is no data for the period, the agent says so directly instead of drawing an empty chart.

Integration scenarios

Trace review for the last 24 hours

The agent goes through a day of traces and shows where generations failed and which steps lost the most time.

Answer quality drop

The agent matches scores to sessions and names the conversations where answer quality fell the most.

Observability digest

The agent sends a digest on schedule: how many traces there were, what share of them failed and how scores moved over the chosen period.

Prompts and datasets

The agent pulls the prompt versions and dataset items of the project so you can tie a prompt edit to a change in scores.

Digging into one conversation

The agent glues the traces of a session into one conversation and unfolds the tree of observations — you see which step the answer went wrong on and what it cost in time.

What the dataset covers

The agent pulls dataset items together with the traces and scores attached to them and shows which cases are already checked and which have no rating at all.

Langfuse examples

Langfuse
Langfuse
Frozen chats — click a question
Скоры просели, посмотри где

Средний скор упал с 0,82 до 0,67 после версии промпта v12.

Сопоставил скоры с сессиями: сильнее всего просели диалоги с длинным контекстом — 34 сессии из 210. В трейсах там же выросла доля обрывов генерации до 6%.

Просадка скоров

Document · DOCX

How to connect

Before you connect

  • The Owner or Admin role in the Langfuse project.
  • A Langfuse project that already receives traces.
  1. 1

    Sign in to Langfuse in your region

    EU is https://cloud.langfuse.com, US https://us.cloud.langfuse.com, Japan https://jp.cloud.langfuse.com. Open the project you need.

  2. 2

    In project Settings open “API Keys”

    Inside the project go to Settings → "API Keys". You need the Owner or Admin role: Member and Viewer cannot open project settings.

  3. 3

    Create a new key pair and copy both values

    A pair is a public key prefixed pk-lf- and a secret one prefixed sk-lf-. Copy both right away: you need the full secret, the shortened preview is not enough.

FAQ

With a project key pair: open the project, go to Settings, then API Keys, and create a pair. The public key starts with pk-lf-, the secret one with sk-lf-. If the project is not in the EU region, set host: for example, https://us.cloud.langfuse.com or the domain of your own installation.

Traces and generations, scores, sessions, prompt versions and datasets of one project: keys are issued per project, not for the whole organisation.

By default the agent reads observability data and reports in chat: it sends no traces of its own and does not change prompts without your request.

Only a project Owner or Admin can create a key pair — Member and Viewer cannot open the settings section. The agent itself only needs a key pair that already exists.

Related integrations

Category
Development
Connection
API key
Documentation
Langfuse

Connect Langfuse

Connecting takes a couple of minutes, and your data stays in your own systems.

Connect