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.
- Interactive 3D Globe: Built with
globe.gland 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
openflightsdata for accurate airport locations and authentic flight routes.
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
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.
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.
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).
- Node.js (v18+)
- Python (3.9+)
- Ollama (installed and running locally)
- The
llama3.2model for Ollama (ollama run llama3.2)
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.datcd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python main.pyThe backend will run on http://localhost:8000
cd frontend
npm install
npm run build
npx serve dist --listen 5174Access the UI at http://localhost:5174
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.