CoolFace
Apppublic

MCP-1st-Birthday/fleetmind-in-action

sourceHugging Faceupdated 10mo agoView on Hugging Face
6likes
App README

<div align="center">

πŸš› FleetMind AI Agent

Autonomous Fleet Dispatcher Powered by Gemini 2.0 Flash

The Problem: Managing delivery dispatch requires constant decision-makingβ€”who to assign, which route to take, how to handle urgent orders.

The Solution: FleetMind AI Agent autonomously handles complex dispatch workflows through natural conversation, powered by Gemini 2.0 Flash and 29 MCP tools.

The Impact: Say "Create urgent delivery for Sarah, find the best driver considering weather" and watch AI plan, reason, and execute the entire workflow.

![Demo Video](https://www.youtube.com/watch?v=chIWtFA20dU) ![Try It Live](https://huggingface.co/spaces/MCP-1st-Birthday/fleetmind-in-action) ![GitHub](https://github.com/mashrur-rahman-fahim/fleetmind-AI-Agent) ![LinkedIn Post](https://www.linkedin.com/feed/update/urn:li:ugcPost:7400981114875645952/) ![Facebook Post](https://www.facebook.com/share/v/1DgWKMELGF/) ![MCP Server](https://huggingface.co/spaces/MCP-1st-Birthday/fleetmind-dispatch-ai)

</div>


πŸ“Ί See It In Action

<div align="center"> <a href="https://www.youtube.com/watch?v=chIWtFA20dU"> <img src="https://img.youtube.com/vi/chIWtFA20dU/maxresdefault.jpg" alt="FleetMind AI Agent Demo" width="560"> </a> <p><b>▢️ Click to watch the demo video</b></p> </div>

Watch the autonomous AI agent plan, reason, and execute multi-step delivery dispatch workflows using Gemini 2.0 Flash and 29 MCP tools.

⚑ Quick Start

Step 1: Open the App

πŸ‘‰ [Launch FleetMind AI Agent](https://huggingface.co/spaces/MCP-1st-Birthday/fleetmind-in-action)

Step 2: Connect to MCP Server

  • β€”Enter MCP Server URL (pre-filled)
  • β€”Enter your API Key (Get one here)
  • β€”Click Connect

Step 3: Start Dispatching!

You: "Create an urgent delivery for Dr. Emily Watson at UCSF Medical Center,
     fragile medical supplies, assign the best driver"

Agent:
  πŸ”§ Step 1: Geocoding address... βœ“ (37.7631, -122.4586)
  πŸ”§ Step 2: Creating order... βœ“ ORD-abc123
  πŸ”§ Step 3: AI assignment... βœ“ Driver Mike selected (92% confidence)

  βœ… Created urgent order for Dr. Watson and assigned to Mike Chen.
     ETA: 25 minutes. AI selected Mike because: closest driver with
     refrigerated van, experienced with medical supplies.

πŸ† What Makes This Special?

FeatureDescription
πŸ€– True AutonomyPlans multi-step workflows, not just single tool calls
🧠 Iterative ReasoningSees each tool result before deciding next action
πŸ’­ Transparent ThinkingShows reasoning process in collapsible UI blocks
πŸ“š Context EngineeringRemembers preferences, summarizes long conversations
⚑ 29 MCP ToolsFull fleet management via official MCP SDK

πŸ› οΈ The 29 Tools

<details> <summary><b>πŸ“ Geocoding & Routing (3)</b></summary>

  • β€”geocode_address - Address β†’ GPS coordinates
  • β€”calculate_route - Traffic-aware routing
  • β€”calculate_intelligent_route - Weather + traffic AI routing

</details>

<details> <summary><b>πŸ“¦ Orders (8)</b></summary>

  • β€”create_order, fetch_orders, get_order_details
  • β€”search_orders, get_incomplete_orders, count_orders
  • β€”update_order, delete_order

</details>

<details> <summary><b>πŸ‘₯ Drivers (8)</b></summary>

  • β€”create_driver, fetch_drivers, get_driver_details
  • β€”search_drivers, get_available_drivers, count_drivers
  • β€”update_driver, delete_driver

</details>

<details> <summary><b>πŸ”— Assignments (8)</b></summary>

  • β€”create_assignment - Manual assignment
  • β€”`auto_assign_order` - Nearest driver
  • β€”`intelligent_assign_order` - πŸ€– Gemini AI assignment
  • β€”get_assignment_details, update_assignment
  • β€”unassign_order, complete_delivery, fail_delivery

</details>

<details> <summary><b>πŸ—‘οΈ Bulk (2)</b></summary>

  • β€”delete_all_orders, delete_all_drivers

</details>


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Gradio UI (app.py)                    β”‚
β”‚      Dark theme β€’ Reasoning visualization β€’ Chat        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              FleetMind Agent (agent.py)                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚    Context    β”‚  β”‚ Gemini 2.0    β”‚  β”‚  Iterative  β”‚ β”‚
β”‚  β”‚  Engineering  β”‚  β”‚    Flash      β”‚  β”‚ Agentic Loopβ”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚ MCP SDK (SSE)
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           FleetMind MCP Server (29 tools)               β”‚
β”‚   PostgreSQL β€’ Google Maps β€’ Gemini AI β€’ OpenWeather    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Local Development

bash
# Clone & install
git clone https://github.com/mashrur-rahman-fahim/fleetmind-agent-track2.git
cd fleetmind-agent-track2
pip install -r requirements.txt

# Configure .env
MCP_SERVER_URL=https://mcp-1st-birthday-fleetmind-dispatch-ai.hf.space
MCP_API_KEY=fm_your_key_here
GEMINI_API_KEY=your_gemini_key_here

# Run
python app.py

πŸ“Š Technical Specs

ComponentTechnology
AI ModelGemini 2.0 Flash (gemini-2.0-flash-exp)
UI FrameworkGradio 6.0.1
MCP TransportSSE (Server-Sent Events)
MCP SDKOfficial Python SDK
LanguagePython 3.11+

πŸ”— Links

ResourceURL
Live DemoFleetMind AI Agent
GitHubfleetmind-AI-Agent
MCP ServerFleetMind MCP
Get API KeyGenerate Key

πŸ‘₯ Team

FleetMind Development Team

MCP 1st Birthday Hackathon - Track 2: MCP in Action (Enterprise Category)


<div align="center">

Built with ❀️ using Gemini 2.0 Flash + MCP for the MCP 1st Birthday Hackathon

![MCP](https://modelcontextprotocol.io) ![Gradio](https://gradio.app) ![Gemini](https://ai.google.dev)

</div>