AI Features
FlexGate is the first API gateway with native AI integration — turning live traffic into structured signals that Claude can reason about, without dashboards or noisy logs.
How It Works
Live Traffic
│
▼
FlexGate Event Bus ──► Structured AI Events (10 types)
│ │
│ ▼
│ AI Incident Created
│ │
│ ▼
│ Claude Analysis
│ (root cause + actions)
│ │
▼ ▼
Metrics / Logs Auto-Recovery Actions
(circuit break, scale, alert)Core Concepts
| Concept | Description |
|---|---|
| AI Events | 10 structured event types — CIRCUIT_BREAKER_OPENED, HIGH_LATENCY, ERROR_RATE_SPIKE, etc. |
| AI Incidents | Persisted incident records with Claude analysis, confidence scores, and recommended actions |
| Playbooks | Pre-built response strategies for common failure patterns |
| Cost Tracking | Per-analysis token usage and daily budget controls |
Sections
Sections
| 🎯 Use Cases | Real scenarios where FlexGate AI saves the day |
| 🚨 Incident Response | Step-by-step AI-assisted incident resolution |
| 🔄 Auto-Recovery | Automated healing playbooks for common failures |
| 💰 Cost Optimization | Keep AI analysis costs under $5/day |
| 🧪 Testing Guide | Test AI features without live incidents |
Quick Setup
bash
# Set your Claude API key
echo "ANTHROPIC_API_KEY=sk-ant-..." >> .env
# Restart FlexGate
npm start
# Verify AI endpoint
curl http://localhost:3001/api/ai/health💡 Free Providers: Don't have a Claude API key? FlexGate also supports Gemini and free open-source models. See AI Provider Configuration.