Langfuse traces, sized for coding agents
Ask your coding agent about your LLM app in plain English. It answers from your Langfuse data with lf, a command-line tool and agent skill: failing traces with their error messages, a trace as a tree, conversations, cost, latency, prompts and scores.
$ curl -fsSL https://tns15june.github.io/langfuse-agent-cli/install.sh | sh
It installs lf with uv or pipx and runs lf setup: your Langfuse keys, the agent skill, and a check. To install it yourself: uv tool install langfuse-agent-cli, then lf setup. Works with Langfuse v4, self-hosted or Cloud.
lf trace get 33579e8e8ec602e878f0744ad53ac1fe --timeline Trace 33579e8e8ec602e878f0744ad53ac1fe: 3 observations, 1 error ✓ AGENT support-agent-turn ✓ GENERATION plan-step (model: gpt-4o-mini) ✗ [ERROR] TOOL search_tool_call Message: 503 Service Unavailable lf trace list --limit 100 --output-summary { "summary": true, "outputFile": "/tmp/lf-y7qgu_0r.json", "bytes": 24322, "rows": 36, "rowKeys": ["id", "traceId", "name", "level", "latency", …], "hint": "The JSON output is larger than 16 KB, so it was …" }
Ask in plain English
Start a new session of your coding agent and ask, for example:
- “Why did my LLM app fail in the last hour?”
- “Which tool fails most often this week, and since when?”
- “What did we spend on each model this week?”
- “Which step of my agent is the slowest?”
- “Walk me through the conversation in session sess-42.”
- “Which version of the welcome-bot prompt is live, and how does it read for Alice?”
More questions, with the commands your agent runs for them: agent examples.
Smaller output, same answers
Measured on Langfuse 4.70 with synthetic data. Real traces with long prompts and outputs shrink by more.
From a question to a diagnosis
Claude Code, Codex, Cursor…
Asked “why did my app fail?”, it loads the skill on its own.
SKILL.md
Teaches the commands and the rules: keep output small, read before writing, never ask for keys in chat.
lf
Reads traces from /api/public/v2/observations, totals for cost, latency and errors from /api/public/v2/metrics, plus prompts, datasets and scores.
Compact JSON, a tree, or a summary file
Sized for a context window, with errors and their messages up front.
One line for your coding agent
Install langfuse-agent-cli using https://tns15june.github.io/langfuse-agent-cli/AGENTS.md
- The agent finds or installs
lf, with the one-line installer or with uv or pipx. - It runs
lf setup --yes, which installs the skill for that agent and never prompts. - If no keys are configured, it asks you to run
lf setupin your own terminal. It never asks for keys in chat. - It reports what
lf doctorfound and suggests a first question to try.
Tested the way people will use it
- Each agent session had only the skill installed. It picked the skill on its own, chose the commands, and its answer matched the data: the failing tool and its errors, spend by model, tokens per day, a conversation, one user's day, the live prompt version and the scores.
- The one-line installer ran end to end in a clean home folder: it installed
lfwith uv, then the skill, andlf doctorpassed. - CI runs weekly against the newest Langfuse release, so API changes show up before users report them.