Skip to content

Pokemon455/langgraph-multi-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– LangGraph Multi-Agent Chatbot

Python LangGraph LangChain FastMCP License Status

A production-grade Multi-Agent AI Chatbot built with LangGraph β€” featuring intelligent routing, RAG pipeline, real-time web search, Python code execution via MCP, and persistent memory backed by PostgreSQL.

⭐ Star this repo if it helps you!


✨ Features

Feature Description
πŸ”€ Smart Router Classifies every query and sends it to the right agent automatically
🐍 Python Executor Runs Python code in real-time via a remote FastMCP server
πŸ” Web Search Google search with full page content extraction (Apify)
πŸ“„ RAG Pipeline Document Q&A using Pinecone Vector DB + BM25 hybrid retrieval
🧠 Persistent Memory Multi-thread conversation memory backed by PostgreSQL (Neon)
πŸ“Š Observability Full tracing via LangSmith
🌐 Bilingual Responds in Roman Urdu or English based on user language

πŸ—οΈ Architecture

User Query
    β”‚
    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ router_node β”‚  Classifies β†’ python_tool / web_search / rag / direct
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚
  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β–Ό               β–Ό              β–Ό
python_tool    web_search      rag
(FastMCP)      (Apify)      (Pinecone)
       β”‚
       β–Ό
  answer_node β†’ END

πŸ“ Project Structure

β”œβ”€β”€ langgraph_agent.py   # Main agent β€” graph, nodes, tools
β”œβ”€β”€ config.py            # All settings loaded from .env
β”œβ”€β”€ requirements.txt     # Dependencies
β”œβ”€β”€ .env.example         # Environment variables template
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ architecture.md  # Deep-dive architecture docs
β”‚   └── api_reference.md # API reference
β”œβ”€β”€ tests/
β”‚   └── test_agent.py    # pytest test suite
└── README.md

πŸš€ Quick Start

1. Clone & install

git clone https://github.com/Pokemon455/langgraph-multi-agent.git
cd langgraph-multi-agent
pip install -r requirements.txt

2. Set up environment

cp .env.example .env
# Open .env and fill in your API keys

3. Run

import asyncio
from langgraph_agent import build_and_run

result = asyncio.run(build_and_run("python version check karo", thread_id="1"))
print(result)

πŸ”§ Required Environment Variables

Variable Description Get it from
NVIDIA_API_KEY LLM inference build.nvidia.com
PINECONE_API_KEY Vector database pinecone.io
DATABASE_URL PostgreSQL memory neon.tech
APIFY_API_TOKEN Web search apify.com
LANGCHAIN_API_KEY Tracing (optional) smith.langchain.com
MCP_SERVER_URL FastMCP Python REPL fastmcp-python-repl-server

πŸ”— Related Projects


🀝 Contributing

Contributions, issues and feature requests are welcome! See CONTRIBUTING.md for guidelines.


πŸ“„ License

MIT Β© Arbaz

About

πŸ€– Production-grade Multi-Agent AI Chatbot β€” LangGraph + RAG + Web Search + Python Execution via MCP | Built with LangChain, Pinecone & FastMCP

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages