How it works
Defenses
Attack Patterns MCP Attack Atlas What we catch Hardening manual OWASP LLM Top 10 MITRE ATLAS
Learn
Encyclopedia (new) Agent Security 101 Blog Reports CVP runs Thesis
Resources
Docs GitHub Action (live) vs Lakera vs Promptfoo Team
Theme
Compare · Different Jobs

Sunglasses vs Promptfoo

Runtime filter vs eval framework
sunglasses://compare/sunglasses-vs-promptfoo
The framing

These solve different jobs, not the same job differently. Promptfoo is a developer eval and red-team framework you run before shipping. Sunglasses is a runtime pre-ingestion filter that blocks live attacks. Testing is not defending — and defending is not testing.

Why not either/or

You test with Promptfoo to find weaknesses, then run Sunglasses at runtime so those weaknesses are actually blocked in production. Different phases of the same security lifecycle.

Side by side

One tests before you ship. One defends while you run. Pick by which phase you are solving for — or use both.

Sunglasses
Promptfoo
Job
Runtime pre-ingestion filter
Developer eval / red-team framework
When it runs
Live — while the agent is running
Before you ship — in dev and CI
What it does
Scans untrusted input, returns block / warn / allow
Runs test cases against prompts, models, guardrails
Output
A runtime decision your code acts on
A test report / score you review
Where it runs
100% local, no API key, no telemetry
Local test harness in your dev loop
License
MIT — free forever
Open source
Use together
Defends in production
Builds the adversarial test suite around it

Use them together

sunglasses://compare/sunglasses-vs-promptfoo/together
Test → defend

Build an adversarial suite in Promptfoo, measure how your stack responds, then put Sunglasses at the runtime boundary so the attacks you found are blocked in production.

Local, both

Both run locally in your own environment. Sunglasses runs with no API key, no cloud, no telemetry; Promptfoo runs in your dev loop and CI.

When to pick which

sunglasses://compare/sunglasses-vs-promptfoo/pick
Pick Sunglasses when

you need live protection — your agent is reading untrusted emails, web pages, tool output, or handoffs right now and needs a block/warn/allow decision at runtime.

Pick Promptfoo when

you need repeatable evaluation — comparing prompts, models, or guardrail configs against test cases before you ship.

Pick both when

you want a full lifecycle: test adversarial cases before release, defend against them at runtime.

FAQ

Is Sunglasses an alternative to Promptfoo?+
Not exactly — they solve different jobs. Promptfoo is a developer eval and red-team framework you run before shipping to test prompts, models, and guardrails. Sunglasses is a runtime pre-ingestion filter that scans untrusted input and blocks attacks while your agent is live. Most teams use both.
Can Promptfoo test Sunglasses?+
Yes. You can use Promptfoo-style adversarial test suites to measure how Sunglasses responds to attack payloads, then run Sunglasses at runtime to block those payloads in production.
Which do I need first?+
If you are shipping an agent to production, you need runtime defense — that is Sunglasses. Add Promptfoo to build a repeatable adversarial test suite around it.