AI-powered conversational backend built with FastAPI, LangGraph, Gemini, and Tavily Search.
StarDust provides an agentic chat experience capable of maintaining conversation history, performing web searches, and offering coding guidance through an integrated LeetCode coach tool.
- Streaming AI responses
- Multi-turn conversations
- Persistent chat memory
- Web Search via Tavily
- LeetCode AI Coach
- Gemini 2.5 Flash integration
- LangGraph-based agent workflow
- FastAPI backend
- Server-Sent Events (SSE) support
User Query ↓
FastAPI Endpoint
↓
LangGraph Agent
↓
Gemini 2.5 Flash
↓
Tool Calling
├── Tavily Search
└── LeetCode AI Coach
↓
Streaming Response
↓
Frontend
| Component | Technology |
|---|---|
| Backend | FastAPI |
| LLM | Gemini 2.5 Flash |
| Agent Framework | LangGraph |
| Search | Tavily API |
| Memory | LangGraph MemorySaver |
| Environment | python-dotenv |
| Streaming | SSE |
Clone repository
git clone https://github.com/yourusername/StarDust_Backend.git
cd StarDust_BackendInstall dependencies
pip install -r requirements.txtCreate a .env file.
GOOGLE_API_KEY=YOUR_KEY
TAVILY_API_KEY=YOUR_KEYuvicorn app:app --reloadServer runs at
http://localhost:8000
GET /Response
{
"status":"Backend running"
}GET /chat_stream/{message}Optional
checkpoint_id
Example
/chat_stream/Explain Binary Search
Returns streamed responses.
Allows the assistant to search the web.
Generates:
- Step-by-step approach
- Optimized solution
- Complexity analysis
- Edge cases
- Key insights
Example
Two Sum Problem
Output includes:
- Explanation
- Code
- Complexity
- Tips
Compatible with:
- Render
- Railway
- Fly.io
- Docker
A Render deployment configuration is included.
render.yaml
- RAG Integration
- Document Upload Support
- Voice Conversations
- Authentication
- Multiple LLM Providers
- Tool Marketplace
MIT License