Open-source AI runtime security projects
Open-source projects can screen prompts and outputs at runtime: NVIDIA NeMo Guardrails, Meta's Llama Guard and Prompt Guard, LLM Guard and Guardrails AI. They give control and no vendor fee, but you run them. Repositories were read on 16 Nov 2026.
Facts read on .
Which open-source projects enforce at runtime?
Four widely used projects each enforce at the model layer. NVIDIA NeMo Guardrails adds programmable rails to LLM applications, with input, dialog, retrieval, execution and output rails. Meta's Purple Llama repository includes Llama Guard, Llama Prompt Guard 2 and LlamaFirewall. Each is a library or model you integrate yourself, so enforcement happens only where your code calls it, and any path that skips the call is unprotected.
LLM Guard from Protect AI lists prompt and output scanners, such as prompt injection, secrets and sensitive-data scanners. Guardrails AI is a Python framework that runs input and output guards and a hub of pre-built checks.
Sources: NVIDIA NeMo Guardrails; Meta Purple Llama; LLM Guard; Guardrails AI.
What does each model do?
Llama Guard 3 is a suite of models for safety classification of text and images. Llama Prompt Guard 2 detects prompt injection and jailbreaking attacks and is offered in two sizes.
These are classifiers, so your code must act on their verdicts. They do not run as a gateway or on your endpoint by themselves.
Sources: Llama Guard 3; Llama Prompt Guard 2.
How do they compare with commercial tools?
Open source gives code you can read and change. Commercial tools add hosted inference, agent hooks, endpoint coverage, logs and support. The open-source projects here screen text, and none of the pages read describes blocking a shell command or package install on a machine.
Commercial vendors differ widely. Cisco publishes Apache-2.0 code for parts of its AI Defense tooling, and HiddenLayer publishes open-source code and release notes.
Sources: Cisco AI Defense; HiddenLayer runtime release notes.
What does it cost to run them?
You pay in engineering time and compute: hosting models, tuning thresholds, updating rules and building logs. Guardrails AI announced on 6 Jul 2026 that its validators are moving to standard PyPI packages and its hosted remote inferencing would end, with a planned cutoff of 25 Aug 2026.
That kind of change is a maintenance cost to plan for.
Sources: Guardrails AI.
When should you start with open source?
Start with open source to learn your traffic, prototype policies, or keep data in your environment. Move to a commercial tool where you need endpoint enforcement, managed updates, support and an audit trail.
Whichever you choose, measure false positives and latency on your own prompts first.
What should you check before adopting one?
Check the license, the last release date, how detections are updated, and whether the project documents how to run it at your volume. Check what happens on an error, since an open-source library inherits your application's failure mode.
Run it against your own test set and record false positives before enforcing.
Sources: NVIDIA NeMo Guardrails; LLM Guard.
Which fits which job?
Use Llama Guard to classify content safety, Prompt Guard to flag prompt attacks, NeMo Guardrails to shape dialog and tool use, LLM Guard for scanner checks and Guardrails AI for structured output validation.
None of these replaces an agent-action control. They are building blocks around the model.
Sources: Llama Guard 3; Llama Prompt Guard 2; NVIDIA NeMo Guardrails; LLM Guard; Guardrails AI.
How do you keep them current?
Pin versions, watch the repository's release notes and re-run your test set after every upgrade. Guardrails AI's notice about moving validators to PyPI packages shows how a project can change its distribution, so read release notes before an upgrade.
Assign one person to own updates, since no vendor will.
Sources: Guardrails AI.
Questions about this topic
Is there open-source AI runtime protection?
Yes. NeMo Guardrails, Llama Guard, Llama Prompt Guard 2, LLM Guard and Guardrails AI screen prompts and outputs, though you host and tune them.
Sources
- NVIDIA NeMo Guardrails (github.com), read
- Meta Purple Llama (github.com), read
- Llama Guard 3 (github.com), read
- Llama Prompt Guard 2 (llama.com), read
- LLM Guard (github.com), read
- Guardrails AI (github.com), read
- Cisco AI Defense (cisco.com), read
- HiddenLayer runtime release notes (docs.hiddenlayer.ai), read