Code RAG Agent
A production-ready Python service for intelligent code retrieval and question answering using RAG (Retrieval-Augmented Generation).
Author: Sandeep G Copyright: © 2025 Sandeep G License: Apache License 2.0
Features
- 🔍 Intelligent Code Search: Self-query retrieval with automatic metadata filtering
- 🧠 Smart Question Answering: Answers complex questions about your codebase
- 🔌 Pluggable Architecture: Swap LLM providers (OpenAI, Claude) and vector stores (Pinecone, Weaviate)
- ⚡ Production-Ready: Cost-efficient, fast, and reliable
Quick Start
Installation
From PyPI (Recommended)
pip install code-rag-agent
From Source
# Clone repository
git clone https://github.com/sandeepgovi/code-rag-agent
cd code-rag-agent
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in editable mode
pip install -e .
Configuration
# Copy environment template
cp .env.example .env
# Edit .env with your API keys
PINECONE_API_KEY=your-pinecone-api-key
PINECONE_INDEX_NAME=your-index-name
PINECONE_NAMESPACE=default
OPENAI_API_KEY=your-openai-api-key
Usage
CLI
# Ask questions about your codebase
code-rag-agent query "What methods are in SongService?"
# Use verbose mode for detailed output
code-rag-agent query "How does payment processing work?" --verbose
# Show configuration
code-rag-agent info
Example Output
$ code-rag-agent query "What GET endpoints exist in MusicController?"
MusicController has 3 GET endpoints: getSongById (/{id}), getAllSongs (/all),
and searchSongs (/search).
⏱️ Response time: 4320ms (4.32s)
Architecture
Built with:
- LangChain: Self-query retrieval and LLM orchestration
- Pinecone: Vector store (pluggable)
- OpenAI: LLM provider (pluggable)
- Pydantic: Configuration management
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/ tests/
License
Apache License 2.0 - see LICENSE file for details.
Metadata
Release files for code-rag-agent 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| code_rag_agent-0.1.0.tar.gz | 17.6 kB | Without provenance | Details for code_rag_agent-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| code_rag_agent-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for code_rag_agent-0.1.0-py3-none-any.whl |
Total release size: 36.9 kB
Release files / code_rag_agent-0.1.0.tar.gz
| Download URL | code_rag_agent-0.1.0.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68fe6d77788b46c74c93e9242f65db67fb345a177f6ac05be3ab7c12d765650b
|
|
BLAKE2b-256 checksum How to use checksums |
d0afefe5d3cf60c1002c22c8714a2515a7cdf655d16ee83dfff31744228bcf6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / code_rag_agent-0.1.0-py3-none-any.whl
| Download URL | code_rag_agent-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b100f8bb4edb388f7a20cb44d3d838793ce0cbb8226a2eddfbd5caf62d50088
|
|
BLAKE2b-256 checksum How to use checksums |
b64ee2b8d6d242e785c914b900221a7f1bfbcb4e62bd5a7f4d01683dafac57a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Security for code-rag-agent 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.