A tool that answers questions about a codebase using RAG (Retrieval-Augmented Generation). This is nothing fancy. Its just my attempt to understand how I can build a coding agent.
- Loader (
loader.py) — Recursively walks a repo and reads all text files - Chunker (
chunker.py) — Splits file contents into overlapping chunks - Indexer (
indexer.py) — Embeds chunks using OpenAI and stores them in ChromaDB - Retriever (
retriever.py) — Finds the most relevant chunks for a given query - Answer (
answer.py) — Sends retrieved chunks + query to an LLM and returns the answer
uv syncSet your OpenAI API key in a .env file:
OPENAI_API_KEY=your-key-here
uv run main.pyEdit answer.py (or main.py) to point at your repo and set your query.