What Is an AI Firewall?
An AI firewall is a security control that inspects the prompts, responses, and tool calls flowing to and from AI applications, and blocks or flags those that are malicious or out of policy. It sits inline, in the request path, so bad input can be stopped before it reaches a large language model (LLM).
What does an AI firewall protect against?
Attacks aimed at AI-enabled applications, like prompt injection (input crafted to override a model's instructions), jailbreaks, and attempts to coax a model into leaking data or taking unintended actions. Similar controls can also apply to AI agents calling APIs on a company's behalf.
How does an AI firewall work?
It evaluates each request against detection logic and custom guardrails, then allows, blocks, or logs it. Approaches vary by vendor: some use a second model to judge prompts, while others use deterministic rules.
What is Fastly's AI Firewall?
Fastly's AI Firewall mitigates LLM-based attacks, including prompt injection, at the edge by evaluating prompts directly in the request path. Fastly describes its detection as deterministic and says it needs no GPU. It launched September 21, 2026, as part of the Fastly for AI portfolio.
AI firewall vs. WAF- what’s the difference?
A web application firewall (WAF) protects web applications and APIs from traditional attacks; an AI firewall protects the AI layer from attacks that arrive as natural language. They guard different things and are built to catch different threats.
WAF | AI firewall | |
What it protects | Web apps and APIs | LLM-powered apps and AI agents |
Typical threats | SQL injection, cross-site scripting (XSS), credential stuffing, bots, API abuse | Prompt injection, jailbreaks, malicious or manipulated model inputs |
What it inspects | HTTP requests: headers, parameters, payloads, behavior | Prompt content and its intent, in the request path |
Why it differs | Attacks follow recognizable code and traffic patterns | Attacks are plain-language text that looks like a normal request |
The core difference is the attack surface. A prompt injection contains no malicious code, so a request that is harmless to a WAF can still hijack a model.
Do I need an AI firewall if I already have a WAF?
If you run LLM-powered features or let AI agents call your APIs, yes: keep the WAF and add AI-specific protection. A WAF still blocks the web and API attacks it was built for, but it was not designed to judge the intent of a prompt.
You most likely need one if you:
Expose a chatbot, assistant, or other LLM feature to users or customers
Pass user input to a model that can reach internal data or tools
Let AI agents call your APIs
You may not need one yet if you have no AI features and no agent traffic. Even then, bot and API controls matter, since AI traffic is growing quickly: Fastly reports machine-generated traffic crossed 50% of its network traffic in July and August 2026.
The two are complementary layers, not substitutes. Fastly positions its AI Firewall alongside Next-Gen WAF, Bot Management, and API Discovery on one platform.
How can Fastly help?
Fastly covers the AI threat surface on one platform, so AI protection runs on the same network that already delivers and secures your traffic. The Fastly for AI portfolio includes:
AI Firewall: blocks LLM-based attacks, including prompt injection, at the edge before they reach your models.
AI Runtime Control: routes model calls through a single endpoint, with virtual keys that protect provider credentials, plus token-spend visibility, rate limits, budget controls, and failover.
API Security: enforces API contracts so AI agents cannot reach unsupported operations or act outside defined boundaries. You can observe or block non-conforming requests service by service.
AI Bot Management: identifies AI crawlers so you can allow, rate limit, block, or monetize them.
Next-Gen WAF, DDoS Protection, and API Discovery: the existing layers AI Firewall builds on.
Fastly says these policies apply across model providers, so you keep your choice of models and infrastructure. To get started, talk to a Fastly expert or see Fastly for AI.





