MCP ExplorerExplorer

Research Assistant Using Langgraph Mcp

@mhnavidon 10 months ago
1 MIT
FreeCommunity
AI Systems
AI Research Assistant demo using LangChain, LangGraph, LangSmith, RAG and MCP (Model Context Protocol)

Overview

What is Research Assistant Using Langgraph Mcp

research-assistant-using-langgraph-mcp is an AI-powered research assistant that utilizes LangChain, LangGraph, LangSmith, RAG, and the Model Context Protocol (MCP) to break down research topics into subtopics, assign tasks to agents, summarize findings, and compile comprehensive reports.

Use cases

Use cases include breaking down complex research topics into manageable subtopics, gathering and summarizing information from various sources, generating structured reports, and facilitating collaborative research efforts.

How to use

To use research-assistant-using-langgraph-mcp, first create and activate a virtual environment. Then, set up the project either by using the Makefile or by installing the required Python dependencies directly. After setup, you can run the project to start utilizing the research assistant functionalities.

Key features

Key features include graph-based agent orchestration with LangGraph, reproducible tracing with LangSmith, modular agent design for various research tasks (including Planner, Researcher, and Summarizer agents), caching responses with SQLite, contextual document retrieval using RAG and ChromaDB, and prompt/context management with MCP.

Where to use

research-assistant-using-langgraph-mcp can be used in academic research, corporate research and development, content creation, and any field that requires systematic information gathering and reporting.

Content

AI Research Assistant using LangChain, LangGraph, LangSmith, RAG and MCP (Model Context Protocol)

Project Description

A research assistant that breaks a topic into subtopics, assigns research to agents, summarizes findings, and compiles a report.

Features

  • Graph-based agent orchestration with LangGraph
  • Reproducible tracing with LangSmith
  • Modular agent design for research tasks
    • Planner Agent: Breaks the topic into subtopics.
    • Researcher Agent: Gathers info for each subtopic.
    • Summarizer Agent: Summarizes and organizes into a report.
  • Cache agent responses using SQLite
  • Contextual document retrieval using RAG and ChromaDB
  • Prompt & context management using MCP

Project Structure

.
├── agents/               # LLM agents (e.g. researcher, reviewer)
├── config/               # Configurations
├── db/                   # SQLite store
├── graphs/               # LangGraph workflow 
├── mcp/                  # Model Context Protocol (MCP) implementation
├── nodes/                # LangGraph nodes
│     └── conditions      # nodes conditions
├── rag/                  # RAG (retrieval-augmented generation) logic
├── state/                # Shared state classes for LangGraph workflows
├── tests/                # LangGraph test
├── .env.example          # Sample environment variables
├── .gitignore            
├── Makefile              # Task runner
├── requirements.txt      # Python dependencies
└── README.md             

Requirements

  • Python=3.11.11
  • Virtual environment (recommended)
  • make (optional)

To run the project

Step 1:

Create and activate a virtual environment (recommended)

python -m venv .venv
source .venv/bin/activate     
# On Windows: .venv\Scripts\activate 

Step 2:

Option 1: Using Makefile

make setup

Option 2: Without Makefile

pip install -r requirements.txt

Step 3:

Copy the .env.example file and rename the file to .env

Step 4:

Add API keys to .env.

Key Description Link to Get Key
TOGETHER_API_KEY Used for Together AI model access together
LANGCHAIN_API_KEY Used for LangSmith tracing/debugging langsmith
SEARCHAPI_API_KEY Used for search results in RAG searchapi

Usage

Step 1:

To run the MCP development server

Option 1: Using Makefile

make run-mcp

Option 2: Without Makefile

mcp dev mcp/server.py

Step 2:

  • Visit http://localhost:5173 to the browser.
  • Change the Command to python
  • Change Arguments to mcp/server.py
  • Click to Connect and wait for connection
  • After establishing the connection, click Tools -> List Tools -> research
  • Then write the research topic and Run Tool

To Test Graph Workflow

make test-graph # with make
python tests/test_graph.py # without make

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers