<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Saud</title>
    <description>The latest articles on DEV Community by Saud (@saud_harbi_51ae456ec478eb).</description>
    <link>https://dev.to/saud_harbi_51ae456ec478eb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3836303%2Fa8c2452e-ac68-4e02-b39f-65b7921903e8.jpg</url>
      <title>DEV Community: Saud</title>
      <link>https://dev.to/saud_harbi_51ae456ec478eb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/saud_harbi_51ae456ec478eb"/>
    <language>en</language>
    <item>
      <title>Per-customer LLM cost attribution for multi-step agents (LangGraph, CrewAI)</title>
      <dc:creator>Saud</dc:creator>
      <pubDate>Sat, 21 Mar 2026 01:19:23 +0000</pubDate>
      <link>https://dev.to/saud_harbi_51ae456ec478eb/per-customer-llm-cost-attribution-for-multi-step-agents-langgraph-crewai-ndb</link>
      <guid>https://dev.to/saud_harbi_51ae456ec478eb/per-customer-llm-cost-attribution-for-multi-step-agents-langgraph-crewai-ndb</guid>
      <description>&lt;p&gt;Genuinely curious: how are people handling per-customer LLM cost attribution once you get past a handful of customers?&lt;/p&gt;

&lt;p&gt;I've been digging into something that keeps coming up in conversations with founders building agent-based products — specifically around understanding what each customer actually costs you to serve when your backend is a LangGraph or CrewAI workflow.&lt;/p&gt;

&lt;p&gt;At small scale it's manageable. You can eyeball it, maybe throw some numbers in a spreadsheet. But somewhere around 20-30 customers things seem to get messy fast — especially when a single "user action" triggers a multi-step agent that's spawning sub-agents, hitting multiple models, using different context window sizes per step.&lt;/p&gt;

&lt;p&gt;The question I keep sitting with: how do you actually know what each customer costs you at that level of granularity?&lt;/p&gt;

&lt;p&gt;I've talked to a few people who built custom logging middleware, others who are stitching together LangSmith traces with manual cost calculations after the fact, and a few who honestly admitted they just average it out and accept some margin uncertainty. None of those feel great as a long-term approach, especially if you're trying to offer any kind of usage-based pricing to your own customers.&lt;/p&gt;

&lt;p&gt;Specific things I'm trying to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is per-customer cost attribution actually something you've run into as a real operational problem, or is it more of a "nice to have" that rarely bites you?&lt;/li&gt;
&lt;li&gt;At what point in growth did it become painful, if it did?&lt;/li&gt;
&lt;li&gt;What have you actually done about it — built something, bought something, ignored it?&lt;/li&gt;
&lt;li&gt;If you're running multi-step agents specifically, do you care about cost visibility at the agent-step level, or is total cost per customer request enough?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not trying to push anything here — genuinely trying to understand whether this is a sharp pain or a dull inconvenience for people doing this work at real scale.&lt;/p&gt;

&lt;p&gt;Would appreciate hearing from anyone who's actually wrestled with this. Even "we just accepted we don't know" is a useful data point.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>discuss</category>
      <category>llm</category>
      <category>saas</category>
    </item>
  </channel>
</rss>
