This project was built for the Google Cohort 1 Hackathon. It demonstrates a multi-agent orchestration system that uses LangGraph to coordinate specialized sub-agents, which interface with external systems (like a database) using the Model Context Protocol (MCP).
In the Mahabharata, Vidur was the Prime Minister of Hastinapur — renowned as the wisest counsellor in the kingdom. He served with unwavering loyalty, spoke only the truth, and always acted in the best interest of those he served, even when it was difficult. He never sought power for himself; his entire purpose was to guide, advise, and execute with integrity.
This AI assistant takes its name and spirit from Vidur. Just as the original Vidur coordinated the affairs of a kingdom — managing information, advising on decisions, and keeping everything running smoothly — this system coordinates the many tasks of modern daily life. It listens, routes every request to the right specialist, and responds with purpose and reliability. It does not act on impulse; it delegates wisely.
- FastAPI Backend: Provides a
/chatendpoint for a frontend to interact with the agent graph. - LangGraph Orchestrator: Vidur, powered by Gemini 2.5 Pro, acts as the central supervisor — delegating tasks to five specialized sub-agents:
Task Agent,Schedule Agent,Knowledge Agent,Lifestyle Agent, andConcierge Agent. - MCP Server: Implements the standardized Model Context Protocol using Anthropic's SDK. Tools for managing tasks, calendar events, notes, shopping lists, routines, and user profiles are exposed over
stdio. - SQLite Database: Persists all data changes made by the AI.
- Google GenAI: Models (
gemini-2.5-flashfor workers,gemini-2.5-profor Vidur) power the system's reasoning capabilities.
All agents embody the persona of Vidur — speaking with the same wisdom, courtesy, and sense of duty as the minister from the Mahabharata.
| Agent | Responsibilities |
|---|---|
| 🗂️ Task Agent | Create and retrieve tasks |
| 📅 Schedule Agent | Create and retrieve calendar events |
| 📝 Knowledge Agent | Manage notes and save/retrieve user profile (name & gender) |
| 🛒 Lifestyle Agent | Manage shopping list, daily routines, and fetch morning news via live internet search |
| Look up flights, suggest recipes, provide live weather forecasts, and fetch stock market or financial updates via live internet search |
- Multi-Step Workflows: The system can execute complex goal-oriented requests (e.g., "Look up this note, create an event based on it, and remind me with a task").
- Dynamic Tool Loading: Tools are not hardcoded into the agent logic; they are dynamically loaded from the external MCP server.
- Live Internet Search: The Lifestyle and Concierge agents use Gemini's native Google Search grounding to fetch real-time data like weather, news, flights, recipes, and market updates.
- User Profile Memory: The system remembers the user's name and gender across the conversation for a personalized experience.
- Intelligent Routing: Vidur intelligently routes every request to the correct agent based on explicit routing rules, and chains agents together for complex multi-step tasks.
- Light & Dark Mode: The frontend UI includes a theme toggle, allowing users to switch between light and dark mode for a comfortable viewing experience in any environment.
- Copy
.env.exampleto.envand insert your Gemini API Key (GOOGLE_API_KEY). - Install requirements:
pip install -r requirements.txt - Run the application:
uvicorn main:app --reload - Post to the endpoint:
http://localhost:8000/chatwith JSON body{"message": "Add a task to practice my pitch."}
This project is packaged with a Dockerfile and is fully compatible with Google Cloud Run.
gcloud run deploy multi-agent-api --source . --region asia-south2