| --- |
| title: Delivery Optimization Agent |
| colorFrom: indigo |
| colorTo: purple |
| sdk: gradio |
| sdk_version: 5.49.1 |
| app_file: app.py |
| pinned: false |
| license: mit |
| python_version: 3.11 |
| --- |
| |
| # Delivery Optimization Agent |
|
|
| Real-time route planning and optimization system powered by OpenStreetMap and AI agents. |
|
|
| ## Features |
|
|
| - **Interactive Route Maps** - Visual turn-by-turn directions using Folium |
| - **Smart Cost Optimization** - Real-world pricing based on vehicle type, distance, and traffic |
| - **Traffic Analysis** - Live traffic patterns and optimal departure times |
| - **Multiple Routes** - Compare alternative routes and choose the best one |
|
|
| ## How It Works |
|
|
| This agent uses: |
| - **OpenStreetMap (OSRM)** for routing |
| - **Nominatim** for geocoding |
| - **DeepAgents** for AI orchestration |
| - **Groq LLaMA** for natural language understanding |
|
|
| ## Example Queries |
|
|
| ``` |
| Plan route from Mumbai, Maharashtra to Pune, Maharashtra |
| Calculate cost for 500kg delivery from Delhi to Jaipur |
| Check traffic between Bangalore and Chennai |
| Find optimal route from Kolkata to Bhubaneswar with 1000kg cargo |
| ``` |
|
|
| ## Architecture |
|
|
| The system uses multiple specialized sub-agents: |
| - **Route Agent**: Plans optimal routes using OpenStreetMap |
| - **Cost Agent**: Calculates delivery costs based on multiple factors |
| - **Traffic Agent**: Analyzes real-time traffic patterns |
| - **Coordinator**: Synthesizes information into actionable recommendations |
|
|
| ## Environment Variables |
|
|
| Set these in Space settings: |
| - `GROQ_API_KEY`: Your Groq API key |
| --- |
|
|
| Built using DeepAgents, LangChain, and OpenStreetMap |