A multi-agent AI system for battery electrolyte design, powered by GPT-4.1 and RAG (Retrieval-Augmented Generation).
- Multi-Agent Architecture: Coordinated agents for literature search, property analysis, experiment planning, and performance prediction
- Chemistry-Agnostic: Supports Li-ion, Zn, Na-ion, Mg, and solid-state battery chemistries
- RAG-Powered Literature Search: Upload your own research papers (PDF, DOCX, TXT) for context-aware recommendations
- User-Specified Materials: Input custom electrolyte materials for tailored experiment plans
- Performance Prediction: LLM-based predictions for capacity retention, cycle life, and ionic conductivity
- Beautiful UI: Modern React frontend with dark theme and smooth animations
The frontend demo is available at: Vercel Deployment
⚠️ Note: The demo frontend is for UI demonstration only. The backend API requires local deployment.
- Python 3.12+
- Node.js 18+
- OpenAI API Key
cd backend
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
echo "OPENAI_API_KEY=your_api_key_here" > .env
# Run the server
uvicorn main:app --reload --port 8000cd frontend
# Install dependencies
npm install
# Run the development server
npm startThe frontend will be available at http://localhost:3000
┌─────────────────────────────────────────────────────────────────────────────────┐
│ ORCHESTRATOR AGENT │
│ (Query Classification & Routing) │
├─────────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Literature │ │ Property │ │ Experiment │ │ Performance │ │
│ │ RAG Agent │ │Compatibility│ │ Planning │ │ Prediction │ │
│ │ │ │ Agent │ │ Agent │ │ Agent │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ LLM Service (GPT-4.1) │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────────┘
battery_agent_demo/
├── backend/
│ ├── agents/
│ │ ├── orchestrator_agent.py # Main coordinator
│ │ ├── literature_rag_agent.py # RAG search
│ │ ├── property_compatibility_agent.py
│ │ ├── experiment_planning_agent.py
│ │ └── performance_prediction_agent.py
│ ├── services/
│ │ ├── llm_service.py # OpenAI integration
│ │ └── document_service.py # Document processing
│ ├── main.py # FastAPI app
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ ├── styles/
│ │ └── App.js
│ ├── package.json
│ └── vercel.json
└── README.md
| Endpoint | Method | Description |
|---|---|---|
/api/query |
POST | Process electrolyte design query |
/api/upload |
POST | Upload document (PDF, DOCX, TXT) |
/api/index |
POST | Index uploaded documents |
/api/documents |
GET | Get document status |
/api/health |
GET | Health check |
- "Design a high-voltage electrolyte for NMC cathode with silicon anode"
- "What additives improve cycle life for fast-charging applications?"
- "Design electrolyte for reversible zinc metal chemistry"
- "Sodium-ion battery electrolyte with good low-temperature performance"
- Backend: FastAPI, LangChain, ChromaDB, OpenAI
- Frontend: React, Framer Motion
- Embeddings: OpenAI text-embedding-3-large
- LLM: GPT-4.1
MIT License - feel free to use and modify for your research!
Kevin Wang - GitHub
- OpenAI for GPT-4.1 and embedding models
- LangChain for RAG infrastructure
- The battery research community for domain knowledge