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.
-
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.Install the plugin, then run the skill:
/plugin marketplace add moyai-gray/agent-observability-skills/plugin install trace-export@moyai/export-langfuse-tracesThe 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-exportby default). -
Upload the export to Moyai
The skill writes
traces.jsonl, one trace per line, andmanifest.json, a summary of what it exported. Uploadtraces.jsonlon the upload page of the Moyai dashboard. -
Delete the API key
Once the export is done, you can delete the key under API Keys in your Langfuse project’s settings.