Ask questions about any GitHub repository. Get answers with source citations.
Paste a GitHub URL. Ask "How does auth work?" or "Where is rate limiting implemented?" — RepoMind's agent retrieves relevant code chunks, checks if it has enough context, retrieves again if not, and answers with the file and chunk it used.
You land on an unfamiliar codebase. There's no doc, or the doc is stale. Reading through it manually takes hours. Grep doesn't understand context. ChatGPT hallucinates file structures that don't exist.
Developers need a way to query code the way they query databases.
- Paste any public GitHub repo URL
- RepoMind clones it, chunks the code, and embeds it into a vector store (Qdrant)
- A LangGraph agent receives your question, retrieves relevant chunks, assesses whether the context is sufficient, retrieves again with a refined query if not, then answers
- Every answer includes file name + chunk citations — grounded in what was actually retrieved, not hallucinated
User Query
│
▼
LangGraph Agent
│
├── Retrieve Node → Qdrant vector search
│ │
│ └── Assess: enough context? ──No──► Refine query, re-retrieve (max 2 retries)
│ │
│ Yes
│ │
▼ ▼
└──────────── Answer Node → Response + Citations
Ingestion Pipeline:
GitHub URL
│
▼
POST /ingest → job queued (BullMQ + Redis)
│
▼
Worker: git clone (simple-git, temp dir)
│
▼
Chunk files (~1000 chars, 200 char overlap)
- Attaches metadata: filename, filepath, chunkIndex
│
▼
Gemini embeddings → Qdrant
Ingestion runs as a background job, not inline in the HTTP request — cloning and embedding a repo can take well over a request's reasonable timeout, so the API just queues the job and returns immediately.
| Layer | Technology |
|---|---|
| Agent | LangGraph.js |
| RAG | LangChain.js |
| Vector Store | Qdrant |
| Job Queue | BullMQ + Redis |
| Backend | Node.js + Express |
| Frontend | React (Vite) + Tailwind |
| Embeddings + LLM | Google Gemini |
A single retrieve → answer chain fails when the first retrieval pass doesn't surface enough context.
RepoMind's agent assesses the retrieved chunks against the question, and if the LLM judges the context insufficient, it generates a refined query and retrieves again — up to 2 retries — before committing to an answer. This is a conditional graph with a loop, not a linear chain.
repomind/
├── backend/
│ ├── src/
│ │ ├── agent/
│ │ │ ├── graph.ts # LangGraph StateGraph definition
│ │ │ ├── state.ts # Graph state type
│ │ │ ├── nodes/
│ │ │ │ ├── retrieve.ts # Vector search node
│ │ │ │ ├── assess.ts # Context sufficiency check + query refinement
│ │ │ │ └── answer.ts # Final answer generation with citations
│ │ ├── ingestion/
│ │ │ ├── clone.ts # GitHub repo cloning (simple-git)
│ │ │ ├── chunker.ts # Chunking logic
│ │ │ └── embed.ts # Embedding + Qdrant insert
│ │ ├── queue/
│ │ │ ├── producer.ts # Adds ingestion job to BullMQ
│ │ │ └── worker.ts # Processes ingestion jobs
│ │ └── routes/
│ │ ├── ingest.ts # POST /ingest
│ │ └── query.ts # POST /query
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── RepoInput.tsx
│ │ │ ├── ChatWindow.tsx
│ │ │ └── CitationCard.tsx
│ │ └── App.tsx
└── README.md
# Clone
git clone https://github.com/SrishtiDev/RepoMind
cd RepoMind
# Start Qdrant + Redis
cd backend
docker-compose up -d
# Backend
cp .env.example .env # Add GOOGLE_API_KEY
npm install
npm run dev
# Frontend
cd ../frontend
npm install
npm run devEnvironment variables:
GOOGLE_API_KEY=
QDRANT_URL=http://localhost:6333
REDIS_HOST=localhost
REDIS_PORT=6379
PORT=3000
- Chunking is character-based, not AST-aware — a function can currently be split mid-body. Moving to tree-sitter-based chunking is the next major improvement.
- Citations reference filename + chunk index, not exact line numbers.
- Only public repos are supported (no GitHub OAuth for private repos).
- No persistent job status polling on the frontend yet — ingestion status isn't live-tracked.
Being upfront about these because they're the honest state of the project, and they're also the most interesting things to talk about in an interview — they're deliberate engineering tradeoffs, not oversights.
- AST-aware chunking via tree-sitter (function/class-boundary chunks, line-number citations)
- Job status polling on frontend
- Support private repos via GitHub OAuth
- Persistent repo index (skip re-ingestion on revisit)
- PR diff mode — "what changed in this PR and why"
RepoMind includes an MCP (Model Context Protocol) server to allow AI agents like Claude Code, Cursor, or Zed to directly ingest and query GitHub repositories locally.
cd repomind-mcp
npm install
npm run buildMake sure the Express backend is running (localhost:3000) before the agent calls any tool.
{
"mcpServers": {
"repomind": {
"command": "node",
"args": ["/home/srishti-rawat/Projects/RepoMind/repomind-mcp/dist/index.js"],
"env": {
"REPOMIND_API_URL": "http://localhost:3000"
}
}
}
}{
"mcpServers": {
"repomind": {
"command": "node",
"args": ["/home/srishti-rawat/Projects/RepoMind/repomind-mcp/dist/index.js"],
"env": {
"REPOMIND_API_URL": "http://localhost:3000"
}
}
}
}{
"context_servers": {
"repomind": {
"command": {
"path": "node",
"args": ["/home/srishti-rawat/Projects/RepoMind/repomind-mcp/dist/index.js"],
"env": {
"REPOMIND_API_URL": "http://localhost:3000"
}
}
}
}
}repomind_ingest: Ingest a public GitHub repository. Call this once before querying.repomind_ask: Ask a question about an ingested repository. Returns answers with file/chunk citations.