Skip to content

hitensj/multiagent-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vidur — Multi-Agent Productivity Assistant

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).

The Inspiration — Who is Vidur?

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.

Architecture

  1. FastAPI Backend: Provides a /chat endpoint for a frontend to interact with the agent graph.
  2. 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, and Concierge Agent.
  3. 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.
  4. SQLite Database: Persists all data changes made by the AI.
  5. Google GenAI: Models (gemini-2.5-flash for workers, gemini-2.5-pro for Vidur) power the system's reasoning capabilities.

Agent Roster

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
✈️ Concierge Agent Look up flights, suggest recipes, provide live weather forecasts, and fetch stock market or financial updates via live internet search

Features

  • 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.

How to run locally

  1. Copy .env.example to .env and insert your Gemini API Key (GOOGLE_API_KEY).
  2. Install requirements: pip install -r requirements.txt
  3. Run the application: uvicorn main:app --reload
  4. Post to the endpoint: http://localhost:8000/chat with JSON body {"message": "Add a task to practice my pitch."}

Deployment

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

About

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).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors