Production-Grade Multi-Model AI Platform for Developers
VersaAI is an intelligent code assistant that combines multiple AI models (local and cloud) to provide powerful coding assistance through a CLI, code editor integration, and Python API. Built for privacy, performance, and flexibility.
π€ Multi-Model AI - Use DeepSeek, StarCoder, CodeLlama, Qwen, GPT-4, Claude
π§ Intelligent Routing - Automatically selects best model for each task
π¬ CLI Code Assistant - Interactive terminal-based AI pair programmer
π Editor Integration - Real-time AI assistance in NLPL Code Editor
π RAG System - Understands your codebase with semantic search
π Privacy-First - Local models keep your code 100% private
β‘ High Performance - Fast responses with optimized model loading
π° Cost-Effective - Free local models + optional cloud APIs
./launch.sh
# Select: 1. Full Stack (Backend + Flutter UI)versaai
# Or: python3 versaai_cli.pycd ui && ./scripts/run_with_backend.shpython3 start_editor_bridge.py # Backend server
# Then open NLPL Code Editor - AI features auto-connectChoose Your Model:
- Local Models (Free, Private) - DeepSeek, StarCoder, CodeLlama, WizardCoder
- OpenAI API - GPT-4, GPT-3.5-Turbo (requires API key)
- Anthropic API - Claude 3.5, Claude 3 (requires API key)
π See INTEGRATION_COMPLETE.md for full documentation
π¬ Chat Mode:
> Explain async/await in Python
π Code Mode:
> /code Write a function to validate emails
π§ File Mode:
> /file mycode.py # Analyze specific file
That's it! You're now coding with AI assistance.
π Complete User Guide - Everything you need to know
π Quick Start Guide - Get started in 5 minutes
π User Manual - In-depth documentation
π Tutorials - Step-by-step guides
π Editor Integration - Integrate with your editor
π Multi-Model Setup - Use multiple models
β‘ Quick Reference - Command cheat sheet
| Use Case | Description |
|---|---|
| Code Completion | Real-time suggestions as you type |
| Code Explanation | Understand unfamiliar code |
| Refactoring | Improve code quality and structure |
| Debugging | Find and fix bugs with AI help |
| Test Generation | Auto-generate unit tests |
| Documentation | Add comments and docstrings |
| Code Review | Get AI feedback on your code |
| Learning | Ask questions about programming concepts |
pip install -e .
versaaipip install -e ".[all]"
# Download models
versaai # Interactive model downloader
# Start editor backend
python -m versaai.code_editor_bridge.serverdocker pull versaai/versaai:latest
docker run -it versaai/versaai| Model | Size | RAM | Best For |
|---|---|---|---|
| DeepSeek Coder 1.3B | 834MB | 2GB | Fast completions |
| DeepSeek Coder 6.7B | 4.1GB | 8GB | Balanced quality |
| StarCoder2 7B | 4.3GB | 8GB | Code generation |
| CodeLlama 7B | 4.0GB | 8GB | General coding |
| Qwen2.5-Coder 7B | 4.4GB | 8GB | Latest, high quality |
| Model | Provider | Best For |
|---|---|---|
| GPT-4 | OpenAI | Complex tasks, architecture |
| GPT-3.5 Turbo | OpenAI | Fast, cost-effective |
| Claude 3 Sonnet | Anthropic | Explanations, docs |
| Claude 3 Opus | Anthropic | Highest quality |
VersaAI integrates with the NLPL Code Editor for real-time AI assistance.
# Terminal 1: Start VersaAI backend
cd VersaAI
python -m versaai.code_editor_bridge.server
# Terminal 2: Start Code Editor
cd code_editor
npm install
npm run dev- AI Chat Panel -
Ctrl+Alt+V - Code Completions - Automatic suggestions
- Explain Code - Right-click β Explain
- Refactor - Right-click β Refactor
- Generate Code - Right-click β Generate
- Debug - Right-click β Debug
See Editor Integration Guide for details.
$ versaai
> Explain this code:
> def fibonacci(n):
> return n if n <= 1 else fibonacci(n-1) + fibonacci(n-2)
AI: This is a recursive implementation of the Fibonacci sequence.
It returns n for base cases (0 or 1), otherwise recursively
calculates fib(n-1) + fib(n-2). Note: This has exponential
time complexity O(2^n). Consider using memoization or iteration
for better performance.> /code Write a function to validate email addresses with regex
AI: Here's a robust email validation function:
import re
def validate_email(email: str) -> bool:
"""
Validates email address format.
Args:
email: Email address to validate
Returns:
True if valid, False otherwise
"""
pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
return bool(re.match(pattern, email))$ versaai --multi-model
> Complete: def quicksort(arr):
AI: [Using deepseek-1.3b for fast completion]
def quicksort(arr):
if len(arr) <= 1:
return arr
pivot = arr[len(arr) // 2]
left = [x for x in arr if x < pivot]
middle = [x for x in arr if x == pivot]
right = [x for x in arr if x > pivot]
return quicksort(left) + middle + quicksort(right)
> Design a scalable microservices architecture
AI: [Routing to GPT-4 for complex architecture]
Here's a comprehensive microservices architecture...# Download model
versaai # Select "Download new model"
# Or manual download
cd ~/.versaai/models
wget <model-url># Use smaller model
versaai --model deepseek-1.3b
# Or reduce context window
export VERSAAI_MAX_TOKENS=512# Check if backend is running
ps aux | grep code_editor_bridge
# Start it
python -m versaai.code_editor_bridge.serverSee Troubleshooting Guide for more.
- β 100% offline, no data leaves your machine
- β No telemetry, tracking, or analytics
- β Your code stays private
β οΈ Data sent to OpenAI/Anthropic serversβ οΈ Subject to provider's privacy policy- β
Can be disabled with
VERSAAI_LOCAL_ONLY=true
| Task | DeepSeek 1.3B | DeepSeek 6.7B | GPT-4 |
|---|---|---|---|
| Code Completion | 2s | 5s | 3s |
| Code Generation | 3s | 8s | 5s |
| Explanation | 4s | 10s | 6s |
| Quality (1-10) | 7/10 | 8.5/10 | 9.5/10 |
| Cost | Free | Free | ~$0.03/request |
Contributions welcome! See CONTRIBUTING.md for guidelines.
# Clone
git clone https://github.com/The-No-hands-Company/VersaAI.git
cd VersaAI
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black versaai/
isort versaai/MIT License - See LICENSE for details.
Built with:
- llama.cpp - Fast local model inference
- OpenAI & Anthropic - Cloud API support
- Hugging Face - Model hosting
- langchain - RAG framework
- π Documentation: See guides above
- π Bug Reports: Open an issue on GitHub
- π‘ Feature Requests: Open an issue with
[Feature]tag - π¬ Questions: Open a discussion on GitHub
Made with β€οΈ by The No-hands Company
Start coding smarter with AI today! π
pip install -e .
versaai