NeedAITool — AI Tools Directory
Promptfoo
Code AI

Promptfoo

Open-source LLM security, red teaming & evaluation framework

4.8
freemiumintermediateTrendingVerifiedSince 2026-01
Visit Tool

About Promptfoo

Promptfoo is an open-source CLI and evaluation engine designed for LLM quality assurance, automated red teaming, and security vulnerability scanning. It enables engineering teams to systematically test prompts, agents, and RAG pipelines against prompt injections, jailbreaks, PII leakage, and hallucinations before releasing to production. With Promptfoo, developers write declarative test suites in YAML or JSON, defining test cases, assertion criteria (semantic similarity, regex, LLM-as-a-judge, toxicity), and scoring matrices that integrate directly into GitHub Actions CI/CD pipelines.

Promptfoo supports over 30 LLM providers and custom HTTP endpoints, allowing teams to test OpenAI, Anthropic, Gemini, Bedrock, and self-hosted models side by side. It includes automated adversarial red teaming plugins that generate hundreds of dynamic attack vectors (OWASP Top 10 for LLMs, prompt leak, SSRF, indirect prompt injection). Results can be viewed in a local web viewer or exported as JUnit XML, JSON, and CSV for automated pull request quality gates.

How It Works
1

Install Promptfoo globally via 'npx promptfoo@latest init'.

2

Define models, test prompts, and validation assertions in 'promptfooconfig.yaml'.

3

Run automated evaluations with 'npx promptfoo eval' or red teaming with 'npx promptfoo redteam init'.

4

Review side-by-side output scores, latency metrics, and security alerts in the interactive web UI via 'npx promptfoo view'.

5

Embed assertions into CI/CD pipelines to block PRs that regress model output quality.

Platforms
WebAPI
Best For
ai-engineerssecurity-researchersdevsecops
Screenshot
Promptfoo screenshot

Capabilities & Features

Free Tier
API Access
No Signup Required
Open Source
Works Offline
Customizable
Multimodal
Image Input
File Upload
Code Execution
Plugins
Collaboration
White Label
Self-Hostable
Voice InputImage OutputVideo InputVideo OutputAudio OutputWeb SearchMemoryBrowser Extension

Common Use Cases

1

llm-red-teaming

2

prompt-regression-testing

3

jailbreak-vulnerability-scanning

4

model-benchmark-comparison

Frequently Asked Questions

What is Promptfoo?

Promptfoo is an open-source testing and red teaming tool for LLM applications. It helps developers benchmark prompts, prevent regressions, and identify security vulnerabilities like prompt injections.

How does Promptfoo test for prompt injections?

Promptfoo includes automated red teaming modules that synthesize adversarial jailbreaks, roleplay bypasses, and indirect injection probes to test system prompt robustness.

Can Promptfoo be used in CI/CD pipelines?

Yes, Promptfoo returns non-zero exit codes and outputs JUnit/JSON reports, making it easy to block code merges if model accuracy drops below target thresholds.

Pricing Modelfreemium

Free Plan

Open-source CLI and testing framework with unlimited local evaluations is 100% free.

Paid Plan

Enterprise security dashboard, automated vulnerability scanners, and compliance reports available on custom pricing.

Get Started

Direct link · Verified & reader-supported

Pros & Cons

Open-source and lightweight with fast Node.js CLI execution

Comprehensive automated red-teaming scanner for OWASP LLM vulnerabilities

Seamless CI/CD integration with GitHub Actions and GitLab CI

Supports 30+ LLM providers and custom REST/WebSocket endpoints

Interactive local web dashboard with granular side-by-side diffing

Running large adversarial red-team test matrices can consume significant API tokens

Enterprise governance and role-based access require paid enterprise tier

Alternatives

View all
Braintrust

Braintrust

Enterprise AI evaluation, prompt playground, and continuous LLM monitoring

Braintrust is an enterprise-grade AI evaluation, prompt engineering, and LLM observability platform built to help software teams safely iterate and deploy generative AI features to production. It bridges the gap between ad-hoc prompt tweaking and rigorous software engineering CI/CD workflows. With Braintrust, teams run automated evaluation benchmarks on every prompt change, comparing output quality, hallucination rates, and latency across multiple LLM versions before committing changes to production codebases.

freemium
Ragas

Ragas

Supervised & reference-free evaluation framework for RAG pipelines

Ragas (Retrieval Augmented Generation Assessment) is the industry-standard evaluation framework designed specifically to measure the performance of RAG pipelines without requiring human-annotated ground truth datasets. Ragas evaluates RAG systems across critical dimensions: Faithfulness (hallucination detection), Answer Relevance (query alignment), Context Precision (signal-to-noise ratio in retrieved chunks), and Context Recall (measuring whether all necessary information was retrieved).

freemium
DeepEval

DeepEval

Production LLM evaluation & CI/CD unit testing framework

DeepEval is an open-source LLM evaluation framework built by Confident AI that feels like 'Pytest for LLMs'. It allows AI engineers to write unit tests for prompts, RAG pipelines, and conversational agents with production-ready evaluation metrics that execute seamlessly in local terminals and CI/CD pipelines. DeepEval includes 14+ research-backed evaluation metrics covering hallucination, G-Eval, toxicity, answer relevancy, bias, summarization quality, and tool correctness.

freemium
vLLM

vLLM

High-throughput and memory-efficient LLM serving engine powered by PagedAttention.

vLLM is the industry-standard open-source LLM serving and inference engine designed for ultra-high throughput and minimal memory waste. Developed by UC Berkeley researchers, vLLM introduced PagedAttention—a revolutionary memory management algorithm that manages attention key-value (KV) cache like virtual memory in operating systems, virtually eliminating memory fragmentation. Capable of delivering 2x to 4x higher throughput than Hugging Face TGI and standard PyTorch runtimes, vLLM powers production AI inference infrastructure across enterprise cloud clusters and high-volume API providers worldwide.

free
Replit

Replit

Collaborative cloud IDE with built-in AI agent

Replit provides a comprehensive cloud environment for writing, hosting, and deploying applications. Its AI agent can build entire features or full-stack apps from natural language.

freemium
Cosine Genie

Cosine Genie

Autonomous AI software engineer for solving real-world GitHub issues

Cosine Genie is a next-generation autonomous software engineering agent built to tackle complex software bugs, refactors, and feature requests. Operating with deep semantic understanding of massive codebases, Genie analyzes repository architectures, creates comprehensive execution plans, and generates multi-file diffs that pass existing continuous integration test suites. Designed to bridge the gap between AI code completion and full software development lifecycle automation, Genie mimics human engineering workflows by navigating dependency graphs, testing assumptions in sandboxed environments, and autonomously self-correcting logic errors before opening pull requests.

paid

Compare Promptfoo with Alternatives

Side-by-side feature, pricing, and pros & cons breakdowns

All Comparisons