RedForge is an autonomous LLM red-team platform for A10-style AI firewall workflows. It generates adversarial prompts, runs controlled attacks, scores outcomes (blocked, partial, succeeded), analyzes patterns, and produces actionable defense recommendations.
- Task-aware scan orchestration with adaptive routing and retry logic
- Multi-step attack execution against direct or proxied model endpoints
- Judge-based success classification with canary leakage detection
- Real-time frontend via Server-Sent Events (SSE)
- Rule generation and human-approval workflow
- Structured JSON + Markdown reporting
- Optional agentic pipeline trigger via deploy hook
- Backend: FastAPI (
backend/) - Frontend: React + Vite (
frontend/) - Target LLM: Ollama (
target_llm/) - Optional WAF/Gateway: APISIX (
apisix/) - Research/train artifacts:
slm/
- Python 3.10+
- Node.js 18+
- Ollama installed and running
- Optional: Docker + Docker Compose (for APISIX stack)
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
uvicorn main:app --reload --port 8000Health check:
curl http://localhost:8000/api/healthcd frontend
npm install
npm run devFrontend API base defaults to http://localhost:8000.
From repo root:
action=setup MODEL_TARGET=acmecorp bash target_llm/setup.shSupported values:
MODEL_TARGET=acmecorpMODEL_TARGET=novatechMODEL_TARGET=all
Test Ollama endpoint:
curl -s http://localhost:11434/api/generate \
-H "Content-Type: application/json" \
-d '{"model":"acmecorp-assistant","prompt":"hello","stream":false}'- Open the frontend UI.
- Set
Target URL:- Direct Ollama:
http://localhost:11434/api/generate - APISIX proxy:
http://localhost:9080/api/generate
- Direct Ollama:
- Set
Target Model. - Set
Attack Count. - Click Start Red Team Scan.
Important behavior: if frontend sends target_model, that value is used for the scan; backend .env TARGET_MODEL is fallback only.
Start APISIX services:
cd apisix
docker compose up -dRegister upstream/routes/plugins:
bash setup_routes.shIf using root-level compose where Ollama runs in Docker too:
OLLAMA_HOST=ollama bash apisix/setup_routes.shUseful endpoints:
- Gateway:
http://localhost:9080 - Admin API:
http://localhost:9180 - Dashboard:
http://localhost:9000
GET /api/healthPOST /api/scanGET /api/attacks/streamPOST /api/rules/approvePOST /api/rules/nginx-exportPOST /api/deploy-hookGET /api/agent/pipelinesGET /api/agent/reportsGET /api/agent/reports/{filename}
Saved in backend/reports/:
redforge-report-*.jsonredforge-report-*.mdredforge-intel-*.md(agentic intelligence brief)
Copy backend/.env.example to backend/.env and edit values for your environment.
Most commonly changed fields:
TARGET_MODELATTACKER_OLLAMA_HOSTJUDGE_MODELDIRECT_TARGET_URLATTACKER_MODEL_POOLROUTER_MODE
Scan failedor empty stream:- Confirm backend is running on port
8000. - Confirm frontend points to correct API base.
- Confirm backend is running on port
model not found:- Pull/create model in Ollama and match exact name in
Target Model.
- Pull/create model in Ollama and match exact name in
- Unexpected judge scores:
- Use a stronger judge model and keep judge temperature low.
- APISIX blocks not visible:
- Verify scan target URL is
:9080endpoint and routes were bootstrapped.
- Verify scan target URL is
Use only in authorized environments for defensive security validation.