Skip to content

๐Ÿค– Multi-agent AI system for autonomous network monitoring and optimization using LLM-powered decision making

Notifications You must be signed in to change notification settings

Ayan113/Agentic-AI-for-Autonomous-Network-Optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– Agentic AI for Autonomous Network Optimization

A multi-agent AI system for autonomous network monitoring and optimization using LLM-powered decision making.

Dashboard Screenshot

๐ŸŒ Live Demo

Note: Free tier may take 30-50 seconds to wake up on first visit.

Run Locally:

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

Python FastAPI License

๐ŸŒŸ Features

  • 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

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     COORDINATOR                              โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”              โ”‚
โ”‚   โ”‚ MONITOR  โ”‚โ”€โ”€โ”€โ–ถโ”‚ DECISION โ”‚โ”€โ”€โ”€โ–ถโ”‚  ACTION  โ”‚              โ”‚
โ”‚   โ”‚  AGENT   โ”‚    โ”‚  AGENT   โ”‚    โ”‚  AGENT   โ”‚              โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜              โ”‚
โ”‚        โ”‚              โ”‚    โ–ฒ           โ”‚                     โ”‚
โ”‚        โ–ผ              โ–ผ    โ”‚           โ–ผ                     โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”              โ”‚
โ”‚   โ”‚ NETWORK  โ”‚    โ”‚   LLM    โ”‚    โ”‚ FEEDBACK โ”‚              โ”‚
โ”‚   โ”‚SIMULATOR โ”‚    โ”‚ PROVIDER โ”‚    โ”‚   LOOP   โ”‚              โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

Installation

# 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.txt

Running the System

Web Dashboard (Recommended):

python run.py api --port 8000
# Open http://localhost:8000 in your browser

Demo Mode - Run a single optimization cycle:

python run.py demo

Continuous Monitoring:

python run.py monitor --interval 10 --cycles 5

๐ŸŽฎ Dashboard Features

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.)

๐Ÿ“Š API Endpoints

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

โš™๏ธ Configuration

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.7

Using OpenAI

export OPENAI_API_KEY="your-api-key"
# Then update config.yaml: provider: "openai"

๐Ÿ“ Project Structure

โ”œโ”€โ”€ 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

๐Ÿ”ง Available Actions

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

๐Ÿ“ˆ Performance

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%)

๐Ÿค Contributing

Contributions welcome! Please feel free to submit a Pull Request.

๐Ÿ“„ License

MIT License - feel free to use and modify for your projects.

๐Ÿ‘จโ€๐Ÿ’ป Author

Ayan Chatterjee

About

๐Ÿค– Multi-agent AI system for autonomous network monitoring and optimization using LLM-powered decision making

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors