Skip to content

About

A tool that answers questions about a codebase using RAG (Retrieval-Augmented Generation).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

coding-agent

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.

How it works

  1. Loader (loader.py) — Recursively walks a repo and reads all text files
  2. Chunker (chunker.py) — Splits file contents into overlapping chunks
  3. Indexer (indexer.py) — Embeds chunks using OpenAI and stores them in ChromaDB
  4. Retriever (retriever.py) — Finds the most relevant chunks for a given query
  5. Answer (answer.py) — Sends retrieved chunks + query to an LLM and returns the answer

Setup

uv sync

Set your OpenAI API key in a .env file:

OPENAI_API_KEY=your-key-here

Usage

uv run main.py

Edit answer.py (or main.py) to point at your repo and set your query.

About

A tool that answers questions about a codebase using RAG (Retrieval-Augmented Generation).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages