---
title: Import Langfuse conversations into Agent Analytics
description: "Forward agent conversations traced in Langfuse to Agent Analytics with a scheduled job that pulls settled sessions and sends them as [Agent] events."
product: general
lang: en
token_estimate: 896
---
# Import Langfuse conversations into Agent Analytics

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

The Langfuse integration forwards agent conversations that Langfuse already traces into Agent Analytics, including past conversations. A scheduled job in your infrastructure pulls settled Langfuse sessions from the observations API, maps them to `[Agent]` events, and sends them to the Amplitude HTTP API. Amplitude then builds sessions, turns, and tool calls, and runs built-in signals.

If your app already emits OpenTelemetry, you can add Amplitude as a second OTLP exporter alongside Langfuse instead of running this job. Refer to [Send OpenTelemetry traces to Agent Analytics](https://amplitude.com/docs/amplitude-ai/agent-analytics/instrument-opentelemetry). Use this integration to forward what's already in Langfuse, including history.

## Set up with your AI coding agent (recommended)

Paste this prompt into your AI coding agent, such as Cursor, Claude Code, Windsurf, GitHub Copilot, or Codex. The agent fetches the guide, builds the job, and starts with a dry run.

```text
Connect our Langfuse sessions to Amplitude Agent Analytics.

Fetch https://raw.githubusercontent.com/amplitude/Amplitude-AI-Node/main/docs/integrations/langfuse.md
and follow "Part 2: Coding agent procedure". Start with a dry run.
```

The agent stops and asks for values it can't infer, such as which field holds your user ID. Review its changes, then verify with the steps in [Get started](#get-started).

## What this means for you

- **You run**: A TypeScript job on a schedule, for example hourly. It stores a watermark between runs.
- **You need**: A Langfuse public key and secret key, your Langfuse host (EU, US, Japan, HIPAA, or self-hosted), and your Amplitude project API key. Self-hosted Langfuse v3 doesn't have the v2 observations API, so upgrade to v4.
- **Your app must set**: `sessionId` and `userId` on its traces. The job skips and counts sessions without them.

## What carries over

| Data | Carries over |
| --- | --- |
| Session grouping | Yes, one Langfuse session becomes one session |
| Model | Yes |
| Tokens | Yes |
| Cost | Yes, Langfuse's cost value. Amplitude doesn't recompute it. |
| Tool calls | Yes |
| Langfuse scores | No, unless you map them to Scores in the job |

Content that Langfuse masked stays masked.

## Freshness and limits

- **Settle time**: The job treats a session as finished after 2 hours with no new traces. Never set it below 20 minutes, because some Langfuse SDKs and OTLP ingestion deliver traces up to 15 minutes late.
- **Long sessions**: The job looks back 7 days for earlier traces in a session. The job leaves traces older than that out of the session.
- **Rate limits**: Langfuse rate-limits its public API per organization and plan. The job retries on `429` and stops without advancing its watermark if retries run out.
- **Resends**: Events sent after a session's `[Agent] Session End` don't get new built-in signal results. Amplitude deduplicates resent events within 7 days.

## Get started

Follow the [Langfuse integration guide](https://github.com/amplitude/Amplitude-AI-Node/blob/main/docs/integrations/langfuse.md). Start with a dry run, check Live Events and the session viewer after the first real run, then re-run the same window to confirm it adds no duplicates.

Guide last verified on October 6, 2026. Langfuse is a trademark of its owner. Amplitude isn't affiliated with or endorsed by Langfuse.

