Vibe SecurityIntegration Examples

Integration Examples

Real-world examples showing how to integrate Intent Firewall protection into your applications, APIs, and AI systems.

Express.js Middleware
Protect Node.js APIs with middleware
const { FirewallClient } = require('@vibe-security/firewall-client')
const client = new FirewallClient({ apiKey: process.env.FIREWALL_API_KEY })
app.use('/api', async (req, res, next) => {
const response = await client.proxyRequest({
method: req.method,
targetUrl: `$https://api.example.com$/api/users`,
headers: req.headers,
body: req.body
})
if (response.allowed) next()
else res.status(403).json({ error: 'Blocked' })
})
FastAPI Integration
Python API protection with FastAPI
from firewall_client import FirewallClient
from fastapi import FastAPI, Depends
client = FirewallClient(api_key=os.getenv("FIREWALL_API_KEY"))
async def firewall_check(request: Request):
response = client.proxy_request(
method=request.method,
target_url=str(request.url),
intent="API request validation"
)
if not response.allowed:
raise HTTPException(403, "Request blocked")
@app.get("/users", dependencies=[Depends(firewall_check)])
async def get_users(): ...
Getting Started
New to Intent Firewall? Start with these essential examples

1. Basic Integration

Start with a simple API protection example

2. AI Agent Protection

Secure your AI agent interactions

3. Production Setup

Deploy to production with monitoring