๐ค Multi-agent security operations | LangGraph + MCP + 6 specialized agents
โโโ โโโโโโ โโโโ โโโ โโโโโโโ โโโโโโโ โโโโโโโ โโโโโโ โโโโโโโ โโโ โโโ
โโโ โโโโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโ
โโโ โโโโโโโโโโโโโโ โโโโโโ โโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโ โโโโโโโโโโโโโโโโโโโโโ โโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโ
โโโโโโโโโโโ โโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโ โโโโโโ โโโ โโโ
โโโโโโโโโโโ โโโโโโ โโโโโ โโโโโโโ โโโโโโโ โโโ โโโโโโ โโโโโโ โโโ โโโ
โโโโ โโโโ โโโโโโโโโโโโโโ โโโโโโ โโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ
โโโโโ โโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโ
โโโโโโโโโโโโโโ โโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโ โโโโโโ โโโ โโโ
โโโโโโโโโโโโโโ โโโโโโโ โโโโโโโโโโโ โโโโโโโโโ โโโโโโโโโโ โโโ
โโโ โโโ โโโโโโโโโโโโโโ โโโ โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโ โโโ
โโโ โโโ โโโโโโโโโโ โโโ โโโ โโโโโโโ โโโโโโโโโโโ โโโโโ โโโ
๐ค Autonomous Security Agents with LangGraph & MCP
Multi-agent system for security operations, code analysis, and Mantis defense integration
๐๏ธ Architecture
graph TD
A[User Input] --> B[LangGraph Orchestrator]
B --> C[Code Analysis Agent]
B --> D[Knowledge Agent]
B --> E[Mantis Defense Agent]
B --> F[Red Team Agent]
B --> G[Research Agent]
C --> H[MCP Tool Layer]
D --> H
E --> H
F --> H
G --> H
H --> I[Mantis MCP Server]
H --> J[Memory MCP Server]
H --> K[Learning Loop MCP]
I --> L[Security Operations]
J --> L
K --> L
style B fill:#f9f,stroke:#333,stroke-width:4px
style H fill:#bbf,stroke:#333,stroke-width:2px
style L fill:#bfb,stroke:#333,stroke-width:2px
Multi-Agent System with LangGraph orchestration, MCP tool integration, and persistent state management.
๐ Features
Specialized Security Agents
- ๐ Code Analysis Agent - Static analysis, vulnerability detection, security patterns
- ๐ง Knowledge Agent - Memory persistence, context retrieval, pattern matching
- ๐ก๏ธ Mantis Integration Agent - Defensive prompt injection, LLM attack detection
- โ๏ธ Red Team Agent - Automated penetration testing, attack simulation
- ๐ฌ Research Agent - Threat intelligence, CVE analysis, security research
- ๐ Workflow Agent - Multi-agent orchestration, task coordination
MCP Integration
- Model Context Protocol - Unified tool interface for Claude and other LLMs
- Real-time Communication - WebSocket and HTTP streaming support
- State Management - Persistent conversation context across sessions
- Tool Chaining - Multi-step automated workflows
LangGraph Capabilities
- Visual Debugging - LangGraph Studio integration for graph visualization
- State Checkpointing - Pause, resume, and replay agent execution
- Human-in-the-Loop - Interactive approval gates for sensitive operations
- Parallel Execution - Concurrent agent processing for performance
Getting Started
- Install dependencies, along with the LangGraph CLI, which will be used to run the server.
cd path/to/your/app
pip install -e . "langgraph-cli[inmem]"
- (Optional) Customize the code and project as needed. Create a
.envfile if you need to use secrets.
cp .env.example .env
If you want to enable LangSmith tracing, add your LangSmith API key to the .env file.
# .env
LANGSMITH_API_KEY=lsv2...
- Start the LangGraph Server.
langgraph dev
For more information on getting started with LangGraph Server, see here.
How to customize
-
Define runtime context: Modify the
Contextclass in thegraph.pyfile to expose the arguments you want to configure per assistant. For example, in a chatbot application you may want to define a dynamic system prompt or LLM to use. For more information on runtime context in LangGraph, see here. -
Extend the graph: The core logic of the application is defined in graph.py. You can modify this file to add new nodes, edges, or change the flow of information.
Development
While iterating on your graph in LangGraph Studio, you can edit past state and rerun your app from previous states to debug specific nodes. Local changes will be automatically applied via hot reload.
Follow-up requests extend the same thread. You can create an entirely new thread, clearing previous history, using the + button in the top right.
For more advanced features and examples, refer to the LangGraph documentation. These resources can help you adapt this template for your specific use case and build more sophisticated conversational agents.
LangGraph Studio also integrates with LangSmith for more in-depth tracing and collaboration with teammates, allowing you to analyze and optimize your chatbot's performance.