Skip to content

About

Multi-agent AI system with LangGraph and Gemini — supervisor routes questions to web search, HR, and data specialist agents.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

LangGraph Agent System

A multi-agent AI system built with LangGraph and Google Gemini. A supervisor agent receives questions and routes them to the appropriate specialist — web search, company documents, or employee data analysis.

Architecture

User
  ↓
Supervisor (routes the question)
  ├── Research Agent  → web search via Tavily
  ├── HR Agent        → company FAQ (RAG over sample_doc.txt)
  └── Data Agent      → employee data analysis (Pandas over employees.csv)

The project contains two implementations:

Folder Description
single_agent/ A single agent with all tools combined — good starting point
agent/ Full supervisor + specialist architecture — production-style

Requirements

Setup

python -m venv venv

# Windows
venv\Scripts\activate
# Mac/Linux
source venv/bin/activate

pip install -r requirements.txt

# Windows
copy .env.example .env
# Mac/Linux
cp .env.example .env

# Fill in your API keys in .env

Running

Web UI (recommended) — starts the API server and opens the chat interface in your browser:

python start.py

Terminal interface:

python main.py

Single agent (simpler, no supervisor):

cd single_agent
python main.py

API

POST /chat

{
  "session_id": "your-session-name",
  "message": "your question"
}

Response:

{
  "session_id": "your-session-name",
  "response": "agent answer"
}

Sessions are persistent — use the same session_id to continue a conversation across restarts.

Tests

pytest tests/ -v

Tests cover memory persistence and API validation. Live LLM tests are excluded by default as they make real API calls. To run them:

pytest -m live

Project Structure

├── start.py              — launch server + open browser
├── api.py                — FastAPI REST API
├── main.py               — terminal interface
├── chat.html             — web chat interface
├── sample_doc.txt        — company FAQ (used by HR agent)
├── employees.csv         — employee dataset (used by data agent)
├── agent/
│   ├── supervisor.py     — routes questions to specialists
│   ├── research_agent.py — web search specialist
│   ├── hr_agent.py       — company document specialist
│   ├── data_agent.py     — data analysis specialist
│   ├── retriever.py      — FAISS vector store for RAG
│   ├── analyst.py        — Pandas agent builder
│   └── memory_manager.py — hybrid RAM + SQLite memory
├── single_agent/
│   ├── main.py           — entry point
│   └── agent/
│       ├── graph.py      — agent definition
│       ├── tools.py      — all tools in one place
│       ├── retriever.py  — vector store
│       └── analyst.py    — Pandas agent
└── tests/
    ├── test_api.py       — API endpoint tests
    └── test_memory.py    — memory persistence tests

About

Multi-agent AI system with LangGraph and Gemini — supervisor routes questions to web search, HR, and data specialist agents.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages