<?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: Kunal Parmar</title>
    <description>The latest articles on DEV Community by Kunal Parmar (@kunal_parmar_abc9ea1bd41e).</description>
    <link>https://dev.to/kunal_parmar_abc9ea1bd41e</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3994000%2F9351cac6-a084-4ce3-986e-b4a75529d1d8.png</url>
      <title>DEV Community: Kunal Parmar</title>
      <link>https://dev.to/kunal_parmar_abc9ea1bd41e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kunal_parmar_abc9ea1bd41e"/>
    <language>en</language>
    <item>
      <title>I Built AgentLens: Open-Source Observability for AI Agents (2-Line Setup)</title>
      <dc:creator>Kunal Parmar</dc:creator>
      <pubDate>Sun, 21 Jun 2026 08:31:51 +0000</pubDate>
      <link>https://dev.to/kunal_parmar_abc9ea1bd41e/i-built-agentlens-open-source-observability-for-ai-agents-2-line-setup-4nc4</link>
      <guid>https://dev.to/kunal_parmar_abc9ea1bd41e/i-built-agentlens-open-source-observability-for-ai-agents-2-line-setup-4nc4</guid>
      <description>&lt;p&gt;I spent weeks debugging AI agents using nothing but logs and print statements.&lt;/p&gt;

&lt;p&gt;Every time an agent failed or gave wrong output, I had no idea whether the issue was in the &lt;strong&gt;prompt&lt;/strong&gt;, the &lt;strong&gt;LLM&lt;/strong&gt;, a &lt;strong&gt;tool call&lt;/strong&gt;, or growing &lt;strong&gt;context&lt;/strong&gt;. It felt like debugging in the dark.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;AgentLens&lt;/strong&gt; — a clean, self-hosted observability platform made specifically for AI agents.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is AgentLens?
&lt;/h3&gt;

&lt;p&gt;AgentLens gives you full visibility into your agent runs with beautiful traces, just like Chrome DevTools for your AI agents.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Highlights
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;2-line setup&lt;/strong&gt; — works with your existing OpenAI &amp;amp; Anthropic code&lt;/li&gt;
&lt;li&gt;Full prompt &amp;amp; response capture&lt;/li&gt;
&lt;li&gt;Token usage and cost tracking per call&lt;/li&gt;
&lt;li&gt;Live dashboard with nested traces&lt;/li&gt;
&lt;li&gt;Supports multi-step agents, loops, and tool calls&lt;/li&gt;
&lt;li&gt;Completely &lt;strong&gt;open source&lt;/strong&gt; (MIT) and self-hostable&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Setup (Literally 2 lines)
&lt;/h3&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;agentlens

python

import agentlens as al

al.init&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-agentlens-key"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
al.instrument_openai&lt;span class="o"&gt;()&lt;/span&gt;   &lt;span class="c"&gt;# also supports Anthropic&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s it. All your LLM calls are now automatically traced.Screenshots(Upload your best screenshots here: Span Tree, Inspector view, Trace list, etc.)Tech StackBackend: FastAPI + PostgreSQL + Redis&lt;br&gt;
Frontend: Next.js 15&lt;br&gt;
Self-host with one docker compose up&lt;/p&gt;

&lt;p&gt;GitHub Repository &lt;a href="https://github.com/kp183/AgentlensI" rel="noopener noreferrer"&gt;https://github.com/kp183/AgentlensI&lt;/a&gt; built this because I was tired of guessing why my agents were failing. Now I can see exactly what happened at every step.If you're building agents with LangChain, CrewAI, LlamaIndex, or custom frameworks — I’d love your feedback.What’s the biggest debugging pain you face with AI agents today?&lt;/p&gt;

&lt;h3&gt;
  
  
  🖼️ See It In Action
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Hierarchical Span Tree Timeline
&lt;/h4&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffi1b3e8uwo372p7fhiur.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffi1b3e8uwo372p7fhiur.png" alt=" " width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Token &amp;amp; Cost Inspector
&lt;/h4&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq1gwcg2aqh6q79g88fe9.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq1gwcg2aqh6q79g88fe9.png" alt=" " width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>opensource</category>
      <category>python</category>
    </item>
  </channel>
</rss>
