• MONEY
  • TOKENS
  • HUMAN
  • REPORTS

How to track LLM usage costs with your AI

Connect Langfuse to your agent to turn raw trace data into clear spending reports.

Ask AI about this page

Short answer

How can I see my daily LLM spend and token usage?

Ask your agent to pull daily metrics from your Langfuse project. It will fetch the exact USD spent and token counts for any given day. You'll get a breakdown of your costs below.

The results.

Where your data lands.

Your agent handles the heavy lifting of querying Langfuse.

MONEY

Cost tracking

The agent uses get_daily_metrics to find out exactly how many dollars you spent on LLM calls. You get a clear number for your budget.

TOKENS

Usage volume

It pulls the specific token counts used in your traces. This helps you see if your prompts are getting too heavy.

HUMAN

Manual review

The AI provides the raw numbers, but you decide if the spending patterns look suspicious or need optimization.

REPORTS

Daily summaries

You can ask for a summary of the last week or month. The agent aggregates the daily data into a single view.

The workflow

What your AI does when the request arrives.

The agent acts as a bridge between your chat interface and your Langfuse project.

  1. Fetch metrics

    The agent reaches into your Langfuse project to grab the specific usage data you asked for.

    get_daily_metrics
  2. Calculate totals

    It sums up the USD and token values from the retrieved data points.

    get_daily_metrics
  3. Format report

    The agent turns the raw numbers into a readable list or summary.

    get_daily_metrics
  4. Identify spikes

    It compares the current data against previous days to highlight unusual cost jumps.

    get_daily_metrics

Try it

Copy these to start.

Paste these directly into your chat to begin.

Starting points

These are just ideas. Swap out the project names or date ranges to match your actual Langfuse setup.

Langfuse Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_sTXOynCd5hRTA7WbjY0nBUsTjmjwRIVY989VA7VU/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Langfuse capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "langfuse-llm-tracing-evals-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_sTXOynCd5hRTA7WbjY0nBUsTjmjwRIVY989VA7VU/mcp"
    }
  }
}
Copy into chat04
  • How much did I spend on my 'Production-App' project yesterday?

  • Show me the total token usage for the last 7 days in my 'Testing-Env' project.

  • Did my LLM costs spike on Tuesday? Check the daily metrics for my main project.

  • Give me a summary of USD spending for the 'Customer-Bot' project this month.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Langfuse once, then ask.

Just link your Langfuse account through Vinkius. Your credentials stay encrypted, and you can immediately start asking your agent about your usage.

Connect Langfuse to your AI

FAQ

How this task behaves.

  • 01

    Can the AI change my Langfuse settings?

    No. The agent can only read metrics. It cannot modify your Langfuse projects or settings.

  • 02

    Can I ask for specific trace details?

    No. This specific task is limited to daily metrics like USD and tokens. It cannot pull individual trace IDs.

  • 03

    Does the AI see my API keys?

    No. Your credentials are encrypted and managed by Vinkius. The agent only sees the data returned by the tools.

  • 04

    Can the AI delete my usage history?

    No. The agent has no capability to delete or overwrite any data in Langfuse.

  • 05

    How accurate are the USD totals?

    The totals are exactly what is recorded in your Langfuse project via the get_daily_metrics tool.

  • More questions about Langfuse? The Connector page answers them. See everything the Langfuse Connector can do

Connect Langfuse to Claude, Cursor, ChatGPT & more