Skip to content

Repository files navigation


🚀 Multi-Agent Launch Analysis System A Python-based multi-agent system that analyzes SpaceX launches by coordinating multiple specialized agents to gather and process real-time information about upcoming launches, weather conditions, and related news.

📌 Overview This system takes a natural language goal (e.g., "Find next SpaceX launch, check weather, assess delay") and coordinates multiple agents to: 1️⃣ Find the next SpaceX launch details 2️⃣ Check weather conditions at the launch site 3️⃣ Analyze relevant news articles 4️⃣ Provide a comprehensive analysis of potential launch delays

🧠 Agent Flow The system consists of four specialized agents, each with a defined role:

  1. 🗺️ Planner Agent Parses natural language goals Creates execution plans Coordinates between other agents Handles iterations if goals aren't met
  2. 🚀 SpaceX Agent Fetches launch data from SpaceX API Provides mission details Extracts launch site coordinates
  3. 🌦️ Weather Agent Retrieves weather data from OpenWeatherMap Analyzes launch conditions Predicts delay probability
  4. 📰 News Agent Searches for launch-related news Analyzes articles for delay indicators Provides context about potential issues

⚙️ Setup 🔧 Prerequisites Python 3.8 or higher pip (Python package manager)

💻 Installation 1️⃣ Clone the repository

git clone <repository-url>
cd <repository-name>

2️⃣ Install dependencies

pip install -r requirements.txt

3️⃣ Set up API keys Create a .env file in the project root and add your credentials:

OPENWEATHERMAP_API_KEY=your_key_here
NEWSAPI_API_KEY=your_key_here

⚠️ Note: the variable name must be NEWSAPI_API_KEY (not NEWS_API_KEY) — this matches what utils.py looks up via load_api_key('NEWSAPI').


🌐 API Setup ☁️ OpenWeatherMap Sign up at OpenWeatherMap Get your API key and add to .env 📰 NewsAPI Sign up at NewsAPI Add your API key to .env 🚀 SpaceX API No key required Uses public API: https://api.spacexdata.com

🧩 Usage ▶️ Running the System

python main.py

You'll be prompted to enter a goal, e.g.:

Please enter your goal (e.g., 'Check if next SpaceX launch will be delayed'):
> Find next SpaceX launch, check weather at that location, then summarize if it may be delayed

Example Output

Mission: Starlink 6-1
Launch Date: 2026-07-12T14:30:00Z
Launch Site: Kennedy Space Center
Weather Conditions: Clear
Delay Probability: 10%
Summary: Launch likely to proceed as scheduled. Weather conditions are
favorable with clear skies and moderate winds. No delay indicators found
in recent news.

🧾 Running Evaluations Run test evaluations:

python run_eval.py

Example Output:

Evaluation Summary:
Total tests: 2
Passed: 1
Failed: 1

Failed Tests:
evals/eval2.json:
  - weather.delay_probability: Value mismatch (expected 0.8, got 0.75)
  - news.articles[0].title: Value mismatch

🗂️ Project Structure

.
├── main.py              # Entry point
├── planner_agent.py     # Goal planning and coordination
├── weather_agent.py     # Weather data processing
├── spacex_agent.py      # SpaceX launch data
├── news_agent.py        # News analysis
├── utils.py             # Helper functions
├── .env                 # Environment variables (not committed)
├── requirements.txt     # Dependencies
└── evals/               # Evaluation examples
    ├── eval1.json
    └── eval2.json

🧩 Error Handling The system ensures reliability through: API call retries with exponential backoff Response validation Environment variable checks Detailed logging

🪵 Logging Logs follow this format:

2026-07-07 10:00:00,123 - agent_name - INFO - Message

🔒 Security Note This project does not use Google Cloud services despite referencing GOOGLE_APPLICATION_CREDENTIALS in main.py. That reference is leftover from an earlier architecture and can be safely removed. Never commit real API keys or service account credentials (.env, key.json, etc.) — they are excluded via .gitignore.

🤝 Contributing Fork this repository Create a feature branch Commit your changes Push to the branch Create a Pull Request

📜 License MIT License

👨‍💻 Author Kartik Mittal 📧 mittal.kartik2005@gmail.com

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages