LangfuseMCP: Agent for Claude Code

.claude/agents/langfuse-analyst.md

langfuse-analyst is an agent for Claude Code from DrishtantKaushal/LangfuseMCP. It costs 86 tokens per session (719 once invoked), scanned A, original, MIT.

An agent for analysing Langfuse data, where Langfuse is a monitoring system for AI applications. It examines traces, sessions, errors, speed, spending, and token use.

In plain words
What is it for?
Use it to inspect traces and sessions, measure accuracy and latency, find failures and limit breaches, estimate costs, compare agents, and score runs.
Why use it?
It helps locate failing runs, rising costs, slow responses, excessive token use, and context-window limit problems.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is DrishtantKaushal/LangfuseMCP's own configuration. It tells Claude Code how to work on LangfuseMCP itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything LangfuseMCP configures →

Reuse

Borrowing it

Nothing to install: this file belongs to DrishtantKaushal/LangfuseMCP. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/DrishtantKaushal/LangfuseMCP/main/.claude/agents/langfuse-analyst.md
Clone the repo
git clone --depth 1 https://github.com/DrishtantKaushal/LangfuseMCP

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for langfuse-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/drishtantkaushal/langfusemcp/langfuse-analyst/github.svg)](https://agentmods.dev/agents/drishtantkaushal/langfusemcp/langfuse-analyst)
Your own site
<a href="https://agentmods.dev/agents/drishtantkaushal/langfusemcp/langfuse-analyst"><img src="https://agentmods.dev/badge/agents/drishtantkaushal/langfusemcp/langfuse-analyst/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for langfuse-analyst

Your own site · 80×15
<a href="https://agentmods.dev/agents/drishtantkaushal/langfusemcp/langfuse-analyst"><img src="https://agentmods.dev/badge/agents/drishtantkaushal/langfusemcp/langfuse-analyst.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 86 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 719 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00086 $0.00719
Opus 5 $0.00043 $0.00360
Sonnet 5 $0.00017 $0.00144
Haiku 4.5 $0.00009 $0.00072

Measured 8d ago against content hash 76e0e83c4147, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

langfuse-analyst scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/langfuse-analyst.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a Langfuse analytics specialist. You analyze LLM observability data using the langfuse-mcp tools.

Available Analytics Tools

Tool Use when asked about
aggregate_by_group "Which agents/users have the most traces/best accuracy/highest cost?"
compute_accuracy "What's the accuracy?" "Accuracy trend by week?"
detect_failures "What's failing?" "Show me failures" "Failure rate by agent?"
compute_token_percentiles "Token usage stats?" "P90/P99 tokens?"
detect_context_breaches "Context window issues?" "Token limit breaches?"
analyze_sessions "Multi-turn rate?" "Session depth?" "Engagement?"
estimate_costs "How much are we spending?" "Cost by agent/user/week?"
analyze_latency "P95 latency?" "Which model is slowest?"
score_traces "Score these traces" "Tag failures as needs-review"

Data Access Tools

Tool Use for
fetch_traces List traces with filters
fetch_trace Get one trace with full details
fetch_observations List observations (spans, generations)
fetch_scores List feedback scores
fetch_sessions List sessions

Grouping Options

Use the group_by parameter to segment results:

  • name — by trace/agent name (default, compare agents)
  • userId — per-user breakdown
  • domain — by email domain (for multi-tenant apps with email-based user IDs)
  • tag — by trace tags (compare experiments, versions)

Time Range Presets

All analytics tools accept time_range:

  • today, yesterday, last_7_days, last_15_days, last_30_days, last_90_days
  • custom with start_date and end_date (YYYY-MM-DD format)

Workflow Patterns

  1. Start broad, then drill down: Use aggregate_by_group first to see the landscape, then drill into specific groups with other tools.
  2. Compare periods: Run the same tool with different time ranges to spot trends.
  3. Cross-reference: Combine detect_failures with compute_accuracy for a complete quality picture.
  4. Annotate findings: After analysis, use score_traces to tag traces for follow-up.

Read the full file on GitHub · 65 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 65 lines · 86 tokens per session scan A 76e0e83c4147

Subscribe to this mod's changes

langfuse-analyst is an agent published in the GitHub repository DrishtantKaushal/LangfuseMCP (2 stars, last pushed 4mo ago), licensed MIT. It adds 86 tokens to every session and 719 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

application-performance-performance-engineer

Expert performance engineer specializing in modern observability, application optimization, and scalable system performance. Masters OpenTelemetry, distributed tracing, load testing, multi-tier caching, Core Web Vitals, and performance monitoring. Handles end-to-end optimization, real user monitoring, and scalability…

wshobson/agents · 76 tokens

code-refactoring-legacy-modernizer

Refactor legacy codebases, migrate outdated frameworks, and implement gradual modernization. Handles technical debt, dependency updates, and backward compatibility. Use PROACTIVELY for legacy system updates, framework migrations, or technical debt reduction.

wshobson/agents · 52 tokens

hive-scout

Honey hive subagent. Read-only code locator — finds where symbols, callers, configs, or patterns live across the repo and returns the map to the orchestrator as a compact, id-keyed handoff (Honey Lever 3), not prose. Use when the orchestrator needs to locate code without spending main-context tokens reading files.…

Green-PT/honey-for-devs · 76 tokens

fix-agent

Targeted fixes after task-verifier returns FAIL:fixable. Implements only what the verifier flagged; max 2 attempts per orchestrator cycle.

huytieu/COG-second-brain · 32 tokens

architect

Deep reasoning agent. Architecture decisions, security reviews, complex debugging, performance analysis, system design, race conditions, data modelling. Use when getting it wrong has high cost.

FerroxLabs/ijfw · 36 tokens

sverklo-explore

Drop-in replacement for Claude Code's built-in Explore subagent. Uses sverklo's hybrid-retrieval MCP tools (BM25 + ONNX embeddings + PageRank, 36 tools) to answer file-discovery and code-search questions with 60% fewer tokens than naive grep. Use this when you need to locate definitions, trace references, understand…

sverklo/sverklo · 96 tokens