Skip to content

Export Langfuse traces with your coding agent

Your coding agent exports traces from Langfuse Cloud or a self-hosted Langfuse into local files, which you then upload to Moyai. To export from the Langfuse UI instead, follow Export traces from Langfuse.

You need Python 3.9 or later. The export only reads from Langfuse: it changes nothing there.

  1. Run the export skill

    Paste this prompt into your coding agent:

    Follow https://raw.githubusercontent.com/moyai-gray/agent-observability-skills/main/plugins/trace-export/skills/export-langfuse-traces/SKILL.md, including downloading and running its export script, to export my Langfuse traces.

    The skill asks where your Langfuse runs, then opens a form in your browser for your API keys. In Langfuse, create an API key under your project’s settings: a read-only Viewer key is enough. Paste it into the form. Your agent never sees the keys: they go into a temporary file that the skill deletes when it’s done.

    It then asks which traces to export (the last 7 days, unless you say otherwise) and where to write them (./langfuse-export by default).

  2. Upload the export to Moyai

    The skill writes traces.jsonl, one trace per line, and manifest.json, a summary of what it exported. Upload traces.jsonl on the upload page of the Moyai dashboard.

  3. Delete the API key

    Once the export is done, you can delete the key under API Keys in your Langfuse project’s settings.