How AI Agents Learn to Investigate Security Alerts
Building AI that can autonomously investigate security incidents requires more than just machine learning. Here's how we teach AI agents to think like security analysts.
When we tell people that FortMind uses AI agents to autonomously investigate security alerts, the most common question we get is: "How do you teach AI to think like a security analyst?"
It's a great question—and the answer is more nuanced than "we trained a model on incident data."
Building truly autonomous security investigation requires solving challenges at the intersection of AI research, security operations, and distributed systems engineering. This post pulls back the curtain on how we do it.
The Challenge: Security Investigation Isn't a Classification Problem
Most AI applications in security follow a familiar pattern:
1. Collect labeled training data (malicious vs. benign)
2. Train a classifier model
3. Apply the model to new data
4. Output a prediction and confidence score
This works well for specific tasks: malware detection, phishing identification, anomaly detection.
But security investigation is fundamentally different. An analyst investigating an alert doesn't just classify it as "malicious" or "benign." They:
This isn't classification—it's multi-step reasoning under uncertainty. And it requires a fundamentally different AI approach.
Our Approach: Agent-Based Reasoning
At the core of FortMind is what we call an Investigative AI Agent: an autonomous system that can plan, execute, and adapt security investigations.
Key Components
1. Perception Layer: Understanding Alerts in Context
When an alert arrives, the first challenge is understanding what it means. Not just "failed login attempt" but:
We don't pre-compute this context for every possible alert (that would be prohibitively expensive). Instead, our agent dynamically gathers relevant context based on the specific alert it's investigating.
Technical Implementation:
perception_module = {
entity_resolver: Extract entities (users, IPs, hosts, files) from alert
context_collector: Gather relevant historical and current data about each entity
relationship_mapper: Identify connections between entities across data sources
baseline_analyzer: Compare current behavior to established baselines
}
2. Reasoning Engine: Hypothesis-Driven Investigation
Once the agent understands the alert context, it needs to reason about what might be happening.
Human analysts do this instinctively: "If this is a compromised account, I'd expect to see lateral movement or privilege escalation. Let me check..."
We formalize this as hypothesis generation and testing:
# Simplified example of hypothesis-driven reasoning
def investigate_failed_login_alert(alert):
# Generate potential hypotheses
hypotheses = generate_hypotheses(alert)
# Example hypotheses:
# - H1: Credential stuffing attack
# - H2: User forgot password
# - H3: Account takeover attempt
# For each hypothesis, determine what evidence would support/refute it
for hypothesis in hypotheses:
evidence_requirements = define_evidence(hypothesis)
# Collect that evidence
evidence = collect_evidence(evidence_requirements)
# Update hypothesis probability
hypothesis.update_probability(evidence)
# Select most likely explanation
conclusion = select_best_hypothesis(hypotheses)
return conclusion
Key Innovation: The agent doesn't execute a fixed investigation playbook. It dynamically generates hypotheses based on the specific alert, determines what evidence would confirm or refute each hypothesis, and adaptively collects that evidence.
3. Knowledge Base: Security Domain Expertise
To reason effectively about security incidents, the agent needs to "know" about:
We represent this knowledge using a combination of:
4. Action Engine: Dynamic Investigation Execution
The agent doesn't just think about what to do—it actually does it:
Critically, the agent's action sequence isn't hardcoded. It's planned dynamically based on:
5. Learning Loop: Continuous Improvement
Every investigation is a learning opportunity. After each alert:
learning_module = {
outcome_validation: Was this a true positive? False positive? How confident are we?
pattern_extraction: What signals were most predictive of the outcome?
baseline_updates: Update entity behavior baselines with new observations
model_refinement: Adjust hypothesis generation and evidence weighting
}
The agent gets better at investigating your specific environment over time:
Training Autonomous Investigators: The Technical Details
How do you actually build an AI agent that can do all of this? Here's our technical approach:
1. Foundation: Large Language Models for Reasoning
We use state-of-the-art language models as the reasoning engine. Why?
But raw LLMs aren't enough. They need to be:
2. Reinforcement Learning from Security Analyst Feedback
We don't just train on labeled datasets. We use reinforcement learning where the agent learns from security analyst feedback:
The RL Loop:
1. Agent investigates alert and reaches conclusion
2. Human analyst reviews investigation and provides feedback:
- Was the conclusion correct?
- Was the investigation thorough?
- Were any steps unnecessary?
- What evidence was most valuable?
3. Agent updates its policy based on feedback
4. Over time, learns to prioritize high-value investigation steps
This approach has several advantages:
3. Multi-Agent Architecture
Complex investigations often require multiple types of reasoning:
These agents cooperate and hand off to each other based on investigation needs.
4. Safety Mechanisms
Autonomous investigation is powerful, but it needs safeguards:
Confidence thresholds: The agent knows when it doesn't know
Human-in-the-loop for critical actions:
Audit trails:
Real-World Example: Investigating a Suspicious Login
Let's walk through how FortMind's AI agent investigates a real alert:
Alert: Failed login attempts from unusual location
Human Investigation (Traditional SOC):
1. Check user account details (5 min)
2. Look up IP geolocation (2 min)
3. Review recent user activity (10 min)
4. Check if IP is known bad (3 min)
5. Manually correlate with other users (15 min)
6. Escalate or close (5 min)
Total: 40 minutes (if the analyst gets to it immediately)AI Agent Investigation (FortMind):
Timestamp: 2025-01-20 14:32:15 UTC
[Perception] Parsed alert: Failed auth for user@company.com from 185.220.101.50
[Context] User: Senior Account Manager, Finance team, normally accesses from US East Coast
[Context] IP: Located in Romania, first seen in this environment
[Context] Recent activity: User logged in successfully from home IP 2 hours ago
[Hypothesis 1] Credential stuffing (probability: 0.45)
Evidence for: Unusual geography, multiple failed attempts
Evidence against: Targeted at single user, not mass campaign
[Hypothesis 2] Account takeover (probability: 0.35)
Evidence for: Unusual location, user's credentials may be compromised
Evidence against: User has active session from legitimate location
[Hypothesis 3] VPN misconfiguration (probability: 0.15)
Evidence for: User may be traveling or using VPN
Evidence against: Company VPN egress IPs are whitelisted, this IP is not in that range
[Hypothesis 4] False positive (probability: 0.05)
[Investigation] Checking for password spray patterns across environment...
[Investigation] Found 12 other accounts with failed logins from same IP block
[Investigation] Correlating timestamps... all attempts within 15-minute window
[Investigation] Checking threat intelligence... IP in Tor exit node list
[Conclusion] High confidence (0.87): Credential stuffing attack using Tor
[Evidence]
- 12 accounts targeted from same Tor exit node
- Attack pattern consistent with credential stuffing campaigns
- User's legitimate session still active from home IP
- No successful logins from attacker IP
[Recommendation] CLOSE as expected threat, successfully blocked
[Action] Added IP block to watchlist for 30 days
[Action] No user notification needed (credentials not compromised)
Investigation time: 8 seconds
The agent reached the same conclusion an expert analyst would—but in seconds instead of minutes, and with complete documentation of its reasoning.
The Future: Toward Fully Autonomous SOC Operations
We're still in the early stages of autonomous security. Current FortMind agents handle:
Coming soon:
The goal isn't to replace security analysts—it's to make them more effective by handling the repetitive, time-consuming work of alert investigation, freeing them to focus on strategic security initiatives.
Try It Yourself
Want to see autonomous security investigation in action?
Try our AdversaryAI™ Tool: Input your asset details and watch as AI maps realistic attack paths using MITRE ATT&CK techniques.
Book a Demo: See how FortMind handles real-world alerts from your environment.
Read our docs: Dive deeper into the technical architecture.
---
*Have questions about autonomous security or AI agents? We'd love to discuss. Get in touch with our engineering team.*
FortMind Engineering Team
AI & Security Research
The FortMind team is building the industry's first truly autonomous security operations platform. We share insights on AI, security, and the future of SOC operations.
Interested in Autonomous Security?
See how FortMind's AI agents autonomously investigate security alerts, map attack paths, and eliminate alert fatigue.