Loading repository data…
Loading repository data…
praneethravuri / repository
NotStuck is an AI-powered knowledge base assistant designed to help you get by providing intelligent, context-aware answers derived from your own documents. Whether you're researching, studying, or managing projects, NotStuck makes it easy to upload documents, ask questions, and receive responses.
NotStuck is a production-ready, AI-powered RAG (Retrieval-Augmented Generation) system that helps you extract insights from your documents using cutting-edge AI models. Upload documents (PDF, DOCX, TXT), ask questions, and receive intelligent answers powered by CrewAI agents, vector search, and your choice of 10+ LLM models through OpenRouter.
Intelligent Multi-Agent RAG System: NotStuck combines CrewAI-powered intelligent routing, Pinecone vector search, streaming responses, and multi-model LLM support (GPT-4, Claude, Gemini, Llama, and more) to deliver highly accurate, context-aware answers. Agents automatically decide whether to use the knowledge base, search the web, or answer directly from their knowledge.
# 1. Clone the repository
git clone https://github.com/praneethravuri/notstuck.git
cd notstuck
# 2. Create backend/.env with your API keys
cat > backend/.env << EOF
OPENROUTER_API_KEY=your_openrouter_key
OPENAI_API_KEY=your_openai_key
PINECONE_API_KEY=your_pinecone_key
PINECONE_INDEX_NAME=notstuck-index
PINECONE_ENV=us-east-1
EMBEDDING_DIMENSION=1024
EOF
# 3. Start with Docker Compose
docker-compose up --build
# 4. Open http://localhost:3000
That's it! 🎉 Upload documents and start asking questions.
/docs┌─────────────────────────────────────────────────────────────┐
│ 1. DOCUMENT UPLOAD │
│ User uploads file → Frontend → Backend API → Temp storage │
│ Supported: PDF, DOCX, TXT │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ 2. DOCUMENT PROCESSING │
│ ├─ Text extraction (PyPDF, python-docx) │
│ ├─ Unicode & escape character cleaning │
│ ├─ Semantic chunking (1000 chars, 200 overlap) │
│ └─ Original filename preservation in metadata │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ 3. EMBEDDING GENERATION │
│ ├─ OpenAI text-embedding-3-large (1024 dims) │
│ ├─ Batch processing (100 vectors per batch) │
│ └─ Metadata: text, source_file, chunk_index │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ 4. PINECONE VECTOR STORAGE │
│ ├─ Upsert vectors with metadata │
│ ├─ Dotproduct metric │
│ ├─ 1024-dimensional vectors │
│ └─ Auto file cleanup after processing │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ 5. USER QUERY │
│ User asks question → Model selection → CrewAI Agent │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ 6. CREWAI AGENT ROUTING │
│ Agent analyzes question and decides: │
│ ├─ General knowledge? → Direct answer │
│ ├─ Document-related? → Pinecone Search Tool │
│ └─ Current info needed? → Web Search Tool │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ 7A. PINECONE SEARCH (if document query) │
│ ├─ Generate query embedding (1024 dims) │
│ ├─ Search Pinecone (top_k=5) │
│ ├─ Return context with source metadata │
│ └─ Agent constructs answer with citations │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ 7B. WEB SEARCH (if current info needed) │
│ ├─ DuckDuckGo search via BeautifulSoup │
│ ├─ Extract: Title, URL, Snippet │
│ ├─ Return formatted results with URLs │
│ └─ Agent constructs answer with web sources │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ 8. LLM GENERATION │
│ ├─ CrewAI calls OpenRouter with selected model │
│ ├─ Model: GPT-4o, Claude 3.5, Gemini, Llama, etc. │
│ ├─ Context: Knowledge base or web search results │
│ └─ Generate comprehensive answer │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ 9. STREAMING RESPONSE (SSE) │
│ ├─ Send sources first (document or web) │
│ ├─ Stream answer in chunks (50 chars each) │
│ ├─ Real-time display in frontend │
│ └─ Send completion signal when done │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ 10. FRONTEND DISPLAY │
│ ├─ Render streaming answer in real-time │
│ ├─ Display sources (documents or web URLs) │
│ └─ User sees complete answer with citations │
└─────────────────────────────────────────────────────────────┘
git clone https://github.com/praneethravuri/notstuck.git
cd notstuck
Create a backend/.env file with your API keys:
# OpenRouter Configuration (for LLM models)
OPENROUTER_API_KEY=your_openrouter_api_key_here
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
# OpenAI Configuration (for embeddings)
OPENAI_API_KEY=your_openai_api_key_here
# Pinecone Configuration
PINECONE_API_KEY=your_pinecone_api_key_here
PINECONE_ENV=us-east-1
PINECONE_INDEX_NAME=notstuck-index
# Model Configuration (optional - can be changed in UI)
DEFAULT_LLM_MODEL=openai/gpt-4o
DEFAULT_EMBEDDING_MODEL=text-embedding-3-large
EMBEDDING_DIMENSION=1024
Create a frontend/.env.local file:
NEXT_PUBLIC_BACKEND_URL=http://localhost:8000
Note: A
.env.examplefile is provided at the root for reference. Never commit your.envfiles.
The easiest way to run NotStuck is using Docker Compose:
# Build and start all services
docker-compose up --build
# Or run in detached mode
docker-compose up -d --build
# View logs
docker-compose logs -f
# Stop services
docker-compose down
What happens: