Test your prompts, agents, and RAGs. Red teaming/pentesting/vulnerability scanning for AI. Compare performance of GPT, Claude, Gemini, DeepSeek, and more. Simpl
Test your prompts, agents, and RAGs. Red teaming/pentesting/vulnerability scanning for AI. Compare performance of GPT, Claude, Gemini, DeepSeek, and more. Simpl
promptfoo is a CLI and library for evaluating and red-teaming LLM apps. Stop the trial-and-error approach - start shipping secure, reliable AI apps.
Website · Getting Started · Red Teaming · Documentation · Discord
Promptfoo is now part of OpenAI. Promptfoo remains open source and MIT licensed. Read the company update.
Requires Node.js >=22.22.0 for npm and npx usage. Node.js 24 LTS
is recommended; see the runtime support guide.
npm install -g promptfoo
promptfoo init --example getting-startedAlso available via brew install promptfoo and pip install promptfoo. You can also use npx promptfoo@latest to run any command without installing.
Most LLM providers require an API key. Set yours as an environment variable:
export OPENAI_API_KEY=sk-abc123Once you're in the example directory, run an eval and view results:
cd getting-started
promptfoo eval
promptfoo viewSee Getting Started (evals) or Red Teaming (vulnerability scanning) for more.
Here's what it looks like in action:
It works on the command line too:
It also can generate security vulnerability reports:
We welcome contributions! Check out our contributing guide to get started.
Join our Discord community for help and discussion.
Single-string `tests:` ignores globs (documented `tests: file://tests/*` silently loads 0 tests)
Enhance UI to group `--repeat` tests into collapsible sections
Telemetry beacon to `r.promptfoo.app` still fires when `PROMPTFOO_DISABLE_TELEMETRY` is set
`anthropic:messages:` / `anthropic:completion:` provider IDs truncate model names containing : (registry.ts doesn't join splits)
anthropic:claude-agent-sdk: copy working_dir into a new directory for each call and each repeat
Prp
Add TypeSafe Jev provider
Chat and Tool discussion, all models supported
isEmptyResponse treats transport failures (empty, undefined, null) as refusals, so a dead endpoint scores clean on 130 of 138 redteam graders
custom and voice-crescendo strategies ignore an explicitly configured redteamProvider and use remote generation instead