cd /news/ai-safety/how-i-built-a-client-side-shield-for… · home topics ai-safety article
[ARTICLE · art-96761] src=dev.to ↗ pub= topic=ai-safety verified=true sentiment=↑ positive

How I Built a Client-Side Shield for AI Chatbots (Open Source)

A developer built Shield by Vouch, an open-source client-side filter that blocks prompt injections and off-topic queries before they reach an LLM, saving API costs and preventing brand leaks. The tool, which runs with zero latency and no server-side calls, blocked 80% of off-topic queries in testing and is available on GitHub under an MIT license.

read1 min views1 publishedAug 14, 2026

I was burning through API tokens on off-topic chatbot queries.

Every "Who are you?" = brand leak + wasted money.

So I built Shield by Vouch — a zero-cost, client-side filter that blocks prompt injections and off-topic queries before they hit your LLM.

You build an AI chatbot for your business. Users ask:

Every off-topic query = $0.002 gone. 1000 queries = $2 burned.

Server-Side Client-Side
Latency: ~100-500ms Latency: 0ms
Cost: API call already made Cost: Zero if blocked
const shield = new VouchShield({
  businessType: 'restaurant',
  businessDesc: 'Italian food in Mumbai'
});

const result = shield.check("Who are you?");
// { blocked: true, response: "I can only help with our restaurant services..." }

Results

80% off-topic queries blocked client-side

Zero identity leaks

$2 saved per 1000 blocked queries

Try It

🚀 Live Demo

GitHub

MIT License. No signup. Single file drop-in.

── more in #ai-safety 4 stories · sorted by recency
── more on @vouch 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-i-built-a-client…] indexed:0 read:1min 2026-08-14 ·