ChemIntelliGraph introduces an Agentic Retrieval-Augmented Generation (RAG) framework for Chemistry that integrates multiple specialized AI agents—retrieval, reasoning, synthesis, and validation—coordinated using LangGraph.
The system builds on the Chemixtry RAG Lab concept but evolves it into a multi-agent cognitive architecture, enabling autonomous retrieval, fact-checking, and scientific reasoning using both structured and unstructured chemical data.
ChemIntelliGraph represents a next-generation evolution of the Chemistry RAG Lab — integrating agentic intelligence and graph-based orchestration to simulate multi-step scientific reasoning.
The system uses LangGraph to coordinate autonomous retrieval, reaction reasoning, validation, and visualization agents.
By fusing vector-based semantic retrieval with dynamic inter-agent communication, the framework provides an explainable and modular foundation for AI-augmented chemical experimentation and educational simulations.

1️⃣ System Architecture
ChemIntelliGraph is composed of four main agents, each with a specialized role coordinated through LangGraph:

The LangGraph controller ensures stateful, explainable agent coordination — allowing complex tasks (e.g., reaction prediction + context explanation) to unfold as a conversation between agents.
2️⃣ Knowledge Base
ChemIntelliGraph uses the same verified .txt data sources from Chemixtry Lab, expanded with relation triples for graph construction:
3️⃣ Agentic RAG Workflow
4️⃣ Prompt Engineering
Factual mode – Only uses retrieved knowledge + graph data.
If information missing → respond with “No known reaction found.”
Allows generative reasoning, e.g., conceptual analogies or reaction predictions, explicitly labeling inferred reasoning.
Technical Implementation → achieved via prompt templates and agent routing using LangGraph/LangChain.
if mode == "strict":
agent = StrictChemAgent(llm=groq_model, retriever=db)
else:
agent = CreativeChemAgent(llm=openai_model, retriever=db)
Impact: Offers dual interpretability — both correctness (for researchers) and creativity (for educators or students).
5️⃣ Agent Coordination (LangGraph Flow)
The multi-agent orchestration is built as a LangGraph graph flow, connecting each agent sequentially:
User → Retriever → Reasoner → Validator → Graph Agent → Response
Each node in the LangGraph represents a thinking step, ensuring:

Dual Reasoning Modes (Strict vs Creative)
ChemIntelliGraph introduces a bifurcated reasoning system with two operational modes:



Every user query passes through a Safety Checker pipeline that:

ChemIntelliGraph integrates a short-term conversational memory that allows continuity across turns:

git clone https://github.com/Blessy456b/chem_intelligraph.git
cd chem_intelligraph/src
python3 -m venv rag_lab_env1
source rag_lab_env1/bin/activate
pip install -r requirements.txt
When you start your backend server, you’ll want this environment variable available to any process (especially the Streamlit app).
This ensures the app can verify requests coming from your MCP server.
Run:
export MCP_SECRET="<YOUR_RANDOM_SECRET>"
Create .env:
GROQ_API_KEY=your_groq_key_here
SERPAPI_KEY=your_serpapi_key_here
MCP_SECRET=super_secret_mcp_key
MCP_BASE=http://127.0.0.1:8080/tool
If your project has a FastAPI server (say in mcp_server.py):
uvicorn mcp_server:app --host 127.0.0.1 --port 8080 --reload
streamlit run app_chemintelligraph.py
Once launched, open the local URL displayed in your terminal (e.g.,
http://localhost:8501 ) to interact with the assistant.
You’ll see:
Reduced hallucination rate via structured multi-agent verification.
Dynamic graph visualization of agentic relationships.
InMemory results cached
Better factual consistency than single-agent RAG system
ChemIntelliGraph advances explainable scientific reasoning by embedding agentic intelligence within the RAG framework.