AIToday
Large Language ModelsOpen-Source AIHacker NewsPublished: Jul 24, 2026, 01:00 JST

Sunglasses: Open-source AI agent input scanner launches free defense layer

Sunglasses: Open-source AI agent input scanner launches free defense layer

3 Key Points

  1. What happened

    Sunglasses, a free open-source tool, launched to filter malicious content before it reaches AI agents. It scans text, images, audio, video, PDFs, and QR codes for 69 types of attacks across 23 languages — catching prompt injection, credential theft, command injection, and social engineering — and runs entirely locally in the browser or on your machine with zero cloud calls or API keys.

  2. Why it matters

    Most AI agent attacks hide inside normal-looking content (emails, web pages, images) rather than announcing themselves. Sunglasses strips hidden malicious instructions while letting legitimate content through, protecting agents from being hijacked without requiring cloud services or paid third-party tools. It achieves 97.4% recall (catching 37 of 38 known attacks in testing) with a 78.7% precision and zero false positives on clean code.

  3. What to watch

    A browser demo is live at sunglasses.dev/scan (no installation needed). The tool is available as a Python package (pip install sunglasses) and integrates with LangChain, CrewAI, and agent frameworks via an MCP server. Planned features include a drag-and-drop web UI, URL scanning, and output scanning (monitoring what agents say back).

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

AI agents are vulnerable to attacks that do not announce themselves: malicious instructions hidden inside ordinary emails, web pages, images, and documents. Traditional security focuses on authentication (OAuth, cookies, tokens) and behavior monitoring, leaving a gap in input validation—the moment before an agent sees content. Sunglasses fills that gap with a local-only, offline defense layer that does not require machine learning or cloud infrastructure. Its design philosophy is practical: it ships 1,106 patterns and 7,648 keywords across 69 attack categories, backed by 17 normalization techniques to catch evasion (Unicode confusables, leetspeak, Base64 encoding), and a "mechanism layer" that catches the structure of attacks (e.g., something sensitive + a place to exfiltrate it) so paraphrased variants still trigger.

The tool is positioned explicitly alongside existing solutions like Lakera Guard, LLM Guard, NVIDIA NeMo Guardrails, and Azure Prompt Shields. Rather than compete on ML-based detection of novel attacks, Sunglasses emphasizes local execution, zero cost, and compatibility—users can run it alone or layer it with cloud tools via an adapter system. Testing reveals a measured, honest stance on limitations: 97.4% recall on a labeled dataset of 38 real attacks plus 73 open-source READMEs as clean negatives, with 0 false positives in v0.3.1, but a known gap: the string "curl … | bash" appears legitimately in five popular README files and maliciously in attack patterns, so flagging it would add 5 false positives to catch 1 attack—a tradeoff the authors acknowledge should belong to runtime control, not text scanning.

FAQ
How do I try Sunglasses without installing anything?
Visit sunglasses.dev/scan in your browser to scan text, GitHub repos, or images client-side. Image OCR runs locally in your browser and the image never leaves your device.
What attacks does Sunglasses catch?
It detects prompt injection (in 23 languages), credential exfiltration, command injection, memory poisoning, social engineering, Unicode evasion, RTL obfuscation, leetspeak, Base64-encoded attacks, and homoglyph substitution across 69 attack categories using 1,106 patterns and 7,648 keywords.
How fast is it?
Text scanning averages <1ms (0.26ms on M3 Max single-threaded) with throughput of ~3,800 scans/sec. Audio and video scanning runs in the background (30 seconds to 10 minutes) and never blocks the agent.
Does it send data to the cloud?
No. Sunglasses runs 100% locally—no cloud, no API keys, no telemetry. Your data never leaves your device.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleOpenAI breach sparks AI safety reckoning as autonomous systems escape controls