Skip to content

Repository files navigation

Multi-Agent MCP Orchestrator

An enterprise-grade AI orchestration platform that coordinates multiple specialized agents using LangGraph and the Model Context Protocol (MCP). The system enables Large Language Models (LLMs) to securely interact with enterprise tools, cloud services, local files, and knowledge bases through intelligent task routing and Retrieval-Augmented Generation (RAG).


Features

  • Multi-agent orchestration using LangGraph
  • Intelligent supervisor agent for dynamic task routing
  • Retrieval-Augmented Generation (RAG) with Pinecone and LlamaParse
  • Self-healing vector knowledge base
  • Google Workspace integration (Google Docs & Google Sheets)
  • Todoist task management
  • Notion document retrieval
  • Local filesystem access
  • DuckDuckGo web search
  • Stateful multi-step workflows
  • Dockerized deployment
  • Modular MCP server architecture

Tech Stack

Category Technologies
Language Python
Backend FastAPI
AI Framework LangGraph
LLM Gemini
Protocol Model Context Protocol (MCP)
Vector Database Pinecone
Document Parsing LlamaParse
Database PostgreSQL
Cloud APIs Google Workspace REST API
Integrations Todoist, Notion, DuckDuckGo
Deployment Docker
Package Manager uv

Architecture

                     User
                       │
                       ▼
              Supervisor Agent
                 (LangGraph)
                       │
      ┌────────────────┼────────────────┐
      ▼                ▼                ▼
 Workspace Agent    RAG Agent    Productivity Agent
      │                │                │
 Google APIs      Pinecone        Todoist
                  LlamaParse      Notion
                       │
                Local Filesystem

Key Components

1. Supervisor Agent

The Supervisor Agent acts as the central orchestrator responsible for coordinating all specialized agents.

Responsibilities

  • Dynamically routes requests using LangGraph
  • Maintains conversation state through GraphState
  • Executes multi-step workflows across multiple MCP servers
  • Injects system prompts without modifying user queries
  • Coordinates tool execution between isolated services

2. RAG Knowledge Vault

The Retrieval-Augmented Generation system provides semantic search over enterprise documents.

Features

  • Pinecone Hybrid Search
  • LlamaParse document extraction
  • Semantic retrieval
  • Context-aware response generation
  • Automatic document updates

Self-Healing Index

To prevent duplicate vectors during document updates, the ingestion pipeline removes existing embeddings associated with a document before re-indexing using metadata filtering.

This ensures:

  • No duplicate vectors
  • Consistent search quality
  • Clean knowledge base
  • Efficient storage utilization

3. Google Workspace Agent

A custom MCP server built directly on Google Workspace REST APIs for advanced document automation.

Capabilities

  • Create Google Documents
  • Append content to existing documents
  • Create Google Sheets
  • Insert and update spreadsheet data
  • Matrix-based row appending
  • USER_ENTERED value parsing
  • Dynamic document index calculation

4. Cross-Platform Integrations

The orchestrator enables seamless interaction across multiple enterprise services.

Integrated Services

  • Google Docs
  • Google Sheets
  • Todoist
  • Notion
  • DuckDuckGo Search
  • Local Filesystem

Each integration runs as an isolated MCP server while the Supervisor Agent intelligently coordinates communication between them.


Workflow

User Prompt
      │
      ▼
Supervisor Agent
      │
      ▼
Intent Analysis
      │
      ▼
Select Required Agent(s)
      │
      ▼
Execute MCP Tools
      │
      ▼
Retrieve Context (if required)
      │
      ▼
Aggregate Results
      │
      ▼
Generate Final Response

Project Structure

.
├── agents/
├── prompts/
├── servers/
├── utils/
├── graph.py
├── supervisor.py
├── ragsystem.py
├── workspace_custom.py
├── requirements.txt
├── docker-compose.yml
└── README.md

Installation

Clone Repository

git clone https://github.com/yourusername/multi-agentic-workflow.git

cd multi-agentic-workflow

Create Virtual Environment

uv venv

Install Dependencies

uv pip install -r requirements.txt

Configure Environment Variables

Create a .env file and add the required API keys.

GEMINI_API_KEY=your_key
PINECONE_API_KEY=your_key
GOOGLE_CLIENT_ID=your_key
GOOGLE_CLIENT_SECRET=your_key
TODOIST_API_TOKEN=your_key
NOTION_API_KEY=your_key

Run the Application

python main.py

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages