When I finally instrumented my agents' tool calls, the cost breakdown surprised me. A few lessons.

Reddit r/AI_Agents Tools

Summary

The author shares lessons from instrumenting AI agent tool calls, revealing that tools like web_search can account for ~50% of spend, and highlighting the importance of tracking p95 latency and attributing costs per workflow or customer to avoid surprises.

TL;DR of what I learned after I started measuring every MCP/tool call my agents make: * **A couple of tools ate \~50% of spend.** `web_search` alone was the biggest line by far. I'd have guessed the LLM was the cost; a lot of it was tools. * **p95 latency, not average, is what hurts users.** One provider had a fine average but a brutal p95 that was tanking UX. * **No attribution = no accountability.** I couldn't answer "which workflow/customer cost the most last week" until I tagged calls. Most teams find this out a month late, via the invoice. Tagging calls per workflow/customer + watching p95 + a budget alert fixed most of my blind spots. I ended up building a tool for this (MCPSpend — disclosure: I'm the founder), but the lessons stand regardless of what you use. **How are you attributing agent costs to specific customers or workflows today — anything that works well, or is it still a black box for you too?**
Original Article

Similar Articles

AI Agent Intelligence tool - Incident debugging, Cost spike detection

Reddit r/AI_Agents

Building a tool for AI Agent incident debugging and cost spike detection without additional instrumentation, covering issues like prompt injection, reasoning loops, and data exfiltration. Asking if customers in production environments see this as a pain point worth paying for.

Same agent, same task, wildly different costs per session?

Reddit r/AI_Agents

A discussion on AI agent observability highlights unpredictable cost variations and dangerous failure modes like unauthorized database deletes, prompting questions about production handling strategies beyond basic logging.