An intelligent, multi-agent knowledge system that combines LLMs with web research and RAG. Built with LangGraph — queries flow through a Supervisor → Classifier → Research → Knowledge Base → Answer pipeline.
User Query
│
▼
┌────────────────┐
│ SUPERVISOR │ Decides: direct answer or research needed
└──────┬─────────┘
│
▼ (if research)
┌────────────────┐
│ CLASSIFIER │ Routes query to domain: software, school, job_prep, general, math, non_tech
└──────┬─────────┘
│
▼
┌────────────────┐
│ RESEARCH │ Web search (Tavily), Arxiv, coding sources, finance news
└──────┬─────────┘
│
▼
┌────────────────┐
│ KNOWLEDGE BASE│ Stores research → Qdrant vector DB → retrieves relevant docs
└──────┬─────────┘
│
▼
┌────────────────┐
│ SUPERVISOR │ Final answer with RAG context
└──────┬─────────┘
│
▼
Final Answer
- Multi-agent graph pipeline — LangGraph orchestrates 4 specialized nodes
- Structured LLM routing — Classifier uses structured output for domain prediction
- Web research tools — Tavily search, Arxiv papers, coding sources, finance news
- RAG with Qdrant — Research data is chunked, embedded (AWS Bedrock Titan), and stored for retrieval
- Gradio chat UI — Step-by-step visualization of the pipeline
- CLI interface — Simple interactive REPL for terminal use
- Python 3.14+
- Groq API key (LLM )
- Tavily API key (web search)
- News API key (finance/news tool)
- AWS credentials (Bedrock Titan embeddings)
git clone https://github.com/arpanchakraborty23/Agentic-Knowledge-System.git
cd Agentic-Knowledge-System
cp .env.example .env
# Edit .env with your API keys
uv syncuv run python main.pyuv run python ui.pyOpens a browser at http://localhost:7860. Each pipeline step streams in as it completes.
from src.agents.agent import GraphAgent
agent = GraphAgent()
response = agent.invoke(user_id="user_001", query="What is quantum computing?")
print(response.get("supervisor_answer"))├── src/
│ ├── agents/agent.py # GraphAgent, GraphBuilder
│ ├── nodes/ # Supervisor, Classifier, Research, Knowledge
│ ├── tools/ # Research tools (web, arxiv, code, finance) + RAG tool
│ ├── prompts/ # LangChain prompt templates
│ ├── rag/ # DataParser, TextChunker, VectorStoreManager
│ ├── constants/ # GraphState, config, schemas
│ └── utils/ # Logger, LLM chain helper, URL fetcher
├── main.py # CLI entry point
├── ui.py # Gradio web interface
├── pyproject.toml
└── qdrant_data/ # Persistent vector store
| Variable | Description |
|---|---|
GROQ_API_KEY |
LLM provider (llama-3.3-70b-versatile) |
TAVILY_API_KEY |
Web search |
NEWS_API_KEY |
Finance/market news |
AWS_ACCESS_KEY_ID |
Bedrock embeddings |
AWS_SECRET_ACCESS_KEY |
Bedrock embeddings |
AWS_REGION |
AWS region (e.g. us-east-1) |
RAG_CHUNK_SIZE |
Doc chunk size (default: 1000) |
RAG_TTL_DAYS |
Vector store TTL (default: 10) |
- LangChain + LangGraph — agent graph orchestration
- Groq — LLM inference (
llama-3.3-70b-versatile) - AWS Bedrock — embeddings (
titan-embed-text-v2) - Qdrant — vector database
- Tavily — web search API
- Gradio — web UI
- Playwright — URL content extraction