https://github.com/vnageshwaran-de/agentic-iot-security
Prompt templates, single-agent ReAct and multi-agent reference loops, and an Edge-IIoTset eval harness — companion to our Electronics 2026 IoT-security survey.
https://github.com/vnageshwaran-de/agentic-iot-security
agentic-ai cybersecurity edge-computing iot-security llm-agents multi-agent-systems prisma prompt-injection react-agent systematic-survey
Last synced: 1 day ago
JSON representation
Prompt templates, single-agent ReAct and multi-agent reference loops, and an Edge-IIoTset eval harness — companion to our Electronics 2026 IoT-security survey.
- Host: GitHub
- URL: https://github.com/vnageshwaran-de/agentic-iot-security
- Owner: vnageshwaran-de
- License: mit
- Created: 2026-05-29T03:25:28.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-06-17T05:38:54.000Z (21 days ago)
- Last Synced: 2026-06-17T07:21:00.166Z (20 days ago)
- Topics: agentic-ai, cybersecurity, edge-computing, iot-security, llm-agents, multi-agent-systems, prisma, prompt-injection, react-agent, systematic-survey
- Language: Python
- Homepage: https://www.mdpi.com/journal/electronics
- Size: 92.8 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# Agentic IoT Security Lab
Companion code artifact for the survey **"Agentic AI and Large Language Models for Autonomous IoT Cybersecurity: A Systematic Survey, Taxonomy, and Research Roadmap"**.
This repository operationalises the four-pillar taxonomy from Section 5 of the manuscript by providing:
- **`/prompts`** — reusable system-prompt templates and JSON tool schemas for each action scope (anomaly interpretation, response orchestration, threat hunting, vulnerability discovery, deception).
- **`/core_loops`** — minimal, reproducible Python reference implementations of a single-agent ReAct loop and three multi-agent coordination patterns (pipeline, debate, blackboard).
- **`/evaluation`** — benchmark harness that runs an agent against Edge-IIoTset-style traffic, recording detection accuracy and end-to-end latency, plus an adversarial harness that injects prompt-injection probes.
- **`/data`** — placeholder for downloaded datasets (not redistributed).
> The repository is intended as scaffolding: every file is fully runnable, but is deliberately kept under ~150 lines per module so it can be adapted in a single afternoon.
---
## Quick start
```bash
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
# Run the single-agent ReAct loop against a stub LLM and stub tools.
python core_loops/react_agent.py --model stub
# Run the three multi-agent patterns.
python core_loops/multi_agent.py --pattern pipeline
python core_loops/multi_agent.py --pattern debate
python core_loops/multi_agent.py --pattern blackboard
# Run the evaluation harness on synthetic Edge-IIoTset rows.
python evaluation/benchmark.py --rows 200
# Run the adversarial prompt-injection harness.
python evaluation/adversarial.py --probes 25
```
The default `--model stub` backend implements deterministic responses so the harness runs offline. To target a real LLM, set `--model openai|anthropic|llamacpp` and the corresponding API key/path.
## Project layout
```
.
├── README.md
├── requirements.txt
├── prompts/
│ ├── anomaly_interpretation.md
│ ├── response_orchestration.md
│ ├── threat_hunting.md
│ ├── vulnerability_discovery.md
│ ├── deception.md
│ └── tool_schemas.json
├── core_loops/
│ ├── react_agent.py
│ ├── multi_agent.py
│ └── utils.py
├── evaluation/
│ ├── benchmark.py
│ ├── adversarial.py
│ ├── metrics.py
│ └── datasets.py
└── data/.gitkeep
```
## Mapping to the manuscript taxonomy
| Taxonomy dimension | Where in this repo |
|---|---|
| Pillar I — Agent architecture | `core_loops/react_agent.py`, `core_loops/multi_agent.py` |
| Pillar II — Reasoning strategy | ReAct loop in `react_agent.py`; reflection helpers in `utils.py` |
| Pillar III — Action scope | `prompts/*.md`, `prompts/tool_schemas.json` |
| Pillar IV — Deployment topology | `--topology edge\|fog\|cloud` flag toggles model size and tool-set in `benchmark.py` |
## License
MIT. See `LICENSE`.
## Citation
If you build on this repository, please cite the companion survey (full BibTeX entry in the manuscript references).
---
## What's new in v0.2.0
- **`evaluation/probes/PROVENANCE.md`** — full provenance map for the 25 prompt-injection probes (12 CyberSecEval 3, 6 Greshake et al. ACM AISec 2023, 7 author-generated IoT-specific).
- **`core_loops/multi_agent/` is now a package**, with `sanitize.py` shipping the two-stage syntactic + semantic inter-agent input filter described in §10.3 of the manuscript.
- **`evaluation/sample_runs/`** — reproducible outputs from the deterministic stub mode that back the validation numbers cited in §10.3 (binary F1 = 0.83, multi-class macro F1 = 0.54, sub-microsecond stub latency on a 5,000-row run).
- **`PROMPT_INJECTION_PROBES`** in `core_loops/utils.py` expanded from 5 to 25 entries to match the provenance map.
## What's new since v0.2.0 (Round-1 revision alignment)
- **`corpus/`** — new directory shipping the PRISMA corpus materials referenced in §§3.4–3.5 and 10 of the manuscript: the coded extraction matrix (`extraction_matrix.csv`) and the search-strategy / screening documentation (`search_strategy.md`). The matrix currently contains the rows backing the revised manuscript's quantified counts (compound failure modes: 5 of 153, §8.2; false-discovery-rate reporting: 2 of 13, §5.3.4); remaining rows are being populated from the screening records — see `corpus/README.md`.
- **Stub-run docs updated** — the sanity-check run description moved from §10.3 to Appendix A in the revised manuscript; `evaluation/sample_runs/README.md` now states explicitly that stub figures validate harness functionality only (no language model involved).