← Back to Agent Chain
🔥 AC-8 · Agent Firewall
Web Application Firewall for AI agents — rule-based traffic filtering with quarantine
Overview
Agent Firewall is a WAF built specifically for AI agent traffic. It inspects requests and responses, applies custom rules, and can block, quarantine, or rate-limit suspicious activity. Supports 4 deployment modes.
Deployment Modes
| Mode | Description | Best For |
|---|---|---|
| Inline Proxy | All traffic routes through firewall | Full visibility + control |
| Sidecar | Runs alongside your agent process | Containerized deployments |
| API Gateway Plugin | Integrates with existing API gateway | Enterprise infrastructure |
| SDK Middleware | Runs as SDK middleware | Quick integration |
API Endpoints
Free
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| GET | /v1/firewall/modes | List deployment modes | 🔓 Free |
Billable
| Method | Endpoint | Description | Auth |
|---|---|---|---|
| POST | /v1/firewall/configs | Create firewall configuration | 🔑 |
| GET | /v1/firewall/configs | List your firewall configs | 🔑 |
| GET | /v1/firewall/configs/:id | Get config details + rules | 🔑 |
| PATCH | /v1/firewall/configs/:id | Update firewall config | 🔑 |
| DELETE | /v1/firewall/configs/:id | Delete firewall config | 🔑 |
| POST | /v1/firewall/configs/:id/rules | Create a firewall rule | 🔑 |
| GET | /v1/firewall/configs/:id/rules | List rules for config | 🔑 |
| PATCH | /v1/firewall/rules/:id | Update a rule | 🔑 |
| DELETE | /v1/firewall/rules/:id | Delete a rule | 🔑 |
| POST | /v1/firewall/evaluate/:configId | Evaluate agent traffic | 🔑 |
| GET | /v1/firewall/events | List traffic events | 🔑 |
| GET | /v1/firewall/events/:id | Get event details | 🔑 |
| GET | /v1/firewall/quarantine | List quarantined items | 🔑 |
| POST | /v1/firewall/quarantine/:id/review | Review quarantine item | 🔑 |
| GET | /v1/firewall/stats | Firewall statistics | 🔑 |
Quick Start
// Create a firewall config
const fw = await ac.firewall.createConfig({
name: 'production-filter',
mode: 'inline-proxy'
});
// Add a rule
await ac.firewall.addRule(fw.id, {
name: 'block-injection',
type: 'block',
pattern: 'prompt_injection',
action: 'quarantine'
});
// Evaluate traffic
const result = await ac.firewall.evaluate(fw.id, {
input: userMessage,
source: 'web-chat'
});