> ## Documentation Index
> Fetch the complete documentation index at: https://arize-ax.mintlify.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate from Langfuse to Arize AX

> Import historical Langfuse observations into Arize AX with a coding-agent skill, then continue tracing in AX.

Move historical Langfuse observations into Arize AX so past traces are available next to the AX workflows your team uses for debugging and evaluation.

Importing history is different from pointing your app at AX for the first time. Instrumentation alone only captures **new** traffic. The migration skill copies **existing** Langfuse observations into an AX project with OpenInference attributes your AX UI expects.

## What you can migrate

| Migrated by the coding-agent skill | Recreate or re-run in AX |
| - | - |
| Historical observations and traces | Evaluators and experiments (re-run for now) |
| Observation inputs and outputs | Old Langfuse scores as AX experiment truth |
| Parent observation links | |
| Trace `sessionId` / `userId` → AX session and user | |
| Datasets and examples | |
| Prompts (latest and/or versions + labels) | |

The skill maps observation output to plain-text `output.value`, keeps parent/child links, and copies Langfuse session and user IDs onto AX spans. If your Langfuse project also has unrelated experiment traffic, you can limit the import with a Langfuse **tag**.

## Migrate existing Langfuse data

<Steps>
  <Step title="Install the migration skill">
    ```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
    npx skills add Arize-ai/arize-skills --skill arize-migrate-langfuse --yes
    ```

    See [Install skills](/docs/ax/skills/install) if you need the full Arize Skills setup.
  </Step>

  <Step title="Ask your coding agent to start">
    > Use the Arize Langfuse migration skill. I want to import historical Langfuse traces into AX.

    Tell the agent your Langfuse region or host, optional tag filter, and the AX space and destination project you want. Prefer a **new** AX project name so you can review the import cleanly.
  </Step>

  <Step title="Provide connection details privately">
    Give the agent credentials through a local env file path you control, or let it generate a secure command you run in a separate terminal. Do not paste API keys into agent chat.

    * Langfuse: `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY`, and `LANGFUSE_BASE_URL`
      * EU Cloud: `https://cloud.langfuse.com`
      * US Cloud: `https://us.cloud.langfuse.com`
      * Self-hosted: your Langfuse origin
    * [Create or find an AX API key](/docs/ax/security-and-settings/api-keys) and space ID for OTLP ingest

    Use the same region (or host) that issued your Langfuse keys. A US key against the EU host returns auth errors.
  </Step>

  <Step title="Review the plan and import">
    The agent confirms the Langfuse host, optional tag filter, destination AX project, and import scope. Approve before it writes to AX.

    It exports observations from the Langfuse public API and ingests them into AX over OTLP. Small windows finish quickly; larger histories take longer while AX indexes spans.
  </Step>

  <Step title="Verify in Arize AX">
    In the destination project, open a few traces and check:

    1. **Output** — agent and generation spans show readable final text (not a raw message/parts dump)
    2. **Tree** — tools and generations nest under the parent observation
    3. **Sessions** — traces that had a Langfuse `sessionId` share an AX session
    4. **Kinds** — generations look like LLM spans, tools like TOOL, agents like AGENT when Langfuse typed them that way

    If something looks wrong, re-import into a fresh project after the agent adjusts filters or mapping.
  </Step>

  <Step title="Migrate prompts (optional)">
    Ask the agent to import Langfuse prompts (`GET /api/public/v2/prompts`) into the AX Prompt Hub. You can choose **latest / production label only** or **all versions**.

    The agent fetches each version, maps text or chat prompts into AX messages, creates the prompt, then adds versions in order and applies Langfuse labels (for example `production`, `staging`) with `set_labels`.
  </Step>
</Steps>

## What good imported traces look like

| Langfuse concept | In Arize AX |
| - | - |
| Trace | Trace (shared `traceId`) |
| Observation (generation, span, agent, tool, …) | Span with `openinference.span.kind` |
| Observation `output` | `output.value` as readable text |
| Trace `sessionId` | `session.id` |
| Trace `userId` | `user.id` |

## After you migrate

Historical import does not change where your **running app** sends new spans. When you are ready for new traffic in AX, follow [Set up tracing](/docs/ax/instrument/set-up-tracing) and [Configure your tracer](/docs/ax/instrument/configure-your-tracer).

<Note>
  Keep Langfuse available until you have verified the import, because the skill reads from the Langfuse API. See the [arize-migrate-langfuse skill source](https://github.com/Arize-ai/arize-skills/tree/main/skills/arize-migrate-langfuse) for current behavior and limits.
</Note>

## Related guides

* [Migrate from LangSmith](/docs/ax/cookbooks/migrate/migrate-from-langsmith)
* [Migrate from Braintrust](/docs/ax/cookbooks/migrate/migrate-from-braintrust)
* [Migrate from Phoenix](/docs/ax/cookbooks/migrate/migrate-from-phoenix)
* [Skill catalog](/docs/ax/skills/catalog)
