Skip to content

duclm1x1/Dive-Ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dive AI V29.4

🦞 Complete AI-Powered Coding Assistant with Desktop & Web IDEs

Python License


✨ Features

  • πŸ€– AI Algorithm Selection - Intelligently chooses the best algorithm for each task
  • 🧬 Self-Evolving System - Automatically generates and optimizes algorithms
  • πŸ–₯️ Desktop IDE - Native PyQt6 application with full features
  • 🌐 Web IDE - Beautiful browser-based interface (Monaco editor)
  • πŸ“Š Database Integration - Persistent chat history and analytics
  • πŸ”Œ Multi-Channel Support - Discord, Telegram, Zalo desktop integration
  • ⚑ Real-time Chat - WebSocket support for instant responses
  • πŸ“ Code Editor - Syntax highlighting and intelligent completion

πŸš€ Quick Start

1. Install Dependencies

pip install -r requirements.txt

2. Configure Environment

cp .env.example .env
# Edit .env with your API keys

Required environment variables:

V98_API_KEY=your_v98_api_key_here
AICODING_API_KEY=your_aicoding_key_here
DATABASE_URL=sqlite:///./dive_ai.db

3. Run Gateway Server

python gateway/gateway_server.py

The Gateway will start on http://localhost:1879

4. Access Interfaces


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Multi-Channel Gateway              β”‚
β”‚  (Web, Desktop, Discord, Telegram, Zalo)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚  Gateway Server β”‚
         β”‚  (Port 1879)    β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                           β”‚
β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ AI Algorithm  β”‚    β”‚  AlgorithmManagerβ”‚
β”‚   Selector    │───►│   (50+ algos)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚  Database Storage    β”‚
                    β”‚  (Chat + Analytics)  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ Project Structure

Dive-AI2/
β”œβ”€β”€ gateway/
β”‚   └── gateway_server.py          # Main FastAPI server
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ algorithms/                # 50+ built-in algorithms
β”‚   β”œβ”€β”€ ai_algorithm_selector.py   # AI-powered selection
β”‚   └── self_evolving_algorithms.py# Auto-generation system
β”œβ”€β”€ channels/
β”‚   β”œβ”€β”€ discord_desktop_channel.py # Discord integration
β”‚   β”œβ”€β”€ telegram_desktop_channel.py# Telegram integration
β”‚   └── zalo_desktop_channel.py    # Zalo integration
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ config.py                  # Database setup
β”‚   └── models.py                  # SQLAlchemy models
β”œβ”€β”€ web_ide/
β”‚   └── index.html                 # Web IDE interface
β”œβ”€β”€ desktop_ide.py                 # PyQt6 desktop app
β”œβ”€β”€ diveai_tray.py                # System tray app
β”œβ”€β”€ first_run_setup.py            # Setup wizard
β”œβ”€β”€ requirements.txt               # Python dependencies
β”œβ”€β”€ .env.example                   # Environment template
└── README.md                      # This file

πŸ”Œ API Endpoints

Chat

POST /chat
{
  "message": "Create a Python REST API",
  "channel": "web",
  "user_id": "user_123"
}

Health Check

GET /health

Statistics

GET /statistics

List Algorithms

GET /algorithms

WebSocket

WS /ws/{session_id}

πŸ’Ύ Database

Dive AI uses SQLAlchemy with support for:

  • SQLite (default, no setup required)
  • PostgreSQL (for production)

Database Models

  • ChatSession - User chat sessions
  • ChatMessage - Individual messages
  • AlgorithmExecution - Execution logs
  • GeneratedAlgorithm - Self-evolved algorithms

Connect to PostgreSQL

DATABASE_URL=postgresql://user:password@localhost:5432/diveai

πŸ–₯️ Desktop Applications

Web IDE (Browser)

Open http://localhost:1879 for:

  • AI Chat interface
  • Monaco code editor
  • Integrated terminal
  • File management

Desktop IDE (Native)

Run python desktop_ide.py for:

  • Standalone application
  • Embedded web view
  • Native file operations
  • System integration

System Tray

Run python diveai_tray.py for:

  • Background service
  • Quick start/stop
  • Status monitoring
  • Settings access

🧬 Self-Evolving System

The AI can:

  1. Detect capability gaps - Identifies missing algorithms
  2. Generate new algorithms - Creates Python code automatically
  3. Optimize existing code - Improves performance based on metrics
  4. Learn from results - Adapts selection based on success rates

View Evolution Status

curl http://localhost:1879/evolution/status

🎨 Desktop Channels

Control desktop messaging apps via UI automation:

Discord Desktop

  • Auto-login and channel monitoring
  • Send/receive messages
  • React to messages

Telegram Desktop

  • Full Vietnamese support
  • Group chat integration
  • Media handling

Zalo PC

  • Native Vietnamese app
  • No API needed
  • Full feature access

Configure in config/channels.json


πŸ§ͺ Development

Run Demo

python demo.py

Run Tests

pytest test_complete_system.py

Build Desktop App

python build.bat

Creates:

  • DiveAI-Tray.exe - System tray app
  • DiveAI-Setup-Wizard.exe - First-run setup
  • dist/DiveAI/ - Complete distribution

πŸ“Š System Requirements

  • OS: Windows 10/11, macOS, Linux
  • Python: 3.9 or higher
  • RAM: 4GB minimum, 8GB recommended
  • Disk: 500MB free space
  • Network: Internet connection for AI APIs

πŸ”§ Configuration

Environment Variables

# LLM API Keys
V98_API_KEY=your_key_here
AICODING_API_KEY=your_key_here

# Gateway Settings
GATEWAY_PORT=1879
GATEWAY_HOST=127.0.0.1

# Database
DATABASE_URL=sqlite:///./dive_ai.db

# Desktop Channels (optional)
DISCORD_PATH=C:\Users\...\Discord\Discord.exe
TELEGRAM_PATH=C:\Users\...\Telegram Desktop\Telegram.exe
ZALO_PATH=C:\Users\...\Zalo\Zalo.exe

# Self-Evolution
AUTO_OPTIMIZE_ENABLED=true
AUTO_OPTIMIZE_THRESHOLD=50

πŸ“ License

MIT License - see LICENSE file


🀝 Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“ž Support


🎯 Roadmap

  • VSCode extension
  • Cloud deployment support
  • Multi-user collaboration
  • Plugin system
  • Mobile companion app

Made with 🧬 by Dive AI Self-Evolving System
Version 29.4 - The Future of Agentic AI


⭐ Star History

Stargazers over time

About

advanced AI coding assistant powered by Dive Engine V2 with Dual Thinking Model You are designed to handle complex software engineering tasks with state-of-the-art reasoning capabilities.

Resources

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors