A multi-agent AI system for autonomous network monitoring and optimization using LLM-powered decision making.
๐ Live Deployment: https://agentic-network-optimizeragentic-ai-for.onrender.com
Note: Free tier may take 30-50 seconds to wake up on first visit.
git clone https://github.com/Ayan113/Agentic-AI-for-Autonomous-Network-Optimization.git
cd Agentic-AI-for-Autonomous-Network-Optimization
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
python run.py api
# Open http://localhost:8000 in your browser-
Multi-Agent Architecture: Four specialized agents working in coordination
- Monitor Agent: Collects network metrics, detects anomalies
- Decision Agent: LLM-powered analysis and decision making
- Action Agent: Executes corrective actions
- Coordinator: Orchestrates the Monitor โ Decide โ Act loop
-
Modern Web Dashboard: Real-time visualization with glassmorphism UI
-
LLM-Based Decision Making: Uses GPT-4 or mock provider for intelligent analysis
-
Network Simulation: Built-in simulator with configurable events and scenarios
-
Feedback Loop: Learns from action outcomes to improve future decisions
-
REST API: Full control via HTTP endpoints
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ COORDINATOR โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ MONITOR โโโโโถโ DECISION โโโโโถโ ACTION โ โ
โ โ AGENT โ โ AGENT โ โ AGENT โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ โ โฒ โ โ
โ โผ โผ โ โผ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ NETWORK โ โ LLM โ โ FEEDBACK โ โ
โ โSIMULATOR โ โ PROVIDER โ โ LOOP โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Clone the repository
git clone https://github.com/Ayan113/Agentic-AI-for-Autonomous-Network-Optimization.git
cd Agentic-AI-for-Autonomous-Network-Optimization
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtWeb Dashboard (Recommended):
python run.py api --port 8000
# Open http://localhost:8000 in your browserDemo Mode - Run a single optimization cycle:
python run.py demoContinuous Monitoring:
python run.py monitor --interval 10 --cycles 5| Feature | Description |
|---|---|
| Health Ring | Real-time network health score (0-100) |
| Agent Status | Live status of all 4 agents |
| Network Metrics | Latency, bandwidth, packet loss, CPU, memory |
| Node Grid | Visual health status of all network nodes |
| Run Cycle | Trigger optimization on demand |
| Scenarios | Simulate network issues (outage, high traffic, etc.) |
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Dashboard UI |
/status |
GET | System and agent status |
/metrics |
GET | Current network metrics |
/decisions |
GET | Decision history |
/cycle |
POST | Run optimization cycle |
/simulate |
POST | Trigger network scenario |
/docs |
GET | Interactive API documentation |
Edit config.yaml to customize:
llm:
provider: "mock" # Options: "openai", "mock"
model: "gpt-4o-mini"
network:
simulation:
enabled: true
nodes: 10
event_probability: 0.3
agents:
monitor:
polling_interval: 5
decision:
confidence_threshold: 0.7export OPENAI_API_KEY="your-api-key"
# Then update config.yaml: provider: "openai"โโโ src/
โ โโโ agents/ # AI Agents
โ โ โโโ base_agent.py
โ โ โโโ monitor_agent.py
โ โ โโโ decision_agent.py
โ โ โโโ action_agent.py
โ โ โโโ coordinator.py
โ โโโ network/ # Network simulation
โ โโโ llm/ # LLM integration
โ โโโ feedback/ # Learning system
โ โโโ api/ # REST API
โโโ frontend/ # Web dashboard
โ โโโ index.html
โ โโโ styles.css
โ โโโ app.js
โโโ config.yaml # Configuration
โโโ run.py # Entry point
โโโ requirements.txt # Dependencies
The system can execute these corrective actions:
| Action | Description |
|---|---|
optimize_routing |
Optimize network paths |
reduce_traffic |
Throttle congested traffic |
load_balance |
Redistribute load |
clear_cache |
Free memory |
restart_service |
Restart problematic services |
scale_up/down |
Add/remove instances |
Tested results from demo:
- Health improvement: 93 โ 97 (+4 points)
- Latency reduction: 29.7ms โ 20.1ms (-32%)
- Packet loss reduction: 1.40% โ 0.39% (-72%)
Contributions welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use and modify for your projects.
Ayan Chatterjee
- GitHub: @Ayan113
