How muralikrishna1729/codesage works
This is a repository-question-answering RAG assistant: users submit a repository for ingestion, then ask questions and receive answers with source citations or an explicit fallback. Ingestion clones the repository, extracts code chunks, embeds them, and stores them; chat routes questions through retrieval, evidence grading, and answer generation, using web search when appropriate. The README also describes repository-map context and sandboxed code execution, but the supplied tree has no code-execution or frontend modules, and the excerpts do not show repository-map wiring. Arrows reflect shown calls or documented relationships.
Main entry points: routes.py HTTP API · embed_store.py Embedding and retrieval · graph.py Workflow orchestration · nodes.py Routing and answer nodes
Components 17
API and entry
- HTTP API
app/api/routes.py
Repository ingestion
- Repository clone
app/ingestion/clone.py - Code chunking
app/ingestion/chunker.py - Repository map
app/ingestion/repo_map.py - Embedding and retrieval
app/ingestion/embed_store.py
Agent workflow
- Workflow orchestration
app/agent/graph.py - Agent state
app/agent/state.py - Routing and answer nodes
app/agent/nodes.py
Models and search
- Qdrant vector store
- Sentence Transformers
- LLM provider client
app/agent/llm_client.py - Runtime settings
app/config.py - Web search tool
app/tools/web_search.py
Other components
- User
- Groq, OpenRouter, Gemini
- Tavily and DuckDuckGo
- Answer and source
Connections 19
- User → HTTP API: submits request
app/api/routes.py - HTTP API → Repository clone: clones repository
app/api/routes.py - HTTP API → Code chunking: chunks repository
app/api/routes.py - HTTP API → Embedding and retrieval: stores chunks
app/api/routes.py - Embedding and retrieval → Sentence Transformers: encodes chunks
app/ingestion/embed_store.py - Embedding and retrieval → Qdrant vector store: writes and searches
app/ingestion/embed_store.py - HTTP API → Workflow orchestration: invokes chat workflow
app/api/routes.py - Workflow orchestration → Agent state: types workflow state
app/agent/graph.py - Workflow orchestration → Routing and answer nodes: dispatches workflow steps
app/agent/graph.py - Routing and answer nodes → Embedding and retrieval: retrieves code context
app/agent/nodes.py - Routing and answer nodes → LLM provider client: routes and generates
app/agent/nodes.py - Routing and answer nodes → Web search tool: searches web evidence
app/agent/nodes.py - LLM provider client → Runtime settings: reads provider settings
app/agent/llm_client.py - LLM provider client → Groq, OpenRouter, Gemini: calls providers
app/agent/llm_client.py - Web search tool → Runtime settings: reads search settings
app/tools/web_search.py - Web search tool → Tavily and DuckDuckGo: searches with fallback
app/tools/web_search.py - Workflow orchestration → Answer and source: returns final result
- User → Answer and source: receives response
- Repository map → Embedding and retrieval: adds structural retrieval context
README.md