An AI-powered SOC analyst assistant that triages security alerts using Retrieval-Augmented Generation (RAG) over the MITRE ATT&CK knowledge base, powered by Claude.
Given a raw security alert, SOC Copilot:
- Retrieves the most relevant MITRE ATT&CK techniques using semantic search (ChromaDB)
- Reasons over the alert + retrieved context using Claude to produce a structured triage decision
- Returns a verdict (CRITICAL/HIGH/MEDIUM/LOW/BENIGN), confidence score, matched techniques, recommended actions, and investigation queries
- Learns from analyst feedback via a thumbs up/down loop that tracks agent accuracy over time
Alert Input
│
▼
┌─────────────────┐
│ ChromaDB (RAG) │ ◄── MITRE ATT&CK (600+ techniques, embedded at ingest)
│ Vector Store │
└────────┬────────┘
│ Top-K relevant techniques
▼
┌─────────────────┐
│ Claude (LLM) │ ◄── System prompt with SOC analyst persona
│ Triage Agent │
└────────┬────────┘
│ Structured JSON verdict
▼
┌─────────────────┐
│ FastAPI │ ◄── REST API + Swagger UI
│ /triage │
│ /feedback │
└─────────────────┘
| Component | Technology |
|---|---|
| LLM | Anthropic Claude (claude-sonnet) |
| Vector Store | ChromaDB (local, persistent) |
| Embeddings | ChromaDB default (all-MiniLM-L6-v2) |
| API | FastAPI + Uvicorn |
| Threat Intel | MITRE ATT&CK Enterprise (live fetch) |
| Language | Python 3.11+ |
pip install -r requirements.txtcp .env.example .env
# Add your ANTHROPIC_API_KEY to .envpython -m ingestion.mitre_loaderThis fetches ~600 ATT&CK techniques from MITRE's CTI repository and ingests them into ChromaDB.
uvicorn api.main:app --reloadcurl -X POST http://localhost:8000/triage \
-H "Content-Type: application/json" \
-d '{
"alert_text": "Suspicious PowerShell execution detected. Process: powershell.exe -EncodedCommand <base64>. Parent: winword.exe. User: jsmith. Host: CORP-WS-042.",
"top_k": 5
}'curl -X POST http://localhost:8000/feedback \
-H "Content-Type: application/json" \
-d '{
"triage_id": "<id from triage response>",
"alert_text": "...",
"agent_verdict": "HIGH",
"analyst_verdict": "HIGH",
"analyst_correct": true,
"analyst_notes": "Confirmed phishing-initiated macro execution"
}'curl http://localhost:8000/feedback/accuracyFull Swagger UI available at http://localhost:8000/docs after starting the server.
| Endpoint | Method | Description |
|---|---|---|
/triage |
POST | Analyze a security alert |
/feedback |
POST | Record analyst verdict on a triage |
/feedback/accuracy |
GET | Agent accuracy metrics |
/health |
GET | Health check |
{
"triage_id": "a1b2c3d4-...",
"verdict": "HIGH",
"confidence": 0.87,
"matched_techniques": ["T1059.001", "T1566.001"],
"attack_chain": "Phishing email with malicious Office macro → PowerShell execution → likely staging for C2 or lateral movement",
"reasoning": "The parent process winword.exe spawning an encoded PowerShell command is a classic macro-based initial access pattern. The base64 encoding is consistent with obfuscation techniques used to evade detection. This warrants immediate investigation.",
"recommended_actions": [
"Isolate host CORP-WS-042 from the network",
"Collect and decode the base64 PowerShell payload",
"Review jsmith's email for phishing indicators in the last 24 hours"
],
"false_positive_indicators": [
"Could be legitimate IT automation if jsmith is in the IT admin group"
],
"investigation_queries": [
"process_name:powershell.exe parent_process:winword.exe last:1h",
"user:jsmith email_attachments:*.doc OR *.docm last:24h"
]
}soc-copilot/
├── ingestion/
│ └── mitre_loader.py # Fetches + ingests MITRE ATT&CK into ChromaDB
├── agent/
│ ├── retriever.py # RAG retrieval over ChromaDB
│ ├── triage_agent.py # Claude-powered triage reasoning
│ └── feedback.py # Analyst feedback store
├── api/
│ └── main.py # FastAPI application
├── data/ # ChromaDB persistence + feedback log (gitignored)
├── tests/ # Test suite
├── requirements.txt
├── .env.example
└── README.md
- Multi-turn interactive chat for alert investigation
- Batch alert processing
- Integration with Splunk / Elastic SIEM via webhook
- Fine-tuning pipeline using accumulated feedback data
- Detection rule generation from confirmed incidents
- RAG (Retrieval-Augmented Generation): Grounds LLM reasoning in a curated, domain-specific knowledge base rather than relying solely on parametric knowledge
- Vector similarity search: ChromaDB semantic retrieval using embedding cosine similarity
- Structured LLM outputs: Prompting Claude to return validated JSON for programmatic consumption
- Agentic feedback loops: Collecting human-in-the-loop signal to measure and improve agent quality over time
- Production-grade API: FastAPI with Pydantic validation, proper error handling, and OpenAPI docs