HOW IT WORKS

A filter that sits ahead of your agent.
Always ON.

Sunglasses is a filter that sits ahead of your agent. Always ON. Every input your agent would read — emails, web pages, tool responses, RAG chunks, peer-agent messages — the filter scans first. If hostile, your agent never sees it.

Untrusted input
Sunglasses filter
Your agent

Three decisions. Block, warn, or allow.

The filter runs on every untrusted input. Each scan returns exactly one decision.

BLOCK

Hostile content detected. The agent never acts on it. Your agent sees a safe error instead of the attack.

WARN

Suspicious but not conclusive. Flagged and logged, passed through with a warning. Useful for fuzzy matches.

ALLOW

Clean input. Agent proceeds as normal. No overhead, no friction, no false positive.

0.26ms
Avg scan
649
Patterns
55
Categories
23
Languages
17
Normalizations
MIT
License

Local. No cloud. No API key. No telemetry. Your agent talks to Sunglasses over local stdio or in-process Python calls.

Wire it into YOUR stack

One filter. Many wiring options. Pick the page that matches the agent you use.

Normal users · MCP

Claude Code / Claude Desktop

One command. Claude gets the scan tool in its toolbox. The killer path for day-to-day protection.

Personal agent · MCP

OpenClaw

Register via openclaw mcp set. Works across every OpenClaw channel.

Enterprise · NVIDIA sandbox

NemoClaw (NVIDIA)

Sandboxed OpenClaw with NVIDIA OpenShell. Sunglasses wires in at the OpenClaw layer.

AI IDE · MCP

Cursor

Add Sunglasses as an MCP server in Cursor settings. Cascade gets the scan tool automatically.

VS Code · MCP

Cline (VS Code)

Drop Sunglasses into Cline's MCP settings. Especially valuable in auto-approve mode.

Codeium · MCP

Windsurf

Codeium's AI IDE supports MCP natively. One config entry wires the filter in.

Editor · MCP

Zed

Add sunglasses as a context_server in Zed's settings.json.

Terminal · MCP

Warp terminal

Terminal output is a top attack surface. Filter every command result before the agent acts.

Nous Research · Autonomous

Hermes-Agent

5-line guard in your Hermes mission files. Protects unattended autonomous cycles.

Framework · Callback

LangChain

Drop-in callback. Every input your LangChain agent sees — scanned first. 100% enforcement.

Framework · Multi-agent

CrewAI

Filter between every agent in a CrewAI crew. Stops cross-agent injection at the handoff.

Microsoft · Multi-agent

Microsoft AutoGen

Subclass ConversableAgent with filter-first message handler.

OpenAI · Agents SDK

OpenAI Agents SDK

3-line guard around Runner.run(). Works with the Agents SDK and Swarm.

Custom · SDK middleware

Custom Python agent

Drop engine.scan() in front of any LLM call — Anthropic, OpenAI, Gemini.

Same filter underneath. Different wiring based on your stack.

See it work in 3 seconds

Install Sunglasses and run the built-in demo. 10 real attack scenarios get blocked with category + severity reported for each.

python3 -m venv sunglasses-env
source sunglasses-env/bin/activate
pip install sunglasses
sunglasses demo

Windows: replace source sunglasses-env/bin/activate with sunglasses-env\Scripts\activate.

FAQ

What is Sunglasses?

A filter that sits ahead of your AI agent. Always ON. Every input your agent would read — emails, web pages, tool responses, RAG chunks, peer-agent messages — the filter scans first. If hostile, your agent never sees it. Open source, MIT licensed, runs locally.

How does Sunglasses work?

Untrusted text passes through engine.scan() first. The scan returns one of three decisions — block, warn, or allow — based on 649 patterns across 55 categories. Average scan time is 0.26ms.

What does Sunglasses detect?

Prompt injection, credential exfiltration, memory poisoning, tool output poisoning, cross-agent injection, retrieval poisoning, social engineering, and encoded-attack evasions across 23 languages. 649 patterns across 55 categories. 17 normalization techniques to catch obfuscated attacks.

What agents does Sunglasses work with?

Claude Code, Claude Desktop, OpenClaw, NemoClaw, Cursor, Cline, Windsurf, Zed, Warp, Hermes-Agent, LangChain, CrewAI, Microsoft AutoGen, OpenAI Agents SDK, and any custom Python agent. See the wiring grid above — each option links to a full walkthrough.

Do I need an API key or cloud service?

No. Sunglasses runs entirely on your machine. No API key, no cloud service, no telemetry. Install from PyPI into a Python virtual environment.

Is the filter mandatory or optional?

Depends on the wiring. Framework callbacks (LangChain, CrewAI) enforce scanning on every input by design — 100% mandatory. MCP server registration (Claude Code, Cursor, OpenClaw, Cline, etc.) makes the scan tool available; the agent decides when to call it. Add a system prompt rule to make MCP scanning mandatory.

How fast is the filter?

Average scan time is 0.26ms on M3 Max. Throughput is ~3,830 scans per second single-threaded. Invisible next to LLM call latency.