Skip to content
harishkotraPublic

About

SkySwarm is a real-time, 3D visualization platform that demonstrates the power of Agentic AI in complex, dynamic environments like global air traffic control.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

SkySwarm ✈️🧠

SkySwarm is a real-time, 3D visualization platform that demonstrates the power of Agentic AI in complex, dynamic environments like global air traffic control.

Unlike traditional rule-based systems that follow rigid conditional logic, SkySwarm features autonomous flights powered by large language models (LLMs, via Ollama and Agno) that can "think" and adapt on the fly. When a crisis hits—like a severe storm or an unexpected airport shutdown—these AI agents evaluate fuel levels, congestion, and weather risks to dynamically reroute, make emergency landings, or safely proceed to their destinations.

🌟 Key Features

  • Interactive 3D Globe: Built with globe.gl and React, offering a stunning, interactive view of global air traffic.
  • Dual-Mode Navigation: Compare traditional, deterministic routing (RULE mode) against adaptive, intelligent agents (LLM mode).
  • Live Crisis Injection: Introduce localized weather events (storms, turbulence) or system-wide disruptions (airport shutdowns, fuel shortages) and watch the swarm react.
  • Real-Time Thought Logging: Inspect individual LLM-driven flights to see their internal reasoning, fuel considerations, and decision-making process in real-time.
  • Data-Driven: Utilizes real-world openflights data for accurate airport locations and authentic flight routes.

Video Demo

Screenshot at Mar 02 20-50-53

Technical Blog


🏗️ Architecture Overview

SkySwarm operates on a modern, decoupled architecture:

graph TD
    subgraph Frontend [React + Vite Frontend]
        UI[User Interface]
        GlobeGL[Globe.GL 3D Visualization]
        Control[Sim Controls & Injectors]
        HUD[Flight Inspection HUD]
        
        UI --> GlobeGL
        UI --> Control
        GlobeGL --> HUD
    end

    subgraph Backend [FastAPI Backend]
        API[REST API layer]
        SimEngine[Simulation Engine]
        DataMgr[OpenFlights DataLoader]
        
        API --> SimEngine
        SimEngine --> DataMgr
    end
    
    subgraph AI_Layer [Agentic AI Layer]
        Agno[Agno Agent Framework]
        Ollama[Ollama Local LLMs]
        
        SimEngine --> |Decision Requests| Agno
        Agno <--> |Inference| Ollama
    end

    Frontend <--> |Poll flights/sec| API
    Frontend --> |Trigger Events| API
Loading

1. The Frontend (React + globe.gl)

A high-performance visualizations layer that renders thousands of flight paths, aircraft positions, and active airports. It continually polls the backend to animate the aircraft and displays a control panel for user interaction.

2. The Backend (FastAPI + Python)

The simulation engine. It loads real-world data, manages the state of every flight (position, fuel, destination, mode), and steps the simulation forward every second. It handles API requests from the frontend to spawn flights or trigger crisis events.

3. The Agentic Core (Agno + Ollama)

When a flight operates in LLM mode, the backend delegates its navigational choices to an Agno agent. This agent is provided with the aircraft's current state and environmental hazards, and it queries a local Ollama model to determine the safest next action (e.g., PROCEED, DIVERT, HOLD).


🚀 Getting Started

Prerequisites

  • Node.js (v18+)
  • Python (3.9+)
  • Ollama (installed and running locally)
  • The llama3.2 model for Ollama (ollama run llama3.2)

1. Pre-requisites & Data Preparation

First, download the required global airport and route datasets from OpenFlights:

# From the root directory
curl -o backend/airports.dat https://raw.githubusercontent.com/jpatokal/openflights/master/data/airports.dat
curl -o backend/routes.dat https://raw.githubusercontent.com/jpatokal/openflights/master/data/routes.dat

2. Start the Backend Simulation

cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python main.py

The backend will run on http://localhost:8000

3. Start the Frontend Visualizer

cd frontend
npm install
npm run build
npx serve dist --listen 5174

Access the UI at http://localhost:5174


🛠️ Customization & Extensibility

SkySwarm is designed to be a sandbox. Here is what you can potentially build or customize:

1. Swap the Intelligence Layer: Currently uses local Ollama models for privacy and cost control. You can easily modify backend/agents.py to route decisions through OpenAI (GPT-4), Anthropic (Claude), or Gemini for higher reasoning capabilities.

2. Introduce New Crisis Types: Add new endpoints in main.py and logic in simulation.py to simulate volcanic ash clouds, geopolitical airspace closures, or solar flares knocking out GPS.

3. Multi-Agent Negotiation: Currently, agents act independently based on their surroundings. You could extend the Agno agents to communicate with each other to negotiate landing slots or coordinate holding patterns during high congestion.

4. Real-World Live Data: Replace the static openflights dataset with live APIs (like FlightAware or OpenSky Network) to overlay agentic crisis response on top of actual, current global air traffic.

5. Supply Chain & Logistics: The core engine isn't limited to planes. By swapping the dataset and the globe visualization style, this architecture works perfectly for simulating global naval shipping routes, autonomous trucking fleets, or drone deliveries.

About

SkySwarm is a real-time, 3D visualization platform that demonstrates the power of Agentic AI in complex, dynamic environments like global air traffic control.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages