langfuse

Query a self-hosted Langfuse instance to list prompts, fetch traces, and test prompts against OpenAI.

Updated May 11, 2026
One-click install
npx skills add https://github.com/mmnavarr/harness --skill langfuse-mmnavarr
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: langfuse
Source: https://github.com/mmnavarr/harness/tree/main/skills/langfuse
Command: npx skills add https://github.com/mmnavarr/harness --skill langfuse-mmnavarr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Programmatic access to the Alliance Network self-hosted Langfuse instance is blocked by Cloudflare Access on the public domain, causing SDK calls to fail with JSON parse errors. This Skill routes API calls through the Railway Tailscale gateway so you can inspect prompts, traces, and generations from a laptop. ## Core Features & Use Cases - Prompt Inspection: List all prompts in a project with versions and labels, or fetch a specific prompt's content for local reuse. - Trace Auditing: Fetch traces and generations by ID to see exactly what LLM calls bullqueue made for a given database row. - End-to-End Prompt Testing: Run a prompt against OpenAI with real production credentials using the included script template, without deploying code changes. - Use Case: While debugging the investor-update classifier, fetch the investor-update-analyze prompt, compile it with sample email vars, and run it against OpenAI locally to validate a prompt change before shipping. ## Quick Start Ask the AI to list all prompts in the Langfuse Space project and fetch the latest version of the investor-update-analyze prompt.

Frequently Asked Questions about langfuse

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query the Langfuse API when Cloudflare Access blocks programmatic clients?▼

Route requests through the Railway Tailscale gateway at http://<tailscale-ip>:13676 instead of the public domain. The gateway exposes the same Langfuse-web service without the Cloudflare layer, which is how production services reach it.

How do I fetch a Langfuse prompt by name using the REST API?▼

Send a GET request to /api/public/v2/prompts/<PROMPT_NAME>?label=latest with an Authorization header containing Basic base64(public_key:secret_key). The label parameter defaults to production, so specify latest explicitly if needed.

Why does the Langfuse SDK fail with 'Failed to parse JSON'?▼

The SDK is hitting the Cloudflare Access-gated public URL, which redirects non-browser clients to a login page instead of returning JSON. Point LANGFUSE_BASE_URL at the Tailscale gateway IP and port 13676 to bypass the gate.

Can I test a Langfuse prompt against OpenAI without deploying code?▼

Yes. Fetch the prompt with label=latest, compile its Mustache-style variables, and call the OpenAI chat completions API with a strict json_schema response format. The included run-prompt.template.mjs script replicates this flow locally.

Can I create or edit Langfuse prompts through this API workflow?▼

No. This workflow is read-only by design because prompts are shared production infrastructure. Create or edit prompts through the Langfuse UI at langfuse.alliancetools.xyz only after explicit user confirmation.