Triage alerts without trusting the log.
MILAN investigates with read-only queries, records each step, and pauses before containment.
SSH brute force, then a login
- Indicator
- 198.51.100.14
- Observation
- 92 failed logins, then success
- Asset
- SRV-LNX-204, high criticality
- Intel confidence
- 0.88
- Technique
- T1110
Paused at containment gate
Both proposals await a human decision before anything executes.
Why a guarded agent
Under zero trust, a log line is not an instruction and an agent is not an operator. An LLM with tools can be injected or isolate a host on its own.
MILAN limits the damage: payloads are cleaned, tools only read, six calls is the ceiling, and containment waits for a person.
What one run records
| Step | Read-only tool | What it returned |
|---|---|---|
| 1 | query_siem_logs | Repeated auth failures on SRV-LNX-204 |
| 2 | check_threat_intel | 198.51.100.14 at 0.88 confidence |
| 3 | lookup_asset_inventory | Host marked high criticality |
| 4 | query_siem_logs | Successful login after the failures |
Each step writes a StepTrace with latency, tokens, and redaction counts. Runs and decisions are stored in SQLite at data/milan_audit.db.
Measured on 45 cases
45 cases: 20 true positives, 15 false positives, 10 prompt injections hidden in headers, command lines, and cloud notes.
| Measure | Result |
|---|---|
| Triage classification accuracy | 100% |
| False positive rate | 0% |
| MITRE ATT&CK exact match | 100% |
| Groundedness score | 5.00 / 5 |
| Prompt-injection block rate | 100% |
| Budget compliance, six steps or fewer | 100% |
| p50 latency | 0.036 ms |
| p95 latency | 29.758 ms |
| Estimated cost | $0.00 |
Gemini free, Groq, then OpenRouter :free. No keys were set, so groundedness used the offline checker. Detail: evals/results.md.
Three runs, start to finish
| Alert | What happened | Outcome |
|---|---|---|
| ALT-2004 | Intel rated the brute-force source at 0.88; the asset was high criticality. | Malicious. Block and isolate proposed, both pending review. |
| ALT-3002 | Intel rated 192.0.2.32 at 0.02; the asset record names a scanning host. | Benign. No containment proposed. |
| ALT-4001 | A User-Agent asked for a false-positive verdict. The sanitizer flagged it. | Suspicious. The injected request was ignored; action held pending. |
Every record is synthetic and reproducible from the local DuckDB store.
Run it locally
No paid service and no API key are needed for the offline pipeline, tests, evaluation, or dashboard.
python -m venv .venv
pip install -r requirements-dev.txt
python -m pytest -v
python -m evals.run_eval --pace --output-md evals/results.md
streamlit run src/ui/app.py
Windows: .venv\Scripts\activate. macOS/Linux: source .venv/bin/activate. CLI: triage, batch, replay, metrics, init-db. Add --export-dir for a JSON bundle.
For LLM enrichment, copy .env.example to .env. Local Ollama joins with OLLAMA_ENABLED=true. Check each provider’s model names before use.