A sophisticated AI-powered coding assistant with multi-agent system, plugin ecosystem, and real-time collaboration features. Built with React + NestJS and designed to rival commercial solutions like Bolt/Lovable with advanced agent orchestration.
- Multi-Agent System - Parallel AI agents working together
- Plugin Ecosystem - Extensible plugins for web search, scraping, language references
- Live Preview - Real-time code compilation and preview
- Resizable UI - Fully customizable workspace layout
- YAML/JSON Settings - Flexible configuration management
- WebSocket Communication - Real-time updates and collaboration
- GPU Acceleration - CUDA/OpenCL support for enhanced performance
- Web Search Plugin - Search the web for documentation and examples
- Web Scraper Plugin - Extract content from websites and documentation
- Language References Plugin - Access syntax references for 15+ programming languages
- Package Manager Plugin - Search and install packages from npm, PyPI, Cargo, etc.
- Git Integration Plugin - Git operations and repository management
- Code Formatter Plugin - Format code according to language standards
- Documentation Generator Plugin - Generate documentation from code and comments
- Manager Agent - Central coordinator managing other agents
- Planning Agent - Breaks down tasks into subtasks
- Code Generation Agent - Generates frontend and backend code
- Review Agent - Reviews code for quality and security
- Testing Agent - Creates and runs comprehensive tests
- Frontend: React 18 + TypeScript + Vite + Tailwind CSS + Monaco Editor
- Backend: NestJS + TypeORM + PostgreSQL + Redis + WebSocket
- AI Integration: OpenAI GPT-4, Anthropic Claude, Custom Providers
- Real-time: Socket.io for live updates
- Task Queue: Bull/Redis for agent coordination
- Plugin System: Extensible architecture with 7 built-in plugins
- Performance: GPU acceleration with CUDA/OpenCL support
lotusagi/
βββ backend/ # NestJS backend
β βββ src/
β β βββ modules/
β β β βββ agents/ # Multi-agent system
β β β βββ plugins/ # Plugin ecosystem
β β β βββ projects/ # Project management
β β β βββ websocket/ # Real-time communication
β β β βββ settings/ # Configuration management
β β β βββ ai/ # AI provider integration
β β β βββ preview/ # Live preview system
β β βββ database/ # TypeORM entities
β β βββ config/ # Configuration management
β βββ shared/ # Shared configuration
βββ frontend/ # React frontend
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ stores/ # Zustand state management
β β βββ services/ # API services
β β βββ hooks/ # Custom React hooks
β β βββ utils/ # Utility functions
β βββ public/ # Static assets
βββ shared/ # Shared configuration files
Use our automated installer for the fastest setup:
# Download and run the installer
chmod +x install.sh
./install.sh
# Or with options:
./install.sh --enable-gpu # Include GPU configuration
./install.sh --skip-deps # Skip system dependencies
./install.sh --no-start # Don't start services after installThe installer will:
- β Check system requirements
- β Install dependencies automatically
- β Set up database services
- β Create environment configuration
- β Configure GPU acceleration (optional)
- β Start the application
- Node.js 18+
- PostgreSQL 13+
- Redis 6+
- npm or yarn
- Git (optional, for git integration plugin)
# Install all dependencies (root, frontend, backend)
npm run dev:install
# Or install manually:
npm install
cd frontend && npm install && cd ../backend && npm install# Create PostgreSQL database
createdb lotusagi
# Start Redis (optional, for queue management)
redis-server# Copy environment template
cp .env.example .env
# Edit .env with your configuration
# Set your API keys and database credentials# Start both frontend and backend
npm run dev
# Or start individually:
# Backend (http://localhost:3001)
npm run dev:backend
# Frontend (http://localhost:3000)
npm run dev:frontend-
Access the Application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- API Documentation: http://localhost:3001/docs
-
Configure AI Providers:
- Edit
~/.lotusagi/.envwith your API keys - Configure custom AI providers in
shared/config.yaml - See Developer Guide for detailed setup
- Edit
-
Try the Plugins:
- Web Search: Search for documentation and examples
- Language References: Get syntax help for 15+ languages
- Package Manager: Search npm, PyPI, Cargo packages
- Code Formatter: Format code with Prettier, Black, etc.
-
Use AI Agents:
- Create a new project
- Use Planning Agent to break down tasks
- Generate code with Code Generation Agent
- Review with Review Agent
- Test with Testing Agent
Edit shared/config.yaml or use environment variables:
ai:
providers:
openai:
api_key: "${OPENAI_API_KEY}" # Set in .env
model: "gpt-4"
enabled: true
claude:
api_key: "${CLAUDE_API_KEY}" # Set in .env
model: "claude-3-sonnet-20240229"
enabled: false # Enable if you have Claude API accessagents:
enabled: true
max_concurrent: 5
retry_attempts: 3
timeout_ms: 300000 # 5 minutesdatabase:
type: "postgresql"
host: "localhost"
port: 5432
username: "ai_coding_app"
password: "${DB_PASSWORD}"
database: "ai_coding_app"The system uses a catalyst-based manager agent that orchestrates specialized agents:
- Manager Agent - Central coordinator and workflow orchestrator
- Planning Agent - Task breakdown and project planning
- Code Generation Agent - Frontend/backend code creation
- Review Agent - Code quality and security analysis
- Testing Agent - Test creation and execution
Agents communicate through:
- WebSocket - Real-time status updates
- Task Queue - Bull/Redis for job management
- Database - Persistent execution history
// Execute task with specific agent
const result = await agentRegistry.executeTask(
'code_generation',
'Create a React button component',
{ context: 'user interface' },
projectId
);
// Execute workflow with multiple agents
await agentRegistry.orchestrateWorkflow({
name: 'Full-Stack Development',
steps: [
{ agentType: 'planning', task: 'Analyze requirements' },
{ agentType: 'code_generation', task: 'Generate frontend', dependencies: ['planning'] },
{ agentType: 'code_generation', task: 'Generate backend', dependencies: ['planning'] },
{ agentType: 'review', task: 'Review code', dependencies: ['frontend', 'backend'] }
]
});- Split Panes - Editor, Preview, Chat, File Tree
- Draggable - Customizable workspace
- Responsive - Mobile-friendly design
- Dark Theme - Professional coding environment
- Monaco Editor - Full VS Code editor experience
- Syntax Highlighting - 50+ languages supported
- Auto-completion - IntelliSense and suggestions
- Error Detection - Real-time syntax checking
- Real-time Updates - Instant compilation feedback
- Multi-language Support - HTML, CSS, JS, TS, React
- Sandboxed Execution - Safe code execution
- Error Overlay - Compilation error display
GET /api/agents # List all agents
GET /api/agents/status # Agent system status
POST /api/agents/execute # Execute agent task
POST /api/agents/workflow # Execute workflow
GET /api/projects # List all projects
GET /api/projects/:id # Get project details
POST /api/projects # Create new project
PUT /api/projects/:id # Update project
DELETE /api/projects/:id # Delete project
GET /api/settings # Get all settings
GET /api/settings/:key # Get specific setting
PUT /api/settings/:key # Update setting
// Agent task execution
socket.emit('agent_task_request', {
agentType: 'code_generation',
task: 'Create React component',
projectId: 'project123'
});
// Real-time code updates
socket.emit('code_update', {
projectId: 'project123',
filePath: 'src/App.tsx',
content: 'new code here',
language: 'typescript'
});- Auto-refresh - Configurable delay (100ms - 5000ms)
- Compilation - Real-time error detection
- Safe Execution - Sandboxed environment
- Multi-format - HTML, CSS, JS, TS, React
- Parallel Execution - Multiple agents working simultaneously
- Progress Tracking - Real-time task status updates
- Error Handling - Automatic retry with exponential backoff
- Queue Management - Bull/Redis job queue system
- Automated Review - AI-powered code analysis
- Security Scanning - Vulnerability detection
- Performance Analysis - Optimization suggestions
- Best Practices - Industry standard compliance
- Unit Tests - Automated test generation
- Integration Tests - MSW for API mocking
- E2E Tests - Playwright for full workflows
- Coverage Reports - Comprehensive testing metrics
- Input Validation - All user inputs sanitized
- XSS Protection - Content Security Policy enabled
- Safe Preview - Sandboxed execution environment
- API Key Protection - Environment variable storage
- Encrypted Storage - Sensitive data encryption
- Access Control - Role-based permissions
- Audit Logging - Complete action tracking
- GDPR Compliance - Data privacy standards
- Code Splitting - Lazy loading for better performance
- Bundle Analysis - Webpack bundle optimization
- Caching Strategy - Service worker implementation
- Image Optimization - WebP format support
- Connection Pooling - Database connection optimization
- Query Optimization - Efficient database queries
- Caching Layer - Redis for frequently accessed data
- Worker Threads - CPU-intensive task distribution
- Unit Tests - Jest + React Testing Library
- Integration Tests - API endpoint testing
- E2E Tests - Playwright for full workflows
- Load Testing - Artillery for performance testing
- Statements - 90%+
- Branches - 85%+
- Functions - 90%+
- Lines - 90%+
npm run devnpm run build
npm run start# Build and run with Docker Compose
docker-compose up --buildRequired for production:
OPENAI_API_KEY- OpenAI API keyCLAUDE_API_KEY- Claude API key (optional)DATABASE_URL- PostgreSQL connection stringREDIS_URL- Redis connection stringJWT_SECRET- JWT signing secret
- Swagger UI - Available at
http://localhost:3001/api/docs - Postman Collection - Import provided collection
- OpenAPI Spec - Complete API specification
- System Design - High-level architecture overview
- Agent Documentation - Detailed agent implementation
- Plugin System - Complete plugin development guide
- Database Schema - Entity relationship diagrams
- Deployment Guide - Production deployment instructions
- PLUGINS.md - Comprehensive plugin system documentation
- Plugin API Reference - HTTP endpoints and usage examples
- Plugin Development Guide - Create custom plugins
- Plugin Configuration - Configure existing plugins
- Plugin Best Practices - Development guidelines
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
- ESLint - JavaScript/TypeScript linting
- Prettier - Code formatting
- Husky - Git hooks for quality gates
- Conventional Commits - Standardized commit messages
- Extend Base Agent - Implement new agent types
- Plugin System - Add custom agent plugins
- API Integration - Connect new AI providers
- Testing Framework - Comprehensive agent testing
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI - GPT-4 API integration
- Anthropic - Claude API integration
- Monaco Editor - VS Code editor experience
- NestJS - Scalable backend architecture
- React - Frontend framework
- Socket.io - Real-time communication
- Documentation - Comprehensive guides and API reference
- Issues - GitHub issues for bugs and feature requests
- Discussions - GitHub discussions for questions
- Discord - Community chat and support
Q: WebSocket connection failed A: Ensure backend is running on port 3001 and CORS origins are configured
Q: AI agents not responding
A: Check API keys in .env file and ensure OpenAI API quota is available
Q: Database connection error A: Verify PostgreSQL is running and connection credentials are correct
Q: Live preview not updating A: Check browser console for errors and ensure auto-refresh is enabled in settings
Q: Plugin execution failed A: Verify plugin is enabled in settings and check plugin-specific configuration
Q: Web search returning no results A: Ensure search API key is configured and rate limits are not exceeded
π LotusAGI - Where AI meets coding excellence!