Back to Docs
Vibe Security
Quick Start

Get Started in 10 Minutes

Follow this guide to integrate Intent Firewall into your infrastructure and start protecting your APIs from malicious AI interactions.

Prerequisites
What you'll need before getting started
Node.js 18+ or Python 3.8+
Vibe Security API key
Existing API endpoints to protect
Basic understanding of REST APIs
1Install the SDK
Add Intent Firewall to your project

Node.js / TypeScript

npm install @vibe-security/intent-firewall

Python

pip install vibe-security-firewall
2Configure the Firewall
Set up your API key and basic configuration

Environment Variables

VIBE_SECURITY_API_KEY=your_api_key_here
VIBE_SECURITY_ENDPOINT=https://api.vibesecurity.com
FIREWALL_MODE=proxy  # or sidecar

Basic Setup (Node.js)

import { IntentFirewall } from '@vibe-security/intent-firewall';

const firewall = new IntentFirewall({
  apiKey: process.env.VIBE_SECURITY_API_KEY,
  mode: 'proxy',
  policies: ['data-protection', 'rate-limiting']
});
3Integrate with Your APIs
Protect your API endpoints with dual checkpoint validation

Express.js Middleware

import express from 'express';
import { IntentFirewall } from '@vibe-security/intent-firewall';

const app = express();
const firewall = new IntentFirewall({ /* config */ });

// Apply firewall to all routes
app.use(firewall.middleware());

// Or protect specific routes
app.get('/api/users', firewall.protect(), (req, res) => {
  // Your API logic here
  res.json({ users: [] });
});

Manual Request Validation

// Pre-request validation
const validation = await firewall.validateRequest({
  method: 'GET',
  url: '/api/users',
  headers: req.headers,
  body: req.body,
  agentId: 'ai-assistant-v1'
});

if (!validation.allowed) {
  return res.status(403).json({
    error: 'Request blocked by Intent Firewall',
    violations: validation.violations
  });
}

// Your API logic here
const apiResponse = await yourApiLogic();

// Post-response validation
const responseValidation = await firewall.validateResponse(
  validation.context,
  apiResponse
);

if (!responseValidation.allowed) {
  // Log the violation and return filtered response
  console.warn('Response validation failed:', responseValidation.violations);
  return res.json(responseValidation.filteredResponse);
}

res.json(apiResponse);
4Test Your Integration
Verify that the firewall is working correctly

Test Legitimate Request

curl -X GET "http://localhost:3000/api/users?limit=10" \
  -H "Content-Type: application/json" \
  -H "X-Agent-ID: ai-assistant-v1"

# Expected: 200 OK with user data

Test Malicious Request

curl -X GET "http://localhost:3000/api/users/export" \
  -H "Content-Type: application/json" \
  -H "X-Agent-ID: malicious-agent"

# Expected: 403 Forbidden with violation details
5Monitor & Optimize
Set up monitoring and fine-tune your policies

Dashboard Access

View real-time security events and analytics in your Vibe Security dashboard.

Policy Tuning

Adjust security policies based on your traffic patterns and requirements.