Video Demonstration of working application
An AI-powered cybersecurity analyst agent built for Security Operations Centre (SOC) workflows. Ask about CVEs, paste raw log lines for threat analysis, check domain security posture, or query the built-in knowledge base covering OWASP Top 10, NIST CSF, incident response, cloud security, ransomware, phishing, and zero trust.
Stack: NestJS · LangGraph ReAct agent · Groq LLM · Neon PostgreSQL + pgvector · Next.js 14
CyberSec_Agent/
├── backend/ # NestJS API — agent, RAG, auth, chat sessions
│ ├── data/ # Markdown knowledge base files
│ └── scripts/ # ingest.ts — embeds knowledge base into Neon
└── frontend/ # Next.js 14 chat UI
- Node.js 18 or later
- Yarn 1.x (
npm install -g yarn) - A Groq account (free tier works)
- A Neon account (free tier works)
- Sign in at console.groq.com
- Go to API Keys → Create API Key
- Copy the key — you will need it in step 3
The agent uses llama-3.3-70b-versatile by default. Other supported models: llama-3.1-8b-instant, mixtral-8x7b-32768.
- Sign in at neon.tech and create a new project
- In the project dashboard, open Connection Details
- Copy the Connection string — it looks like:
postgresql://user:password@ep-xxx.us-east-2.aws.neon.tech/neondb?sslmode=require - The
pgvectorextension is enabled automatically by the ingest script
cd backend
cp .env.example .envOpen .env and fill in the two required values:
# Required
GROQ_API_KEY=gsk_...your-key-here...
DATABASE_URL=postgresql://user:password@ep-xxx.aws.neon.tech/neondb?sslmode=require
# Optional — override defaults
GROQ_MODEL=llama-3.3-70b-versatile
PORT=8000
CORS_ORIGINS=http://localhost:3000
RAG_TOP_K=3
DATA_DIR=./datacd frontend
cp .env.local.example .env.localThe default value works for local development — only change it if the backend runs on a different host or port:
NEXT_PUBLIC_API_URL=http://localhost:8000Run both from the repo root:
cd backend && yarn install
cd ../frontend && yarn installThis step embeds the markdown files in backend/data/ into Neon using a local model (Xenova/bge-small-en-v1.5, ~45 MB, downloaded on first run). It also runs the database migrations.
cd backend
yarn ingestExpected output:
CyberSentinel — Knowledge Base Ingestion
==================================================
Migrations applied.
Loading embedding model...
Model ready.
Generating embeddings for N chunks...
Success! Ingested N chunks into Neon.
Re-run this command any time you add or edit files in backend/data/.
Open two terminals:
Backend (port 8000):
cd backend
yarn start:devFrontend (port 3000):
cd frontend
yarn start:devOpen http://localhost:3000 in your browser.
| Tool | Trigger |
|---|---|
| CVE Lookup | Mention any CVE ID (e.g. CVE-2021-44228) |
| Log Threat Analysis | Paste a raw log line |
| Security Posture | Mention a domain in a security context |
| Knowledge Base RAG | Any question — OWASP, NIST, ransomware, phishing, zero trust, cloud security, incident response |
# Backend
cd backend && yarn build && yarn start
# Frontend
cd frontend && yarn build && yarn startSet CORS_ORIGINS in the backend .env to your frontend's production URL before deploying.