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 (open-source CLI)

Runtime filter vs eval tool · Facts checked 2026-10-29
sunglasses://compare/sunglasses-vs-promptfoo
The framing

These solve different jobs, not the same job differently. Sunglasses is a runtime pre-ingestion filter that blocks live attacks. Testing is not defending — and defending is not testing.

The Promptfoo CLI

In its README’s words, “a CLI and library for evaluating and red-teaming LLM-based apps”. The vendor also offers Guardrails and an MCP Proxy; this page compares the CLI only.

Why not either/or

You test with the Promptfoo CLI 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. The grey line under each Promptfoo cell quotes its README or docs, with the page and the date fetched (2026-10-29).

Sunglasses
Promptfoo (open-source CLI)
Job
Runtime pre-ingestion filter
Evaluating and red-teaming LLM-based apps.Its README: “promptfoo is a CLI and library for evaluating and red-teaming LLM-based apps.” Fetched 2026-10-29.
When it runs
Live — while the agent is running
In your IDE and in CI/CD, per its docs.Its docs intro: “Find LLM vulnerabilities in your IDE and CI/CD”. Fetched 2026-10-29.
What it does
Scans untrusted input, returns block / quarantine / allow_redacted / allow
Automated evaluations of prompts and models.Its README: “Test your prompts and models with automated evaluations”. Fetched 2026-10-29.
Output
A runtime decision your code acts on
Scores and vulnerability and risk reports.Its docs intro: “Score outputs automatically” and “Promptfoo also produces high-level vulnerability and risk reports”. Fetched 2026-10-29.
Where it runs
Runs locally, no API key, no telemetry; nothing is sent unless you pass --report-to.
Its evals run on your machine, per its docs.Its docs intro: “This software runs completely locally. The evals run on your machine and talk directly with the LLM.” Fetched 2026-10-29. Only the evals are covered by that line.
License
MIT — free to use
Open source, MIT licensed, per its README.Its README: “Promptfoo remains open source and MIT licensed.” Fetched 2026-10-29.
Use together
Defends in production
Can be used to build an adversarial test suite around Sunglasses.Our suggestion, not a statement from its docs.

Use them together

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

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

Local, both

Sunglasses runs with no API key, no cloud, no telemetry, and sends nothing anywhere unless you pass --report-to. The Promptfoo CLI’s evals run on your machine, per its docs, and fit into 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, quarantine, allow_redacted or allow decision at runtime.

Pick the Promptfoo CLI when

you need repeatable evaluation — comparing prompts and models against test cases before you ship.

Pick both when

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

Sources and how to check

sunglasses://compare/sunglasses-vs-promptfoo/sources
Promptfoo CLI

README of promptfoo/promptfoo and promptfoo.dev/docs/intro, fetched 2026-10-29. Every quoted line in the table is verbatim from one of these two pages.

What this page does not cover

The vendor also offers Guardrails and an MCP Proxy (promptfoo.dev, fetched 2026-10-29). This page compares the CLI only, and it does not say whether the CLI’s red-team attack generation calls a service.

If something is out of date

Tell us at [email protected] and we will correct this page.

FAQ

Is Sunglasses an alternative to the Promptfoo CLI?+
Not exactly — they solve different jobs. The Promptfoo open-source CLI evaluates and red-teams LLM-based apps, per its README, in dev and CI. Sunglasses is a runtime pre-ingestion filter that scans untrusted input and blocks attacks while your agent is live. The vendor also offers Guardrails and an MCP Proxy; this page compares the CLI only.
Can Promptfoo test Sunglasses?+
Yes. You can use an adversarial test suite, written with the Promptfoo CLI or any other harness, 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 the Promptfoo CLI to build a repeatable adversarial test suite around it.