<?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: Kushagra </title>
    <description>The latest articles on DEV Community by Kushagra  (@kushagra125).</description>
    <link>https://dev.to/kushagra125</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%2F3756205%2F83f30bff-cb71-404f-9242-976ab3c63d53.jpeg</url>
      <title>DEV Community: Kushagra </title>
      <link>https://dev.to/kushagra125</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kushagra125"/>
    <language>en</language>
    <item>
      <title>AgentCost!!</title>
      <dc:creator>Kushagra </dc:creator>
      <pubDate>Thu, 19 Feb 2026 03:45:00 +0000</pubDate>
      <link>https://dev.to/kushagra125/agentcost-5h1p</link>
      <guid>https://dev.to/kushagra125/agentcost-5h1p</guid>
      <description>&lt;p&gt;One of the first feature requests after launching AgentCost came from an early user asking for OpenAI SDK support alongside LangChain tracking.&lt;/p&gt;

&lt;p&gt;Interesting reminder that observability tooling has to extend beyond frameworks into direct provider integrations.&lt;/p&gt;

&lt;p&gt;Working on expanding instrumentation coverage next.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpljva05mzutsxs5omlx9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpljva05mzutsxs5omlx9.png" alt=" " width="800" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>openai</category>
    </item>
    <item>
      <title>Built AgentCost</title>
      <dc:creator>Kushagra </dc:creator>
      <pubDate>Tue, 17 Feb 2026 04:00:00 +0000</pubDate>
      <link>https://dev.to/kushagra125/built-agentcost-513d</link>
      <guid>https://dev.to/kushagra125/built-agentcost-513d</guid>
      <description>&lt;p&gt;Zooming into the SDK layer behind AgentCost.&lt;/p&gt;

&lt;p&gt;Instead of asking devs to rewrite agents, it intercepts model calls and captures:&lt;/p&gt;

&lt;p&gt;• Tokens&lt;br&gt;
• Provider metadata&lt;br&gt;
• Latency&lt;br&gt;
• Usage context&lt;/p&gt;

&lt;p&gt;Telemetry is batched + sent async so execution isn’t blocked.&lt;/p&gt;

&lt;p&gt;Instrumentation without intrusion was the key design goal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpxzogifql76ocbhnz1jl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpxzogifql76ocbhnz1jl.png" alt=" " width="572" height="1024"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Built AgentCost</title>
      <dc:creator>Kushagra </dc:creator>
      <pubDate>Mon, 16 Feb 2026 03:55:00 +0000</pubDate>
      <link>https://dev.to/kushagra125/built-agentcost-5080</link>
      <guid>https://dev.to/kushagra125/built-agentcost-5080</guid>
      <description>&lt;p&gt;Now that AgentCost is live (&lt;a href="https://agentcost.tech" rel="noopener noreferrer"&gt;https://agentcost.tech&lt;/a&gt;), I’ve been documenting the architecture behind the observability layer.&lt;/p&gt;

&lt;p&gt;Telemetry flows from SDK instrumentation into ingestion pipelines that normalize pricing and compute workflow-level cost attribution.&lt;/p&gt;

&lt;p&gt;Interesting how cost tracking quickly becomes a systems design problem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8yjbuv78aqam91hxlbtm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8yjbuv78aqam91hxlbtm.jpg" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>programming</category>
    </item>
    <item>
      <title>Launching AgentCost</title>
      <dc:creator>Kushagra </dc:creator>
      <pubDate>Sun, 15 Feb 2026 04:56:29 +0000</pubDate>
      <link>https://dev.to/kushagra125/launching-agentcost-14lf</link>
      <guid>https://dev.to/kushagra125/launching-agentcost-14lf</guid>
      <description>&lt;h1&gt;
  
  
  I Built AgentCost: Real-Time Cost Tracking for LangChain Agents
&lt;/h1&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Last month, my LangChain agent cost me $800 in OpenAI fees. &lt;br&gt;
I had no idea which agent was expensive. No idea where to optimize. &lt;br&gt;
I was flying blind.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;I built AgentCost - an open-source tool that tracks every LLM call your agents make.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzkpkmhe0trnfi53880dx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzkpkmhe0trnfi53880dx.png" alt=" " width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;AgentCost works by intercepting LangChain's LLM calls using Python's monkey patching...&lt;/p&gt;
&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;Three components:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Python SDK - Intercepts calls&lt;/li&gt;
&lt;li&gt;FastAPI backend - Stores data&lt;/li&gt;
&lt;li&gt;React dashboard - Visualizes costs&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;p&gt;After using AgentCost for 2 weeks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identified that my "Router Agent" was called 10x more than needed&lt;/li&gt;
&lt;li&gt;Switched simple queries to GPT-3.5 instead of GPT-4&lt;/li&gt;
&lt;li&gt;Reduced costs from $800/month to $450/month (44% savings)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Technical Challenges
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Monkey patching without breaking user code&lt;/strong&gt;&lt;br&gt;
How I solved: ...&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Accurate token counting&lt;/strong&gt;&lt;br&gt;
The challenge: Different models use different tokenizers...&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Batching for performance&lt;/strong&gt;&lt;br&gt;
The solution: Hybrid batching (size + time-based)...&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;AgentCost is open source and free to use:&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/agentcost-ai/agentcost-sdk" rel="noopener noreferrer"&gt;https://github.com/agentcost-ai/agentcost-sdk&lt;/a&gt;&lt;br&gt;
Docs: &lt;a href="https://agentcost.tech/docs/sdk" rel="noopener noreferrer"&gt;https://agentcost.tech/docs/sdk&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;agentcost
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Cost alerts (Slack/email when threshold hit)&lt;/li&gt;
&lt;li&gt;Automatic optimization suggestions&lt;/li&gt;
&lt;li&gt;OpenAI and Antropic sdk support&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Feedback Welcome
&lt;/h2&gt;

&lt;p&gt;If you try AgentCost, I'd love to hear your thoughts!&lt;/p&gt;

&lt;p&gt;Twitter: @KushagraA15&lt;br&gt;
GitHub: github.com/agentcost-ai&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>automation</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Building AgentCost</title>
      <dc:creator>Kushagra </dc:creator>
      <pubDate>Wed, 11 Feb 2026 15:27:09 +0000</pubDate>
      <link>https://dev.to/kushagra125/building-agentcost-17d6</link>
      <guid>https://dev.to/kushagra125/building-agentcost-17d6</guid>
      <description>&lt;p&gt;Working on the SDK instrumentation layer of my AI agent cost observability platform has been eye-opening.&lt;/p&gt;

&lt;p&gt;Capturing token usage sounds simple until you try doing it across async chains, retries, and streaming responses without adding latency.&lt;/p&gt;

&lt;p&gt;Developer tooling lives or dies on invisibility.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>agentcost</category>
    </item>
    <item>
      <title>Building AgentCost!</title>
      <dc:creator>Kushagra </dc:creator>
      <pubDate>Tue, 10 Feb 2026 14:07:00 +0000</pubDate>
      <link>https://dev.to/kushagra125/building-agentcost-18c4</link>
      <guid>https://dev.to/kushagra125/building-agentcost-18c4</guid>
      <description>&lt;p&gt;One unexpected part of building an AI agent cost observability system has been designing the admin control plane.&lt;/p&gt;

&lt;p&gt;User dashboards focus on agent spend.&lt;/p&gt;

&lt;p&gt;Admin systems focus on telemetry pipelines, pricing integrity, and ingestion health across tenants.&lt;/p&gt;

&lt;p&gt;It’s less analytics UI, more infrastructure operations.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Building AgentCost!</title>
      <dc:creator>Kushagra </dc:creator>
      <pubDate>Mon, 09 Feb 2026 07:50:07 +0000</pubDate>
      <link>https://dev.to/kushagra125/building-agentcost-nbm</link>
      <guid>https://dev.to/kushagra125/building-agentcost-nbm</guid>
      <description>&lt;p&gt;Working on cost observability for AI agents has been shifting how I think about system design.&lt;/p&gt;

&lt;p&gt;Cost isn’t just usage data; it’s architectural feedback.&lt;/p&gt;

&lt;p&gt;Agent decomposition, model routing, and retry logic all of it leaves a cost signature.&lt;/p&gt;

&lt;p&gt;Instrumenting that layer is turning out to be as interesting as building the agents themselves.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>buildinpublic</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Building AgentCost!</title>
      <dc:creator>Kushagra </dc:creator>
      <pubDate>Fri, 06 Feb 2026 08:44:00 +0000</pubDate>
      <link>https://dev.to/kushagra125/building-agentcost-5hd8</link>
      <guid>https://dev.to/kushagra125/building-agentcost-5hd8</guid>
      <description>&lt;p&gt;I’ve been working on production AI agents recently, and something became obvious very quickly:&lt;/p&gt;

&lt;p&gt;We have great tools for tracing execution…&lt;br&gt;
But almost nothing for tracing cost.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can see prompt logs.&lt;/li&gt;
&lt;li&gt;You can see model outputs.&lt;/li&gt;
&lt;li&gt;You can debug chains.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But when your LLM bill spikes, you’re left guessing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which agent caused it?&lt;/li&gt;
&lt;li&gt;Which model was overused?&lt;/li&gt;
&lt;li&gt;Where should you optimize?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That gap pushed me to start building a cost observability layer specifically for agent systems.&lt;/p&gt;

&lt;p&gt;The goal isn’t just analytics - it’s attribution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cost per agent&lt;/li&gt;
&lt;li&gt;Cost per workflow&lt;/li&gt;
&lt;li&gt;Cost per tool invocation&lt;/li&gt;
&lt;li&gt;Real-time token burn rates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Still early, but architecturally it’s been one of the more interesting infra problems I’ve worked on in AI so far.&lt;/p&gt;

</description>
      <category>buildinpublic</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
