When I finally instrumented my agents' tool calls, the cost breakdown surprised me. A few lessons.
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.
Similar Articles
My multi-agentvAI system burned through ~$1.8k before I noticed. How are you tracking agent costs?
A developer shares a personal experience of unexpectedly high costs from a multi-agent AI system, sparking a discussion on cost tracking and observability in agent frameworks.
AI Agent Intelligence tool - Incident debugging, Cost spike detection
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?
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.
How are people actually attributing cost to AI agents?
The article discusses the challenges of accurately attributing costs to AI agents beyond LLM spend, including tools and models for measurement in multi-agent environments.
If you run agents in production, can you tell which step is burning your budget?
A user on r/LLMDevs discusses the challenge of attributing costs in multi-step AI agent runs, where SDK logging only reflects final results, making it hard to identify which step is burning the budget.