Evaluating an LLM Agent Before You Have Eval Infrastructure

Fourth and final post in this series about a WhatsApp lead-qualification agent we built at a CRM for small businesses. The engine (Postgres and Celery durable runs), the loop (debounce, polling, exits), and the LLM layer (structured extraction, cost metering, injection defenses) are the first three posts. This one answers the question every engineer asks about agent work, usually first: how do you eval it? The honest answer: our v0 is about 90 lines of framework, four scripted scenarios, a staff-only page, and a human doing the judging. No scoring pipeline, no LLM-as-judge, no eval database. This post is why that is a design and not a shortcut, and why we skipped the eval packages we had already shortlisted. ...

July 24, 2026 · Pranav Gore

Putting an LLM in Production: Structure, Cost, and Prompt-Injection Defenses

This is the third post in a series about a WhatsApp lead-qualification agent we built at a CRM for small businesses. The first post covered the engine: durable agent runs on a Postgres table and Celery, with a lease for crash safety. The second post covered the loop: debouncing message bursts, polling the conversation, nudging through silence, and treating every exit as a designed outcome. This post is about the layer the other two exist to protect: the LLM calls. ...

July 18, 2026 · Pranav Gore

Conversational AI Agents: Reply to Conversations, Not Messages

In the last post we built the engine: a Postgres row per attached agent, next_run_at as the scheduler, a lease for crash safety. This post is about the loop that runs on top of it, how a WhatsApp lead-qualification agent at a CRM for small businesses decides when to speak, when to wait, and when to shut up. The agent’s job is simple to state: a lead messages a business (say, a car dealership), the agent attaches to the conversation, works through a configured list of qualification questions (which model, what timeline, what budget, trade-in, test-drive day) and detaches when it is done or when a human takes over. The LLM parts (extraction, confidence scores, prompt defenses) are the next post. This one is about everything around the LLM, which is where the product actually lives. ...

July 9, 2026 · Pranav Gore

We Didn't Need Temporal: Durable Agent Runs on Postgres and Celery

We recently shipped long-running conversational agents at a CRM for small businesses. An agent attaches itself to a WhatsApp conversation and works it for hours or days: wake up, look at the conversation, maybe send a message, decide when to wake up next, go back to sleep. Eventually it finishes, or a human takes over, or the lead goes quiet, or something breaks. When we sketched the requirements, they read like a brochure for a workflow engine: ...

July 3, 2026 · Pranav Gore

Diagnosing PostgreSQL Connection Leaks on RDS

The site started throwing 502 Bad Gateway errors. Everything stopped. Restarting Gunicorn fixed it within seconds. Then it would happen again, at a completely random time, once every few days. This went on for about two weeks before we decided to properly dig in. That pattern is almost always a leak. In our case it was database connections. Infrastructure context RDS: db.m5.4xlarge, max_connections=5000, tcp_keepalives_idle=300s Gunicorn: 8 workers x 25 threads = 200 concurrent connections Celery: 3 instances (1 main worker at concurrency=35, 2 side workers at concurrency=25 each) = 85 worker threads total Total max DB connections across all processes: 285 Peak traffic (8am to 8pm SGT): ...

March 16, 2026 · Pranav Gore

Under Fire: What a Real DDoS Attack Looks Like and How We Fought Back

It was a Tuesday afternoon, around 3pm. We were deep into sprint planning when the Slack messages started coming in. “I can’t log in.” “The app is really slow.” “Is something wrong with Privyr?” The first instinct was to look for a simpler explanation. Maybe a flaky deploy. Maybe a user on a slow connection. Then more messages. Then a lot more. I tried to SSH into the box. It would not connect. CPU was pegged. I pulled up the metrics dashboards and stared at the graphs for a few seconds. Request counts were off the charts. Response times had collapsed. This was not a bug. ...

September 12, 2025 · Pranav Gore

RDS PostgreSQL 13 to 15 Upgrade with GCP DataStream

We upgraded our AWS RDS PostgreSQL instance from version 13 to 15. On paper it looks like a few clicks in the console. In practice, with logical replication and a CDC pipeline involved, there are several things that will block or break the upgrade if you do not handle them in the right order. Context RDS instance: db.m5.4xlarge, ~1.5TB database, primary + read-replica ~5000 API requests/min at peak load GCP DataStream connected to BigQuery via logical replication – this is the main complication Custom parameter group on both primary and read-replica with logical replication enabled No blue-green deployment on AWS RDS, so this is an in-place upgrade with real downtime BigQuery will show roughly 1 hour of data loss for the period the slot was dropped – DataStream cannot backfill that gap automatically. AWS does offer a manual backfill option but it has additional cost associated with it Because there is no blue-green option here, the ~8 minutes of downtime is real and users will see it. Planning matters. ...

April 20, 2025 · Pranav Gore

Writing custom VSCode plugin

I enjoy writing code snippets that eventually works out as a utility to a developer. The DevTools! Developer tools are small independent code pieces those can be executed on-demand and should not have any side effects. Recently I have been using Django Admin intensively to add more and more options in list view, detail view to help debugging and developing better. But about that in some other blog. Here, I am going to talk about a VSCode plugin that I published. ...

May 20, 2022 · Pranav Gore

When & why to use PyAutoGUI

PyAutoGUI is one of the framework you can use to test desktop applications. Consider a case where you need to test a flow of the application and it is not in browser, you can go for PyAutoGUI. Selenium is another framework that comes to the mind when we talk about any type of testing automation but it only supports browser based automation. Selenium can not have control over locally running non-browser app. ...

May 2, 2022 · Pranav Gore

Video File Operations with FFmpeg

Simple Useful Features of FFmpeg In this section we will go over a beautiful tool called as FFmpeg. I have been using FFmpeg for all of my video editing in server in production for more than 4 years now. It is a very reliable, amazing open source project for playing with video editing. Small Tip before we jump in Before we dive into these cheat sheet, remember that many of the FFmepg options are applicable to input and output files both. Based on where you put the option, FFmpeg decides to apply it for input or output. Options used before the -i <input_video> will be applicable to input file. ...

September 15, 2020 · 3 min · Pranav Gore