Skip to content

Saurav-kumar077/LangGraph-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 LangGraph Chatbot

AI-powered conversational agent built using LangGraph, FastAPI, and a multi-tool agent system capable of performing PDF search and mathematical calculations.

This project demonstrates how to build a production-ready agent workflow using LangGraph, integrate custom tools, and expose the assistant through a clean FastAPI backend.


🔥 Features

  • LangGraph-based Agent Workflow
    Fully modular and deterministic agent pipeline built using LangGraph StateGraph.

  • Multi-Tool Agent

    • 🔍 PDF Search Tool — Extracts & summarizes content from PDF documents
    • Math/Calculator Tool — Solves arithmetic expressions
    • 💬 LLM Default Tool — Used when no tool matches
  • FastAPI Backend (/chat endpoint)

  • Duplicate Response Handling

  • Clean Code Structure


🧠 Architecture Overview

User Message
↓
LangGraph StateGraph
↓
Tool Router
├── PDF Search Tool
├── Calculator Tool
└── LLM Tool (default)
↓
Final Aggregated Response
↓
FastAPI Response → User

📁 Project Structure

LangGraph-Chatbot/
├── Chatbot/
│ └── chatbot.py # LangGraph workflow, tools, routing logic
├── chatbot_api.py # FastAPI API for chatbot
├── requirements.txt # Dependencies
├── pyproject.toml # Project metadata
├── README.md # Documentation
├── .gitignore # Ignored files
└── uv.lock # Dependency lock file

⚙️ Installation & Setup

1️⃣ Clone Repository

git clone https://github.com/Saurav-kumar077/LangGraph-Chatbot.git
cd LangGraph-Chatbot

2️⃣ Create Virtual Environment

python -m venv .venv

3️⃣ Activate Environment

Windows:

.\.venv\Scripts\Activate.ps1

4️⃣ Install Dependencies

pip install -r requirements.txt

🛠️ Tech Stack

  • Python 3.12+
  • LangGraph (modular agent workflows)
  • FastAPI (API server)
  • LangChain (tool integration)
  • Pydantic (validation)
  • Uvicorn (ASGI server)

👨‍💻 Author

Saurav Kumar
AI & Mobile Developer
GitHub: https://github.com/Saurav-kumar077

About

Multi-tool agentic chatbot with PDF search, calculator, and LLM routing built with LangGraph StateGraph and FastAPI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages