Loading repository data…
Loading repository data…
JayanthSrinivas06 / repository
An intelligent conversational AI agent for AutoStream, a SaaS platform for automated video editing. This agent demonstrates production-ready GenAI capabilities including intent classification, RAG-powered knowledge retrieval, and intelligent lead capture with advanced token optimization.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
An intelligent conversational AI agent for AutoStream, a SaaS platform for automated video editing. This agent demonstrates production-ready GenAI capabilities including intent classification, RAG-powered knowledge retrieval, and intelligent lead capture with advanced token optimization.
This project implements a stateful conversational agent that:
LangGraph provides:
class AgentState(TypedDict):
messages: List # Conversation history (optimized to last 4 messages)
intent: str # Current intent (greeting/inquiry/high_intent_lead)
user_name: str # Collected name
user_email: str # Collected email
user_platform: str # Creator platform (YouTube, Instagram, etc.)
lead_captured: bool # Lead capture status
context: str # RAG-retrieved context
User Message → Intent Classification → Route by Intent
↓
┌─────────────────┼─────────────────┐
↓ ↓ ↓
Greeting Inquiry High Intent
↓ ↓ ↓
Respond RAG Retrieval Extract Info
↓ ↓ ↓
END Respond All Data Collected?
↓ ↓
END Lead Capture → Respond → END
SocioLead/
├── api/
│ ├── chat.py # FastAPI endpoint (Vercel serverless)
│ └── requirements.txt # Python dependencies for Vercel
├── src/
│ ├── agent/
│ │ ├── graph.py # LangGraph workflow definition
│ │ ├── nodes.py # Processing nodes with optimized prompts
│ │ └── state.py # State schema
│ ├── rag/
│ │ ├── knowledge_base.json # AutoStream product data
│ │ └── retriever.py # FAISS-based RAG pipeline
│ ├── tools/
│ │ └── lead_capture.py # Lead capture tool
│ └── utils/
│ ├── intent.py # Intent classification with keyword detection
│ └── checkpointer.py # State persistence utility (optional)
├── frontend/
│ ├── index.html # Tech-themed chat interface
│ ├── style.css # Black/grey/white gradient design
│ └── script.js # Frontend logic with markdown support
├── .env # Environment variables (gitignored)
├── .gitignore # Git ignore rules
├── vercel.json # Vercel deployment configuration
└── README.md
The agent first classifies user intent using a two-stage approach:
Stage 1: Keyword Detection
Stage 2: LLM Classification
For product inquiries:
When high intent is detected:
Before Optimization:
After Optimization:
Conversation History Reduction
Prompt Compression
Smart Keyword Detection
Optimized Intent Classification
All AI responses are rendered with markdown for better readability.
Install Dependencies
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
Configure Environment
# Create .env file
GEMINI_API_KEY=your_api_key_here
GEMINI_MODEL=gemini-2.5-flash-lite
Run Server
uvicorn api.chat:app --reload --host 0.0.0.0 --port 8000
Open Frontend
frontend/index.html in browserfastapi==0.124.4
uvicorn==0.33.0
pydantic==2.10.6
python-dotenv==1.0.0
langchain>=0.3.0
langchain-community>=0.3.0
langchain-core>=0.3.15
langchain-text-splitters>=0.3.0
langgraph>=0.2.0
langchain-google-genai>=2.0.0
faiss-cpu>=1.9.0
sentence-transformers>=2.6.0
Built as part of the ServiceHive Inflx Machine Learning Internship assignment.
Built with ❤️ using LangGraph, Google Gemini, and FastAPI