A bot that helps you navigating major cities in Kenya Aligning with SDG11.
# MtaaAgentProject
A comprehensive Kenyan city survival assistant that helps users navigate, survive, explore, and relocate in Kenyan cities through intelligent data scraping, AI-powered recommendations, and personalized itinerary generation.
## ποΈ Project Structure
```
MtaaAgentProject/
βββ agent/
β βββ __init__.py
β βββ scraper.py # All web scraping logic
β βββ prompt_templates.py # Prompt templates for HuggingFace model
β βββ agent_runner.py # Core class running agent tasks
β βββ cache.py # Caching scraped results (diskcache)
β βββ itinerary.py # Itinerary generation logic
β βββ [existing files...] # Other existing agent files
β
βββ models/
β βββ hf_model.py # HuggingFace transformer interface
β
βββ ui/
β βββ style.css # Custom Streamlit styling
β βββ components.py # Shared UI components (cards, loaders)
β
βββ cache/ # Auto-generated cache directory
βββ main.py # Main Streamlit entry point
βββ example_usage.py # Example usage demonstration
βββ requirements.txt # Dependencies
βββ README.md # This file
```
## π Quick Start
1. **Install Dependencies**
```bash
pip install -r requirements.txt
```
2. **Run the Streamlit App**
```bash
streamlit run main.py
```
3. **Try the Example Script**
```bash
python example_usage.py
```
## π§© Key Components
### AgentTaskRunner
The core orchestrator class that coordinates all agent functionality:
```python
from agent.agent_runner import AgentTaskRunner
runner = AgentTaskRunner(city="Nairobi", budget=50000, goal="Survive")
results = runner.run_all_tasks()
```
### HuggingFace Model Interface
AI-powered responses using transformer models:
```python
from models.hf_model import ask_model
response = ask_model("What are good areas to live in Nairobi?")
```
### Smart Caching
Persistent caching for scraped data:
```python
from agent.cache β¦