This project is a lightweight code-aware agent that can answer questions about a repository.
It enables natural language querying over a local codebase and retrieves relevant code snippets to support answers.**
The end goal is to add functionality till an orchestration pattern is required. I want to know the most an AI agent can do within the bounds of good design practises.
RAG-powered Agentic AI system that combines:
- Semantic code retrieval
- LLM reasoning loop
- Tool-based execution
to create an interactive AI assistant for repositories.
Code is embedded into a vector store using FAISS.
Currently, the codebase must be manually indexed before running the agent.
- Code is converted into embeddings and stored
- A retriever fetches relevant chunks based on semantic similarity
- The LLM uses retrieved context to generate grounded answers
The system uses an agent loop based on the ReAct pattern:
Thought → Action → Action Input → Observation → Final Answer
search_codebase(query)→ retrieves relevant code snippets
The agent dynamically decides:
- when to search the codebase
- what query to use
User Query
↓
Agent (ReAct loop)
↓
Tool Layer (search_codebase)
↓
Retriever (Vector DB)
↓
Embedded Codebase (FAISS)
- User asks a question
- Agent analyzes the query (Thought step)
- Agent calls
search_codebase - Retriever fetches relevant code chunks
- Agent receives observations
- Agent generates final answer
- LangChain
- Google Gemini (
ChatGoogleGenerativeAI) - FAISS (Vector Store for embeddings)
- Python
unittest(testing) - LangSmith (prompt management)
This project is a modular AI system combining:
- Retrieval (RAG)
- Reasoning (Agent loop)
- Execution (Tools)
to build a practical AI-powered code assistant.
- Switch to tool-calling agent (more stable than ReAct)
Better chunking strategy, say, AST (Abstract Syntax Tree), maybe a code graphEnable hybrid retrieval combining semantic search (embeddings) and keyword search (function names, variables)- Add some kind of memory to allow the agent to remember stuff.
- Add support for querying remote repositories (e.g., GitHub)
- Evaluation - define metrics
- Packaging
- CI/CD
- Add support for more file formats. Currently only .py is supported. Single-loader to a multi-loader approach