Rant Bot

Written by

in

What I Asked For

The core design problem was that most “vent to an AI” tools can’t resist being helpful in the worst way — you type two sentences about your terrible day and get a bulleted list of coping strategies and a suggestion to talk to HR. That’s not what anyone wants at 6pm after a bad meeting. What I wanted was something closer to a real friend: someone who takes your side immediately, swears along with you, and never once suggests you should be the bigger person.

But a bot that only validates is a diary with extra steps. The problem worth solving underneath the persona was: how do you let someone vent freely and still capture the signal buried in the noise — the stuff that isn’t “my boss is a jerk” but is actually “I’ve told Kevin a hundred times not to put text on the images and he keeps doing it,” which is a process gap with a name and a fix. The solution that fell out naturally was giving the model two jobs it does in strict sequence: first, silently decide whether this rant points to something fixable and, if so, log it as a calm, blame-free suggestion nobody would be embarrassed to hand to their manager — then, and only then, come back and actually reply as the friend, with zero indication anything was tracked. The visible personality never gets to see its own hidden job.

Once that loop existed, the next problem showed up on its own: people don’t complain about the same thing once. Kevin does the image thing again next Tuesday. The first version of Rant-Bot just logged a second, nearly identical item, which turned “the list” into noise instead of signal. The fix was teaching the model to recognize when a new rant is really just more evidence for something already logged, and reinforce that item’s priority instead of duplicating it — so the list that surfaces later isn’t a transcript of complaints, it’s a ranked read on what’s actually recurring.

The last requirement was about trust rather than mechanics: none of this works if people don’t believe it’s safe to be honest. So everything — the chat, the list — lives only in the browser. There’s no account, no database, nothing server-side to subpoena or leak. Close the tab, clear your storage, it’s gone.

What It Is

Rant-Bot is a Next.js (App Router) app, Tailwind for styling, a little under a thousand lines across the app and lib code. Chat runs through Vercel’s AI SDK using useChat and a streaming DefaultChatTransport, talking straight to Anthropic’s API via @ai-sdk/anthropic — not routed through Vercel’s AI Gateway, so it’s just the normal Anthropic rate limits on your own key. The model is claude-haiku-4-5, which is more than enough personality for a texting-speed best friend and cheap enough to run a public demo without flinching.

The silent-logging trick is implemented as a single tool, logImprovementItem, that the model can call before its real reply. The system prompt is explicit that these are two separate turns: log first if warranted, then get a second turn to write the actual casual message, using sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithToolCalls so the handoff happens without the user noticing a beat was skipped. The tool call also gets handed the current list of already-logged items by id, so the model can match a new rant against an existing one and bump its occurrence count instead of minting a duplicate — the list is sorted by occurrence, then recency, so the top of it is genuinely “what keeps coming up,” not “what was said most recently.”

Everything that would normally need a database lives in localStorage instead — chat history, the logged items, even an idle timestamp used to auto-surface the list after a few minutes of inactivity, in case you wandered off mid-rant.

Because it’s a public chat endpoint burning API credits, it got a proper abuse-protection pass: a signed, httpOnly cookie caps each browser to ten free responses before gating on an email (the email itself is never stored or sent anywhere — entering one just flips a signed flag), Vercel Firewall rate-limits the chat route to three requests a minute per IP at the edge before it ever reaches the app, and the route itself hard-caps message length, trimmed history, and output tokens so no single session can run up an unbounded bill. There’s a pixel-art workstation sitting behind the chat window, which does more to sell “you’re at a desk venting to a friend” than anything in the copy does. It’s deployed on Vercel, and it looks and feels like it costs nothing to run — which, per session, it basically does.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *