This project provides a complete implementation of a local AI coding agent using Claude 3.5 and Qwen models for Python and C++ development. The system is designed to run completely offline without requiring internet connectivity.
- Fully Offline Operation: Run the entire system locally without internet dependency
- Multiple Model Support: Use either Claude 3.5 or Qwen models based on your needs
- Multi-Language Support: Generate and analyze both Python and C++ code
- Code Generation: Create new code from natural language descriptions
- Code Explanation: Get detailed explanations of existing code
- Code Refactoring: Improve and optimize your existing codebase
-
Clone the repository:
git clone https://github.com/jawadalnaimi/Ai-Coding-Agent.git cd Ai-Coding-Agent
-
Install dependencies:
pip install -e .
-
Download models:
python scripts/download_models.py --model-type claude --model-name anthropic/claude-3-haiku-20240307 --output-dir src/models/claude
Or for Qwen:
python scripts/download_models.py --model-type qwen --model-name Qwen/Qwen-7B-Chat --output-dir src/models/qwen
-
Generate code:
ai-code --agent claude --model-path src/models/claude --language python generate "Write a function to calculate the factorial of a number"
For detailed installation and usage instructions, see the Installation Guide and Usage Guide.
- CPU: Minimum 8 cores (16 threads recommended)
- RAM: Minimum 32GB (64GB recommended)
- Storage: 500GB SSD
- GPU: NVIDIA GPU with at least 8GB VRAM (optional but recommended)
- Ubuntu 22.04 LTS or macOS 12+
- Python 3.10+
- CUDA 11.7+ and cuDNN (if using GPU)
ai-coding-agent/
├── configs/ # Configuration files
├── docs/ # Documentation
├── scripts/ # Utility scripts
├── src/ # Source code
│ ├── agents/ # Agent implementations
│ ├── models/ # Model directories
│ └── utils/ # Utility functions
├── tests/ # Test suite
├── setup.py # Package setup
└── requirements.txt # Dependencies
- Installation Guide: Detailed setup instructions
- Usage Guide: How to use the AI coding agent
- Troubleshooting: Solutions to common issues
The AI Coding Agent uses large language models (LLMs) to understand and generate code. The system:
- Loads the selected model (Claude 3.5 or Qwen) into memory
- Processes your input request (generate, explain, or refactor)
- Formats the input with appropriate prompts
- Runs inference on the model
- Post-processes the output for clean, usable code
All operations happen locally on your machine, ensuring privacy and offline functionality.
- Add web-based UI interface
- Support for additional programming languages
- Integration with popular IDEs (VSCode, JetBrains)
- Improved code analysis capabilities
- Fine-tuning options for specialized domains
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Hugging Face for model hosting and libraries
- PyTorch for the deep learning framework
- Transformers library for model implementations