Building a Multi-Agent Cybersecurity Investigation System with Persistent Memory
Source Reddit ThreatIntel
Discussion
ThreatLens AI is a multi-agent cybersecurity investigation system that uses specialized AI agents with persistent memory to detect, investigate, and learn from security incidents. It integrates a persistent memory component to retain verified investigation outcomes for future reference, enhancing analysis over time. The system involves human analyst oversight for knowledge retention and response approval, and does not automate remediation actions.
r/threatintel (opens in a new tab)u/GeethaSriVaraLakshmi0 points0 comments
Hi everyone!
I wanted to share some of the engineering work behind a project we developed called ThreatLens AI, as part of Team Dynamic Kicks.
Rather than building a traditional chatbot that simply analyzes security logs, we explored how multiple specialized AI agents could collaborate throughout a cybersecurity investigation.
1. Why a multi-agent approach?
We divided the investigation workflow into five specialized agents:
- Threat Detection Agent: Uses deterministic security rules and LLM-assisted interpretation to identify suspicious activity.
- Investigation Agent: Examines evidence, constructs incident timelines, and identifies investigation findings.
- Hindsight Memory Agent: Retrieves relevant knowledge from previous investigations.
- Response Recommendation Agent: Generates defensive recommendations that require analyst approval.
- Learning Agent: Retains analyst-confirmed outcomes for future investigations.
An AgentCoordinator manages the workflow.
2. The interesting engineering part: Persistent memory
One of the main things we wanted to explore was how an investigation could benefit from previous verified incidents.
We integrated Hindsight to support this workflow:
- Process and investigate the first credential-related incident.
- Have an analyst review and confirm the findings.
- Retain the verified outcome in memory.
- Process a similar second incident.
- Retrieve relevant historical knowledge to inform the investigation.
This creates a workflow where previous investigation experience can contribute to future analysis.
3. Technology stack
- Frontend: React, Vite, JavaScript, Tailwind CSS
- Backend: Python, FastAPI
- LLM integration: Groq
- Database: MongoDB
- Persistent memory: Hindsight
4. Engineering considerations
Some important aspects we considered during development:
- Separating agent responsibilities.
- Coordinating the investigation workflow.
- Distinguishing observed evidence from AI-generated hypotheses.
- Keeping human analysts involved in knowledge retention and response approval.
- Separating operational incident data from persistent memory.
5. What we learned
The biggest takeaway was that building a multi-agent application involves much more than calling an LLM several times.
The orchestration layer, data consistency, memory retrieval, error handling, and human oversight are equally important.
We're continuing to validate and improve ThreatLens AI.
GitHub: https://github.com/Ramithagolla/Dynamic-kicks
I'd be interested in hearing from developers working with agentic systems:
How do you approach memory management in multi-agent applications? Do you prefer a shared memory layer or separate memory for each agent?
Thanks for reading!
Links cited in the discussion
- https://github.com/Ramithagolla/Dynamic-kicks
- https://preview.redd.it/ai1yuk5k900i1.jpeg?width=1912&format=pjpg&auto=webp&s=157e946cc7afbff0cb285a74b795e95881408cd1
- https://preview.redd.it/72wxwn5k900i1.jpeg?width=1912&format=pjpg&auto=webp&s=0a3b9ba347cc1b8780cc6e38491d5e5a878389d8
- https://preview.redd.it/creaam5k900i1.jpeg?width=1912&format=pjpg&auto=webp&s=22957bdabe3bb2d2bce4f555ea8d56dd5dc01af3
- https://preview.redd.it/62kplp5k900i1.jpeg?width=1912&format=pjpg&auto=webp&s=a1ed8e61972a5bd26f39f506e44d494d57f207ec
References
- github.com/Ramithagolla/Dynamic-kicks (opens in a new tab)
- reddit.com/r/threatintel/comments/1xpepkf/building_a_multiagent_cybersecurity_investigation/ (opens in a new tab)
- preview.redd.it/ai1yuk5k900i1.jpeg?width=1912&format=pjpg&auto=webp&s=157e946cc7afbff0cb285a74b795e95881408cd1 (opens in a new tab)
- preview.redd.it/72wxwn5k900i1.jpeg?width=1912&format=pjpg&auto=webp&s=0a3b9ba347cc1b8780cc6e38491d5e5a878389d8 (opens in a new tab)
- preview.redd.it/creaam5k900i1.jpeg?width=1912&format=pjpg&auto=webp&s=22957bdabe3bb2d2bce4f555ea8d56dd5dc01af3 (opens in a new tab)
- preview.redd.it/62kplp5k900i1.jpeg?width=1912&format=pjpg&auto=webp&s=a1ed8e61972a5bd26f39f506e44d494d57f207ec (opens in a new tab)