<?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: Manish Rawal</title>
    <description>The latest articles on DEV Community by Manish Rawal (@manishrawal95).</description>
    <link>https://dev.to/manishrawal95</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%2F3848391%2Ff179cded-5cc5-4f67-938e-88375ee6f582.png</url>
      <title>DEV Community: Manish Rawal</title>
      <link>https://dev.to/manishrawal95</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/manishrawal95"/>
    <language>en</language>
    <item>
      <title>Why I Built voice-to-task-agent: Kill Context Switching with Your Voice</title>
      <dc:creator>Manish Rawal</dc:creator>
      <pubDate>Sun, 29 Mar 2026 04:02:27 +0000</pubDate>
      <link>https://dev.to/manishrawal95/why-i-built-voice-to-task-agent-kill-context-switching-with-your-voice-4eh2</link>
      <guid>https://dev.to/manishrawal95/why-i-built-voice-to-task-agent-kill-context-switching-with-your-voice-4eh2</guid>
      <description>&lt;p&gt;You're in a pair programming session, deep in the terminal, and you spot a bug. "Ah, we should file a ticket for that," your partner says. The flow is broken. Someone has to open a browser, navigate to Jira, click "Create," remember the project key, fill out the summary, and then try to recapture the mental state you were just in.&lt;/p&gt;

&lt;p&gt;This tiny interruption -- this "context switch tax" -- is a silent killer of productivity. It happens dozens of times a day. An idea for a refactor comes up in a meeting, a follow-up is mentioned on a call, a bug is discovered mid-debug. Each one requires leaving your current task to perform a manual, repetitive operational task. We lose focus, and sometimes, we lose the action item entirely.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;voice-to-task-agent&lt;/code&gt; is my answer to this problem. It's a simple Python CLI that turns your spoken words into actions, in real-time, without ever leaving your terminal. It listens for your commands, understands your intent, and executes tasks like creating Jira tickets or sending emails, all while you keep your hands on the keyboard and your mind on the code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick Start: Talk, Don't Type
&lt;/h3&gt;

&lt;p&gt;Getting started is designed to be ridiculously fast. Once you've configured your API keys in a simple YAML file, you just run one command:&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;voice-to-task-agent
vtta listen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, just start talking.&lt;/p&gt;

&lt;p&gt;You say:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Hey, can you create a ticket to fix the SSO login bug... put it in the 'WEB' project. High priority."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Your terminal responds:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Okay, creating a high-priority Jira ticket in project WEB for 'Fix SSO login bug'. Do you want to add a description?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You reply:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Yeah, just say 'Users are reporting 500 errors when logging in via Google SSO'."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And a moment later:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ &lt;strong&gt;Jira ticket created:&lt;/strong&gt; &lt;a href="https://your-jira.atlassian.net/browse/WEB-1337" rel="noopener noreferrer"&gt;WEB-1337&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The ticket is filed. Your flow is intact. Your thought process is uninterrupted.&lt;/p&gt;

&lt;h3&gt;
  
  
  How It Works: A Real-Time Conversational Pipeline
&lt;/h3&gt;

&lt;p&gt;This isn't just a fancy speech-to-text script. The magic is in the real-time, bidirectional data pipeline that connects your microphone to a large language model and back to your system's tools.&lt;/p&gt;

&lt;p&gt;It works in a few steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Audio Capture:&lt;/strong&gt; The CLI uses the &lt;code&gt;sounddevice&lt;/code&gt; library in Python to capture raw audio chunks from your microphone. It doesn't wait for silence; it starts streaming immediately.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Streaming to AI:&lt;/strong&gt; These audio chunks are sent directly to a streaming conversational voice API, like Google's multi-modal Gemini API. This is key -- the model starts processing your voice as you speak, providing near-instantaneous transcription and comprehension.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Unified Tool Calling:&lt;/strong&gt; As the model understands your intent, it doesn't just generate text. It generates a structured &lt;code&gt;tool_call&lt;/code&gt; request. When it hears "...create a ticket...", it recognizes this maps to a function you've defined, like &lt;code&gt;create_jira_ticket&lt;/code&gt;, and figures out the parameters (&lt;code&gt;summary&lt;/code&gt;, &lt;code&gt;project&lt;/code&gt;, &lt;code&gt;priority&lt;/code&gt;) from your natural language.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Local Execution and Response:&lt;/strong&gt; The agent running in your terminal receives this &lt;code&gt;tool_call&lt;/code&gt;, executes the corresponding Python function (which calls the Jira API), and gets a result. This result -- whether a success message with a ticket URL or an error -- is then streamed &lt;em&gt;back&lt;/em&gt; to the Gemini API as part of the same continuous conversation. The model then uses this information to formulate its final, helpful response to you: "Okay, I've created the ticket for you."&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Architecting this requires careful management of a bidirectional stream, handling network latency, and designing for failure. What happens if the Jira API is down? The agent needs to handle that gracefully and report back through the conversational interface. It’s a surprisingly complex orchestration problem disguised as a simple CLI.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why I Built This: A Program Manager Who Codes
&lt;/h3&gt;

&lt;p&gt;My background is in Program Management and BizOps. My job has always been about one thing: making operations more efficient. I'm obsessed with identifying and eliminating friction that slows teams down. For years, I did this with process maps, spreadsheets, and strategy decks. But with the rise of agentic AI, I realized we now have a much more powerful tool.&lt;/p&gt;

&lt;p&gt;I build open-source AI tools because I believe the best way to prove the business value of AI is to build real, working solutions to tangible problems. I'm not just interested in what's theoretically possible; I'm focused on what's practically useful, today. This project is a perfect showcase of that philosophy. It directly attacks the "context switch tax," a well-known operational drag on engineering teams.&lt;/p&gt;

&lt;p&gt;Building &lt;code&gt;voice-to-task-agent&lt;/code&gt; was also an exercise in wearing my Technical Program Manager hat. It forced me to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Architect a data pipeline:&lt;/strong&gt; A real-time system with multiple dependencies (mic hardware, network, multiple APIs).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Integrate disparate systems:&lt;/strong&gt; Connecting a bleeding-edge AI service with a standard enterprise workhorse like Jira.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Focus on the user:&lt;/strong&gt; The goal isn't just to call an API; it's to create a seamless, "it just works" experience that doesn't break a developer's flow.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Think about the "ilities":&lt;/strong&gt; Reliability, usability, and extensibility. A production-grade tool can't be a brittle demo.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This practical, hands-on approach is what informs my other projects as well. When you build real agents, you quickly run into real problems. How much is this costing me? That led me to build &lt;code&gt;agent-cost-tracker&lt;/code&gt;. Is my agent just agreeing with me to be helpful? That led to &lt;code&gt;llm-sycophancy-eval&lt;/code&gt;. How do I debug when it's slow? That's why I created &lt;code&gt;agent-profiler&lt;/code&gt;. These tools aren't academic exercises--they are solutions to the real-world challenges of operationalizing AI.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's Next?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;voice-to-task-agent&lt;/code&gt; is just getting started. It's a proof of concept for a future where operational tasks are handled through ambient, conversational interfaces. Here's what I'm thinking about next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;More Tools, More Actions:&lt;/strong&gt; Adding integrations for creating GitHub issues, sending Slack messages, and updating Salesforce records are obvious next steps. The tool-calling framework is designed to be easily extensible.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Smarter Confirmation:&lt;/strong&gt; For potentially destructive actions, implementing a "Are you sure?" confirmation step that can be confirmed by voice is critical for safe, reliable use.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Local and On-Device Models:&lt;/strong&gt; Exploring the use of local, on-device models for the initial transcription could dramatically reduce latency and enhance privacy, sending only the structured intent to a cloud LLM for tool mapping.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This project is open-source, and I'd welcome any and all contributions, from new tool integrations to documentation improvements.&lt;/p&gt;




&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;GitHub Repo:&lt;/strong&gt; &lt;a href="https://github.com/manishrawal95/voice-to-task-agent" rel="noopener noreferrer"&gt;https://github.com/manishrawal95/voice-to-task-agent&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Let's Chat:&lt;/strong&gt; Have ideas or want to talk about agentic AI? &lt;a href="https://www.mrawal.com/book" rel="noopener noreferrer"&gt;Book a call with me&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Connect on LinkedIn:&lt;/strong&gt; &lt;a href="https://linkedin.com/in/manishrawal95" rel="noopener noreferrer"&gt;https://linkedin.com/in/manishrawal95&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>automation</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Why I Built agent-cost-tracker: Stop Your AI Agent from Secretly Bankrupting You</title>
      <dc:creator>Manish Rawal</dc:creator>
      <pubDate>Sat, 28 Mar 2026 23:45:21 +0000</pubDate>
      <link>https://dev.to/manishrawal95/why-i-built-agent-cost-tracker-stop-your-ai-agent-from-secretly-bankrupting-you-32g6</link>
      <guid>https://dev.to/manishrawal95/why-i-built-agent-cost-tracker-stop-your-ai-agent-from-secretly-bankrupting-you-32g6</guid>
      <description>&lt;p&gt;You’ve done it. After days of prompt engineering, wrestling with LangChain, and debugging esoteric errors, your AI agent finally works. It autonomously researches topics, uses tools, and completes the complex task you assigned--it feels like magic. Then you open your OpenAI billing dashboard and the magic vanishes, replaced by a cold, hard, three-digit number that’s growing way too fast.&lt;/p&gt;

&lt;p&gt;I’ve been there. The very nature of agentic workflows--with their unpredictable loops and chains of thought--turns cost forecasting into a complete guessing game. This is a massive problem, not just for engineers, but for anyone trying to build a viable product on top of this technology.&lt;/p&gt;

&lt;p&gt;That’s why I built &lt;code&gt;agent-cost-tracker&lt;/code&gt;. It’s an open-source Python library that gives you a crystal-clear, step-by-step breakdown of your AI agent's API costs. It tracks every call, calculates the expense for both input and output tokens, and generates an interactive visualization so you can see exactly where your money is going. No more billing surprises, just the data you need to build efficient and economically viable agents.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick Start
&lt;/h3&gt;

&lt;p&gt;Getting started is trivial. You wrap your agent's execution code in a &lt;code&gt;CostTracker&lt;/code&gt; context manager. That's it. It automatically patches the necessary libraries and starts listening.&lt;/p&gt;

&lt;p&gt;Here’s a complete example. Let's assume you have your agent's logic in a function called &lt;code&gt;run_my_agent_flow&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;agent_cost_tracker&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;CostTracker&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;my_agent_module&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;run_my_agent_flow&lt;/span&gt; &lt;span class="c1"&gt;# Your agent code lives here
&lt;/span&gt;
&lt;span class="c1"&gt;# Initialize the tracker
&lt;/span&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nc"&gt;CostTracker&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;cost_tracker&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Run your agent as you normally would
&lt;/span&gt;    &lt;span class="nf"&gt;run_my_agent_flow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What were the key highlights of Apple&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s latest earnings call?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Print the total cost and generate an interactive report
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Total cost for the run: $&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;cost_tracker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_total_cost&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;cost_tracker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;visualize_costs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;browser&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# Opens a report in your browser
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After running this, you'll get a beautiful, interactive HTML file that breaks down the cost of every single LLM call your agent made during that run.&lt;/p&gt;

&lt;h3&gt;
  
  
  How It Works
&lt;/h3&gt;

&lt;p&gt;The magic behind &lt;code&gt;agent-cost-tracker&lt;/code&gt; is a technique called monkey-patching. When you enter the &lt;code&gt;with CostTracker() as ...&lt;/code&gt; block, the library temporarily replaces the API call methods from popular libraries like &lt;code&gt;openai&lt;/code&gt; and &lt;code&gt;litellm&lt;/code&gt; with its own custom versions. Don't worry--it's less chaotic than it sounds.&lt;/p&gt;

&lt;p&gt;Here's the sequence:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Patching:&lt;/strong&gt; &lt;code&gt;CostTracker&lt;/code&gt; finds the &lt;code&gt;chat.completions.create&lt;/code&gt; and &lt;code&gt;chat.completions.acreate&lt;/code&gt; methods in the &lt;code&gt;openai&lt;/code&gt; client object. It stores a reference to the original methods and puts its own "wrapper" method in their place.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Execution:&lt;/strong&gt; Your agent code runs exactly as written. It thinks it's calling the normal OpenAI API, but it's actually calling the &lt;code&gt;CostTracker&lt;/code&gt; wrapper.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Interception:&lt;/strong&gt; The wrapper first calls the original OpenAI method, letting the API call complete successfully. When it receives the response, it intercepts it before passing it back to your agent. It pulls the &lt;code&gt;usage&lt;/code&gt; object from the response payload, which contains the &lt;code&gt;prompt_tokens&lt;/code&gt; and &lt;code&gt;completion_tokens&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Calculation &amp;amp; Logging:&lt;/strong&gt; Using a built-in, up-to-date price list for different models (like &lt;code&gt;gpt-4-turbo&lt;/code&gt;, &lt;code&gt;claude-3-opus&lt;/code&gt;, etc.), the tracker calculates the precise cost of that individual call. It logs the model used, the token counts, and the final cost, then returns the original response to your agent so the workflow can continue uninterrupted.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Restoration:&lt;/strong&gt; As soon as your code exits the &lt;code&gt;with&lt;/code&gt; block--either by finishing or by raising an error--the original, un-patched methods are put back in their place. This ensures the tracker has zero side effects on any other part of your application.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The final step, visualization, is handled by Plotly. It takes the logged data and generates a self-contained HTML file with an interactive Sankey diagram. This diagram is perfect for visualizing flows, letting you easily trace the path of your agent and see which steps or tool uses are racking up the biggest bill.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why I Built This
&lt;/h3&gt;

&lt;p&gt;I’m a Program Manager with a background in Business Operations, and I'm obsessed with agentic AI. My job is to bridge the gap between business strategy and AI engineering. I don’t just write strategy decks; I build real tools to prove what’s possible and uncover the operational hurdles we’ll face in production.&lt;/p&gt;

&lt;p&gt;In BizOps, you learn one thing very quickly: a project without a predictable budget is a non-starter. When I started building complex AI agents, I was horrified by how opaque their costs were. An agent designed to do research might make five API calls for one query and fifty for another. You can't build a business on that kind of variance without a way to measure and control it.&lt;/p&gt;

&lt;p&gt;I needed answers to basic business questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  What is our average cost per task?&lt;/li&gt;
&lt;li&gt;  Which tool is the most expensive for our agent to use?&lt;/li&gt;
&lt;li&gt;  If we swap &lt;code&gt;gpt-4-turbo&lt;/code&gt; for &lt;code&gt;claude-3-sonnet&lt;/code&gt; in a specific step, how much do we save, and what's the impact on quality?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;agent-cost-tracker&lt;/code&gt; is the tool I needed to answer those questions. It turns an engineering black box into a measurable business process. It provides the concrete data required to make informed trade-offs between cost, latency, and performance. This is the same philosophy I applied to my other project, &lt;code&gt;llm-sycophancy-eval&lt;/code&gt;, which stress-tests agents for behavioral flaws. First, you have to understand and measure the system--whether its behavior or its cost--before you can optimize it.&lt;/p&gt;

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

&lt;p&gt;This is just the beginning. I believe cost-awareness needs to be a first-class citizen in the agent development lifecycle. Here are a few things I have planned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Expanded Provider Support:&lt;/strong&gt; Adding first-class support for other major model providers like Cohere, Gemini (through their native SDKs), and more open-source models.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Budget Thresholds and Alerting:&lt;/strong&gt; The ability to set a maximum budget for a run. If the agent exceeds it, the tracker will raise an exception to halt execution, preventing runaway costs.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Deeper Dashboard Insights:&lt;/strong&gt; More advanced analytics in the visualization, like breaking down costs by the "tool" being used or providing time-series data to spot performance regressions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project is fully open-source, and I welcome contributions. If you have an idea or want to help build out these features, please open an issue or a pull request on GitHub.&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;GitHub Repo:&lt;/strong&gt; &lt;a href="https://github.com/manishrawal95/agent-cost-tracker" rel="noopener noreferrer"&gt;https://github.com/manishrawal95/agent-cost-tracker&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Chat with me:&lt;/strong&gt; Have ideas or want to talk about agentic AI? &lt;a href="https://www.mrawal.com/book" rel="noopener noreferrer"&gt;Book a call&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Connect on LinkedIn:&lt;/strong&gt; &lt;a href="https://linkedin.com/in/manishrawal95" rel="noopener noreferrer"&gt;https://linkedin.com/in/manishrawal95&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

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