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.
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 |
- Python 3.10+
- Google AI Studio API key (free)
- Tavily API key (free tier available)
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 .envWeb UI (recommended) — starts the API server and opens the chat interface in your browser:
python start.pyTerminal interface:
python main.pySingle agent (simpler, no supervisor):
cd single_agent
python main.pyPOST /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.
pytest tests/ -vTests 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├── 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