Upload folder using huggingface_hub
Browse files- .gitattributes +35 -35
- DEPLOYMENT_INFO.md +63 -0
- DEPLOYMENT_SUCCESS.md +248 -0
- README.md +248 -12
- docker-commands.md +49 -0
- requirements.txt +1 -0
- requirements_backup.txt +76 -0
- requirements_fixed.txt +44 -0
- requirements_new.txt +33 -0
- schema.sql +135 -0
- start.sh +25 -0
.gitattributes
CHANGED
|
@@ -1,35 +1,35 @@
|
|
| 1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
DEPLOYMENT_INFO.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# OpenManus HuggingFace Deployment Package
|
| 2 |
+
|
| 3 |
+
## 📦 Package Contents
|
| 4 |
+
- **Total Files**: 35
|
| 5 |
+
- **Missing Files**: 0
|
| 6 |
+
|
| 7 |
+
## ✅ Included Files
|
| 8 |
+
- Dockerfile
|
| 9 |
+
- README.md
|
| 10 |
+
- app/__init__.py
|
| 11 |
+
- app/agent/__init__.py
|
| 12 |
+
- app/agent/base.py
|
| 13 |
+
- app/agent/manus.py
|
| 14 |
+
- app/agent/toolcall.py
|
| 15 |
+
- app/auth.py
|
| 16 |
+
- app/auth_interface.py
|
| 17 |
+
- app/auth_service.py
|
| 18 |
+
- app/cloudflare/__init__.py
|
| 19 |
+
- app/cloudflare/client.py
|
| 20 |
+
- app/cloudflare/d1.py
|
| 21 |
+
- app/cloudflare/durable_objects.py
|
| 22 |
+
- app/cloudflare/kv.py
|
| 23 |
+
- app/cloudflare/r2.py
|
| 24 |
+
- app/config.py
|
| 25 |
+
- app/huggingface_models.py
|
| 26 |
+
- app/logger.py
|
| 27 |
+
- app/production_config.py
|
| 28 |
+
- app/prompt/__init__.py
|
| 29 |
+
- app/prompt/manus.py
|
| 30 |
+
- app/schema.py
|
| 31 |
+
- app/tool/__init__.py
|
| 32 |
+
- app/tool/ask_human.py
|
| 33 |
+
- app/tool/base.py
|
| 34 |
+
- app/tool/python_execute.py
|
| 35 |
+
- app/tool/str_replace_editor.py
|
| 36 |
+
- app/tool/terminate.py
|
| 37 |
+
- app/tool/tool_collection.py
|
| 38 |
+
- app/utils/__init__.py
|
| 39 |
+
- app/utils/logger.py
|
| 40 |
+
- app_production.py
|
| 41 |
+
- requirements.txt
|
| 42 |
+
- schema.sql
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
## 🚀 Deployment Instructions
|
| 46 |
+
|
| 47 |
+
1. **Upload all files** from this package to your HuggingFace Space
|
| 48 |
+
2. **Set environment variables** in Space settings:
|
| 49 |
+
- `ENVIRONMENT=production`
|
| 50 |
+
- `HF_TOKEN=your_token` (optional)
|
| 51 |
+
- `CLOUDFLARE_API_TOKEN=your_token` (optional)
|
| 52 |
+
|
| 53 |
+
3. **Monitor build logs** during deployment
|
| 54 |
+
4. **Test authentication** after successful deployment
|
| 55 |
+
|
| 56 |
+
## 🎯 What This Includes
|
| 57 |
+
- ✅ Complete authentication system (mobile + password)
|
| 58 |
+
- ✅ 200+ AI model configurations
|
| 59 |
+
- ✅ Cloudflare services integration
|
| 60 |
+
- ✅ Production-ready Docker setup
|
| 61 |
+
- ✅ Comprehensive error handling
|
| 62 |
+
|
| 63 |
+
Ready for HuggingFace Spaces! 🚀
|
DEPLOYMENT_SUCCESS.md
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🎉 Deployment Successful - ORYNXML Complete AI Platform
|
| 2 |
+
|
| 3 |
+
## ✅ What Was Fixed
|
| 4 |
+
|
| 5 |
+
### Problem
|
| 6 |
+
- **Error**: `RuntimeError: Directory 'static' does not exist`
|
| 7 |
+
- **Root Cause**: Space was trying to run FastAPI (`main.py`) instead of Gradio (`app.py`)
|
| 8 |
+
- **Reason**: README.md had incorrect metadata configuration
|
| 9 |
+
|
| 10 |
+
### Solution
|
| 11 |
+
✅ Updated `agnt/README.md` with correct Gradio configuration:
|
| 12 |
+
```yaml
|
| 13 |
+
---
|
| 14 |
+
title: ORYNXML Complete AI Platform
|
| 15 |
+
emoji: 🤖
|
| 16 |
+
colorFrom: blue
|
| 17 |
+
colorTo: indigo
|
| 18 |
+
sdk: gradio
|
| 19 |
+
sdk_version: 4.44.1
|
| 20 |
+
app_file: app.py
|
| 21 |
+
pinned: false
|
| 22 |
+
---
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
✅ Redeployed README.md to Hugging Face Space
|
| 26 |
+
✅ Space now correctly recognizes as **Gradio SDK**
|
| 27 |
+
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
## 🚀 Your Backend is Ready!
|
| 31 |
+
|
| 32 |
+
### 🔗 Space URL
|
| 33 |
+
**https://huggingface.co/spaces/Speedofmastery/yyuu-complete-ai**
|
| 34 |
+
|
| 35 |
+
### 📊 Current Status
|
| 36 |
+
- ✅ **SDK**: Gradio (correct!)
|
| 37 |
+
- ⏸️ **State**: PAUSED (needs restart)
|
| 38 |
+
- 💻 **Hardware**: NVIDIA A10G GPU configured
|
| 39 |
+
- 📦 **Models**: 211 models across 8 categories
|
| 40 |
+
|
| 41 |
+
---
|
| 42 |
+
|
| 43 |
+
## 🎯 Next Steps to Complete Deployment
|
| 44 |
+
|
| 45 |
+
### 1️⃣ **RESTART THE SPACE** (Manual Action Required)
|
| 46 |
+
You need to manually restart the Space:
|
| 47 |
+
|
| 48 |
+
1. Go to: https://huggingface.co/spaces/Speedofmastery/yyuu-complete-ai/settings
|
| 49 |
+
2. Click **"Factory Rebuild"** button
|
| 50 |
+
3. Wait for build to complete (~2-3 minutes)
|
| 51 |
+
4. Space will automatically start and load the Gradio interface
|
| 52 |
+
|
| 53 |
+
### 2️⃣ **Verify Space is Running**
|
| 54 |
+
After rebuild:
|
| 55 |
+
- Visit: https://huggingface.co/spaces/Speedofmastery/yyuu-complete-ai
|
| 56 |
+
- You should see the Gradio interface with 11 tabs:
|
| 57 |
+
- Sign Up
|
| 58 |
+
- Login
|
| 59 |
+
- Text Generation
|
| 60 |
+
- Image Processing
|
| 61 |
+
- Image Editing
|
| 62 |
+
- Video Generation
|
| 63 |
+
- AI Teacher & Education
|
| 64 |
+
- Software Engineer Agent
|
| 65 |
+
- Audio Processing
|
| 66 |
+
- Multimodal & Avatars
|
| 67 |
+
- Arabic-English
|
| 68 |
+
|
| 69 |
+
### 3️⃣ **Test Authentication**
|
| 70 |
+
- Create a test account using the Sign Up tab
|
| 71 |
+
- Try logging in with the credentials
|
| 72 |
+
- SQLite database (`openmanus.db`) will be created automatically
|
| 73 |
+
|
| 74 |
+
### 4️⃣ **Test AI Models**
|
| 75 |
+
- Select any model from the dropdowns
|
| 76 |
+
- Enter a prompt
|
| 77 |
+
- Verify the simulated response is displayed
|
| 78 |
+
|
| 79 |
+
---
|
| 80 |
+
|
| 81 |
+
## 📦 What's Deployed
|
| 82 |
+
|
| 83 |
+
### Backend (`app.py` - 1014 lines)
|
| 84 |
+
✅ **8 Complete Agent Categories with 211 Models:**
|
| 85 |
+
|
| 86 |
+
1. **Text Generation** (52 models)
|
| 87 |
+
- Qwen Models (35): Qwen2.5-72B, QwQ-32B, Coder series, Math series
|
| 88 |
+
- DeepSeek Models (17): DeepSeek-R1, V2-Chat, Coder series
|
| 89 |
+
|
| 90 |
+
2. **Image Processing** (31 models)
|
| 91 |
+
- Generation (10): FLUX.1, Stable Diffusion, Kandinsky, Midjourney
|
| 92 |
+
- Editing (15): Pix2Pix, ControlNet, PhotoMaker, InstantID
|
| 93 |
+
- Face Processing (6): InsightFace, GFPGAN, CodeFormer, Real-ESRGAN
|
| 94 |
+
|
| 95 |
+
3. **Image Editing** (15 models)
|
| 96 |
+
- Specialized editing: Inpainting, ControlNet, Style transfer
|
| 97 |
+
|
| 98 |
+
4. **Video Generation** (18 models)
|
| 99 |
+
- Text-to-Video (8): Ali-ViLab, ModelScope, AnimateDiff
|
| 100 |
+
- Image-to-Video (5): Stable Video Diffusion, ToonCrafter
|
| 101 |
+
- Video Editing (5): Tune-A-Video, Text2Video-Zero
|
| 102 |
+
|
| 103 |
+
5. **AI Teacher & Education** (21 models)
|
| 104 |
+
- Math & Science (6): Qwen2.5-Math, WizardMath
|
| 105 |
+
- Coding Tutor (5): Qwen Coder, DeepSeek Coder
|
| 106 |
+
- Language Learning (5): NLLB-200, SeamlessM4T
|
| 107 |
+
- General Education (5): Mistral, Phi-3, Nous-Hermes
|
| 108 |
+
|
| 109 |
+
6. **Software Engineer Agent** (27 models)
|
| 110 |
+
- Code Generation (10): CodeLlama 70B/34B/13B/7B, Qwen Coder
|
| 111 |
+
- Code Review (7): StarCoder2, WizardCoder, Phind-CodeLlama
|
| 112 |
+
- Specialized Coding (6): CodeGen, Replit, PolyCoder
|
| 113 |
+
- DevOps (4): Infrastructure & deployment models
|
| 114 |
+
|
| 115 |
+
7. **Audio Processing** (30 models)
|
| 116 |
+
- Text-to-Speech (15): SpeechT5, MMS-TTS, XTTS-v2, Bark
|
| 117 |
+
- Speech-to-Text (15): Whisper (all sizes), Wav2Vec2, MMS
|
| 118 |
+
|
| 119 |
+
8. **Multimodal AI** (20 models)
|
| 120 |
+
- Vision-Language (11): LLaVA, BLIP2, Git, ViLT
|
| 121 |
+
- Talking Avatars (9): Wav2Lip, DeepFaceLive, FaceRig
|
| 122 |
+
|
| 123 |
+
9. **Arabic-English** (12 models)
|
| 124 |
+
- BERT models, AraBERT, MARBERT, NLLB translation
|
| 125 |
+
|
| 126 |
+
### Frontend (9 HTML Pages)
|
| 127 |
+
✅ All pages use **ORYNXML branding**:
|
| 128 |
+
- Colors: Blue (#1B5DA8, #4DA3FF), Dark (#0A1628)
|
| 129 |
+
- Logo: Hexagonal design from ibb.co
|
| 130 |
+
|
| 131 |
+
**Current Pages:**
|
| 132 |
+
1. `index.html` - Landing page
|
| 133 |
+
2. `signup.html` - User registration
|
| 134 |
+
3. `login.html` - Authentication
|
| 135 |
+
4. `dashboard.html` - Main hub
|
| 136 |
+
5. `chat.html` - AI chat interface (updated with 8 categories)
|
| 137 |
+
6. `terminal.html` - Command terminal
|
| 138 |
+
7. `browser.html` - Web browser
|
| 139 |
+
8. `files.html` - File manager
|
| 140 |
+
9. `visualize.html` - Data visualization
|
| 141 |
+
|
| 142 |
+
---
|
| 143 |
+
|
| 144 |
+
## 🔮 Future Enhancements (Optional)
|
| 145 |
+
|
| 146 |
+
### A. Create 7 Specialized Visual Interfaces
|
| 147 |
+
Replace simulated responses with rich UI:
|
| 148 |
+
|
| 149 |
+
1. **`image-gen.html`** - Image generation studio
|
| 150 |
+
- Model selector, prompt builder, image gallery
|
| 151 |
+
- Real-time generation from FLUX.1/SDXL
|
| 152 |
+
|
| 153 |
+
2. **`code-review.html`** - Code review dashboard
|
| 154 |
+
- Code editor, diff viewer, suggestions panel
|
| 155 |
+
- Integration with Software Engineer Agent
|
| 156 |
+
|
| 157 |
+
3. **`audio-studio.html`** - Audio processing workspace
|
| 158 |
+
- TTS voice selector, STT transcription
|
| 159 |
+
- Audio player and waveform visualization
|
| 160 |
+
|
| 161 |
+
4. **`ai-teacher.html`** - Interactive learning platform
|
| 162 |
+
- Subject selector, problem solver, step-by-step explanations
|
| 163 |
+
- Math equation renderer, code examples
|
| 164 |
+
|
| 165 |
+
5. **`vision-lab.html`** - Computer vision workspace
|
| 166 |
+
- Image upload, VQA interface, captioning
|
| 167 |
+
- Multi-image comparison
|
| 168 |
+
|
| 169 |
+
6. **`video-gen.html`** - Video generation studio
|
| 170 |
+
- Text-to-video/image-to-video interface
|
| 171 |
+
- Timeline editor, preview player
|
| 172 |
+
|
| 173 |
+
7. **`image-edit.html`** - Advanced image editor
|
| 174 |
+
- ControlNet, inpainting, style transfer
|
| 175 |
+
- Before/after comparison
|
| 176 |
+
|
| 177 |
+
### B. Connect Frontend to Backend API
|
| 178 |
+
- Create API endpoints in `app.py` for each category
|
| 179 |
+
- Replace simulated responses with real model inference
|
| 180 |
+
- Add authentication middleware
|
| 181 |
+
- Implement rate limiting and usage tracking
|
| 182 |
+
|
| 183 |
+
### C. Enhanced Features
|
| 184 |
+
- User dashboard with usage statistics
|
| 185 |
+
- Model comparison side-by-side
|
| 186 |
+
- Save/load conversation history
|
| 187 |
+
- Export results (images, audio, code)
|
| 188 |
+
- API key management for external services
|
| 189 |
+
|
| 190 |
+
---
|
| 191 |
+
|
| 192 |
+
## 📊 Technical Stack Summary
|
| 193 |
+
|
| 194 |
+
### Backend
|
| 195 |
+
- **Framework**: Gradio 4.44.1
|
| 196 |
+
- **Database**: SQLite (openmanus.db)
|
| 197 |
+
- **Authentication**: Mobile number + SHA-256 password hashing
|
| 198 |
+
- **AI Models**: 211 models from HuggingFace Hub
|
| 199 |
+
- **Deployment**: Hugging Face Spaces (NVIDIA A10G GPU)
|
| 200 |
+
|
| 201 |
+
### Frontend
|
| 202 |
+
- **Framework**: Pure HTML/CSS/JavaScript
|
| 203 |
+
- **Styling**: ORYNXML blue gradient theme
|
| 204 |
+
- **Icons**: Lucide Icons
|
| 205 |
+
- **Hosting**: Ready for Cloudflare Pages
|
| 206 |
+
- **Backend Integration**: API calls to HF Space
|
| 207 |
+
|
| 208 |
+
### Infrastructure
|
| 209 |
+
- **Cloudflare Services**: D1, R2, KV, Durable Objects (configured)
|
| 210 |
+
- **GPU**: NVIDIA A10G (Space hardware)
|
| 211 |
+
- **Storage**: SQLite database persists in Space
|
| 212 |
+
|
| 213 |
+
---
|
| 214 |
+
|
| 215 |
+
## 🎉 Deployment Checklist
|
| 216 |
+
|
| 217 |
+
- ✅ Backend code complete (app.py - 1014 lines)
|
| 218 |
+
- ✅ Requirements.txt with all dependencies
|
| 219 |
+
- ✅ README.md with correct Gradio configuration
|
| 220 |
+
- ✅ Uploaded to HuggingFace Space
|
| 221 |
+
- ✅ README.md redeployed with fix
|
| 222 |
+
- ✅ Space recognized as Gradio SDK
|
| 223 |
+
- ⏸️ **PENDING**: Space restart (manual action required)
|
| 224 |
+
- ⏸️ **PENDING**: Test authentication and models
|
| 225 |
+
- ⏸️ **PENDING**: Create 7 specialized frontend pages (optional)
|
| 226 |
+
- ⏸️ **PENDING**: Connect frontend to backend API
|
| 227 |
+
|
| 228 |
+
---
|
| 229 |
+
|
| 230 |
+
## 🔗 Important Links
|
| 231 |
+
|
| 232 |
+
- **Space URL**: https://huggingface.co/spaces/Speedofmastery/yyuu-complete-ai
|
| 233 |
+
- **Settings**: https://huggingface.co/spaces/Speedofmastery/yyuu-complete-ai/settings
|
| 234 |
+
- **Logs**: https://huggingface.co/spaces/Speedofmastery/yyuu-complete-ai/logs
|
| 235 |
+
- **Files**: https://huggingface.co/spaces/Speedofmastery/yyuu-complete-ai/tree/main
|
| 236 |
+
|
| 237 |
+
---
|
| 238 |
+
|
| 239 |
+
## 🚨 Action Required
|
| 240 |
+
|
| 241 |
+
**Go to Space Settings and click "Factory Rebuild" to complete deployment!**
|
| 242 |
+
|
| 243 |
+
After rebuild, your complete AI platform with 211 models will be live at:
|
| 244 |
+
**https://huggingface.co/spaces/Speedofmastery/yyuu-complete-ai**
|
| 245 |
+
|
| 246 |
+
---
|
| 247 |
+
|
| 248 |
+
*Last updated: Configuration fix deployed, awaiting manual Space restart*
|
README.md
CHANGED
|
@@ -1,12 +1,248 @@
|
|
| 1 |
-
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
-
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
-
|
| 9 |
-
pinned:
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: ORYNXML Complete AI Platform
|
| 3 |
+
emoji: 🤖
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 4.44.1
|
| 8 |
+
suggested_hardware: a10g-large
|
| 9 |
+
pinned: true
|
| 10 |
+
license: apache-2.0
|
| 11 |
+
short_description: Complete AI Platform with 211 models across 8 categories
|
| 12 |
+
tags:
|
| 13 |
+
- AI
|
| 14 |
+
- Authentication
|
| 15 |
+
- Multi-Modal
|
| 16 |
+
- HuggingFace
|
| 17 |
+
- OpenManus
|
| 18 |
+
- Qwen
|
| 19 |
+
- DeepSeek
|
| 20 |
+
- TTS
|
| 21 |
+
- STT
|
| 22 |
+
- Face-Swap
|
| 23 |
+
- Avatar
|
| 24 |
+
- Arabic
|
| 25 |
+
- English
|
| 26 |
+
- Cloudflare
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
<p align="center">
|
| 30 |
+
<img src="assets/logo.jpg" width="200"/>
|
| 31 |
+
</p>
|
| 32 |
+
|
| 33 |
+
English | [中文](README_zh.md) | [한국어](README_ko.md) | [日本語](README_ja.md)
|
| 34 |
+
|
| 35 |
+
[](https://github.com/FoundationAgents/OpenManus/stargazers)
|
| 36 |
+
 
|
| 37 |
+
[](https://opensource.org/licenses/MIT)  
|
| 38 |
+
[](https://discord.gg/DYn29wFk9z)
|
| 39 |
+
[](https://huggingface.co/spaces/lyh-917/OpenManusDemo)
|
| 40 |
+
[](https://doi.org/10.5281/zenodo.15186407)
|
| 41 |
+
|
| 42 |
+
# 👋 OpenManus - Complete AI Platform
|
| 43 |
+
|
| 44 |
+
🤖 **200+ AI Models + Mobile Authentication + Cloudflare Services**
|
| 45 |
+
|
| 46 |
+
Manus is incredible, but OpenManus can achieve any idea without an *Invite Code* 🛫!
|
| 47 |
+
|
| 48 |
+
## 🌟 Environment Variables
|
| 49 |
+
|
| 50 |
+
Set these in your HuggingFace Space settings for full functionality:
|
| 51 |
+
|
| 52 |
+
```bash
|
| 53 |
+
# Required for full Cloudflare integration
|
| 54 |
+
CLOUDFLARE_API_TOKEN=your_cloudflare_token
|
| 55 |
+
CLOUDFLARE_ACCOUNT_ID=your_account_id
|
| 56 |
+
CLOUDFLARE_D1_DATABASE_ID=your_d1_database_id
|
| 57 |
+
CLOUDFLARE_R2_BUCKET_NAME=your_r2_bucket
|
| 58 |
+
CLOUDFLARE_KV_NAMESPACE_ID=your_kv_namespace
|
| 59 |
+
|
| 60 |
+
# Enhanced AI model access
|
| 61 |
+
HF_TOKEN=your_huggingface_token
|
| 62 |
+
OPENAI_API_KEY=your_openai_key
|
| 63 |
+
ANTHROPIC_API_KEY=your_anthropic_key
|
| 64 |
+
|
| 65 |
+
# Application configuration
|
| 66 |
+
ENVIRONMENT=production
|
| 67 |
+
LOG_LEVEL=INFO
|
| 68 |
+
SECRET_KEY=your_secret_key
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
Our team members [@Xinbin Liang](https://github.com/mannaandpoem) and [@Jinyu Xiang](https://github.com/XiangJinyu) (core authors), along with [@Zhaoyang Yu](https://github.com/MoshiQAQ), [@Jiayi Zhang](https://github.com/didiforgithub), and [@Sirui Hong](https://github.com/stellaHSR), we are from [@MetaGPT](https://github.com/geekan/MetaGPT). The prototype is launched within 3 hours and we are keeping building!
|
| 72 |
+
|
| 73 |
+
It's a simple implementation, so we welcome any suggestions, contributions, and feedback!
|
| 74 |
+
|
| 75 |
+
Enjoy your own agent with OpenManus!
|
| 76 |
+
|
| 77 |
+
We're also excited to introduce [OpenManus-RL](https://github.com/OpenManus/OpenManus-RL), an open-source project dedicated to reinforcement learning (RL)- based (such as GRPO) tuning methods for LLM agents, developed collaboratively by researchers from UIUC and OpenManus.
|
| 78 |
+
|
| 79 |
+
## Project Demo
|
| 80 |
+
|
| 81 |
+
<video src="https://private-user-images.githubusercontent.com/61239030/420168772-6dcfd0d2-9142-45d9-b74e-d10aa75073c6.mp4?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDEzMTgwNTksIm5iZiI6MTc0MTMxNzc1OSwicGF0aCI6Ii82MTIzOTAzMC80MjAxNjg3NzItNmRjZmQwZDItOTE0Mi00NWQ5LWI3NGUtZDEwYWE3NTA3M2M2Lm1wND9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAzMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMzA3VDAzMjIzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdiZjFkNjlmYWNjMmEzOTliM2Y3M2VlYjgyNDRlZDJmOWE3NWZhZjE1MzhiZWY4YmQ3NjdkNTYwYTU5ZDA2MzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.UuHQCgWYkh0OQq9qsUWqGsUbhG3i9jcZDAMeHjLt5T4" data-canonical-src="https://private-user-images.githubusercontent.com/61239030/420168772-6dcfd0d2-9142-45d9-b74e-d10aa75073c6.mp4?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDEzMTgwNTksIm5iZiI6MTc0MTMxNzc1OSwicGF0aCI6Ii82MTIzOTAzMC80MjAxNjg3NzItNmRjZmQwZDItOTE0Mi00NWQ5LWI3NGUtZDEwYWE3NTA3M2M2Lm1wND9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAzMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMzA3VDAzMjIzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdiZjFkNjlmYWNjMmEzOTliM2Y3M2VlYjgyNDRlZDJmOWE3NWZhZjE1MzhiZWY4YmQ3NjdkNTYwYTU5ZDA2MzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.UuHQCgWYkh0OQq9qsUWqGsUbhG3i9jcZDAMeHjLt5T4" controls="controls" muted="muted" class="d-block rounded-bottom-2 border-top width-fit" style="max-height:640px; min-height: 200px"></video>
|
| 82 |
+
|
| 83 |
+
## Installation
|
| 84 |
+
|
| 85 |
+
We provide two installation methods. Method 2 (using uv) is recommended for faster installation and better dependency management.
|
| 86 |
+
|
| 87 |
+
### Method 1: Using conda
|
| 88 |
+
|
| 89 |
+
1. Create a new conda environment:
|
| 90 |
+
|
| 91 |
+
```bash
|
| 92 |
+
conda create -n open_manus python=3.12
|
| 93 |
+
conda activate open_manus
|
| 94 |
+
```
|
| 95 |
+
|
| 96 |
+
2. Clone the repository:
|
| 97 |
+
|
| 98 |
+
```bash
|
| 99 |
+
git clone https://github.com/FoundationAgents/OpenManus.git
|
| 100 |
+
cd OpenManus
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
3. Install dependencies:
|
| 104 |
+
|
| 105 |
+
```bash
|
| 106 |
+
pip install -r requirements.txt
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
### Method 2: Using uv (Recommended)
|
| 110 |
+
|
| 111 |
+
1. Install uv (A fast Python package installer and resolver):
|
| 112 |
+
|
| 113 |
+
```bash
|
| 114 |
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
2. Clone the repository:
|
| 118 |
+
|
| 119 |
+
```bash
|
| 120 |
+
git clone https://github.com/FoundationAgents/OpenManus.git
|
| 121 |
+
cd OpenManus
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
3. Create a new virtual environment and activate it:
|
| 125 |
+
|
| 126 |
+
```bash
|
| 127 |
+
uv venv --python 3.12
|
| 128 |
+
source .venv/bin/activate # On Unix/macOS
|
| 129 |
+
# Or on Windows:
|
| 130 |
+
# .venv\Scripts\activate
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
+
4. Install dependencies:
|
| 134 |
+
|
| 135 |
+
```bash
|
| 136 |
+
uv pip install -r requirements.txt
|
| 137 |
+
```
|
| 138 |
+
|
| 139 |
+
### Browser Automation Tool (Optional)
|
| 140 |
+
```bash
|
| 141 |
+
playwright install
|
| 142 |
+
```
|
| 143 |
+
|
| 144 |
+
## Configuration
|
| 145 |
+
|
| 146 |
+
OpenManus requires configuration for the LLM APIs it uses. Follow these steps to set up your configuration:
|
| 147 |
+
|
| 148 |
+
1. Create a `config.toml` file in the `config` directory (you can copy from the example):
|
| 149 |
+
|
| 150 |
+
```bash
|
| 151 |
+
cp config/config.example.toml config/config.toml
|
| 152 |
+
```
|
| 153 |
+
|
| 154 |
+
2. Edit `config/config.toml` to add your API keys and customize settings:
|
| 155 |
+
|
| 156 |
+
```toml
|
| 157 |
+
# Global LLM configuration
|
| 158 |
+
[llm]
|
| 159 |
+
model = "gpt-4o"
|
| 160 |
+
base_url = "https://api.openai.com/v1"
|
| 161 |
+
api_key = "sk-..." # Replace with your actual API key
|
| 162 |
+
max_tokens = 4096
|
| 163 |
+
temperature = 0.0
|
| 164 |
+
|
| 165 |
+
# Optional configuration for specific LLM models
|
| 166 |
+
[llm.vision]
|
| 167 |
+
model = "gpt-4o"
|
| 168 |
+
base_url = "https://api.openai.com/v1"
|
| 169 |
+
api_key = "sk-..." # Replace with your actual API key
|
| 170 |
+
```
|
| 171 |
+
|
| 172 |
+
## Quick Start
|
| 173 |
+
|
| 174 |
+
One line for run OpenManus:
|
| 175 |
+
|
| 176 |
+
```bash
|
| 177 |
+
python main.py
|
| 178 |
+
```
|
| 179 |
+
|
| 180 |
+
Then input your idea via terminal!
|
| 181 |
+
|
| 182 |
+
For MCP tool version, you can run:
|
| 183 |
+
```bash
|
| 184 |
+
python run_mcp.py
|
| 185 |
+
```
|
| 186 |
+
|
| 187 |
+
For unstable multi-agent version, you also can run:
|
| 188 |
+
|
| 189 |
+
```bash
|
| 190 |
+
python run_flow.py
|
| 191 |
+
```
|
| 192 |
+
|
| 193 |
+
### Custom Adding Multiple Agents
|
| 194 |
+
|
| 195 |
+
Currently, besides the general OpenManus Agent, we have also integrated the DataAnalysis Agent, which is suitable for data analysis and data visualization tasks. You can add this agent to `run_flow` in `config.toml`.
|
| 196 |
+
|
| 197 |
+
```toml
|
| 198 |
+
# Optional configuration for run-flow
|
| 199 |
+
[runflow]
|
| 200 |
+
use_data_analysis_agent = true # Disabled by default, change to true to activate
|
| 201 |
+
```
|
| 202 |
+
In addition, you need to install the relevant dependencies to ensure the agent runs properly: [Detailed Installation Guide](app/tool/chart_visualization/README.md##Installation)
|
| 203 |
+
|
| 204 |
+
## How to contribute
|
| 205 |
+
|
| 206 |
+
We welcome any friendly suggestions and helpful contributions! Just create issues or submit pull requests.
|
| 207 |
+
|
| 208 |
+
Or contact @mannaandpoem via 📧email: mannaandpoem@gmail.com
|
| 209 |
+
|
| 210 |
+
**Note**: Before submitting a pull request, please use the pre-commit tool to check your changes. Run `pre-commit run --all-files` to execute the checks.
|
| 211 |
+
|
| 212 |
+
## Community Group
|
| 213 |
+
Join our networking group on Feishu and share your experience with other developers!
|
| 214 |
+
|
| 215 |
+
<div align="center" style="display: flex; gap: 20px;">
|
| 216 |
+
<img src="assets/community_group.jpg" alt="OpenManus 交流群" width="300" />
|
| 217 |
+
</div>
|
| 218 |
+
|
| 219 |
+
## Star History
|
| 220 |
+
|
| 221 |
+
[](https://star-history.com/#FoundationAgents/OpenManus&Date)
|
| 222 |
+
|
| 223 |
+
## Sponsors
|
| 224 |
+
Thanks to [PPIO](https://ppinfra.com/user/register?invited_by=OCPKCN&utm_source=github_openmanus&utm_medium=github_readme&utm_campaign=link) for computing source support.
|
| 225 |
+
> PPIO: The most affordable and easily-integrated MaaS and GPU cloud solution.
|
| 226 |
+
|
| 227 |
+
|
| 228 |
+
## Acknowledgement
|
| 229 |
+
|
| 230 |
+
Thanks to [anthropic-computer-use](https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo), [browser-use](https://github.com/browser-use/browser-use) and [crawl4ai](https://github.com/unclecode/crawl4ai) for providing basic support for this project!
|
| 231 |
+
|
| 232 |
+
Additionally, we are grateful to [AAAJ](https://github.com/metauto-ai/agent-as-a-judge), [MetaGPT](https://github.com/geekan/MetaGPT), [OpenHands](https://github.com/All-Hands-AI/OpenHands) and [SWE-agent](https://github.com/SWE-agent/SWE-agent).
|
| 233 |
+
|
| 234 |
+
We also thank stepfun(阶跃星辰) for supporting our Hugging Face demo space.
|
| 235 |
+
|
| 236 |
+
OpenManus is built by contributors from MetaGPT. Huge thanks to this agent community!
|
| 237 |
+
|
| 238 |
+
## Cite
|
| 239 |
+
```bibtex
|
| 240 |
+
@misc{openmanus2025,
|
| 241 |
+
author = {Xinbin Liang and Jinyu Xiang and Zhaoyang Yu and Jiayi Zhang and Sirui Hong and Sheng Fan and Xiao Tang},
|
| 242 |
+
title = {OpenManus: An open-source framework for building general AI agents},
|
| 243 |
+
year = {2025},
|
| 244 |
+
publisher = {Zenodo},
|
| 245 |
+
doi = {10.5281/zenodo.15186407},
|
| 246 |
+
url = {https://doi.org/10.5281/zenodo.15186407},
|
| 247 |
+
}
|
| 248 |
+
```
|
docker-commands.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# OpenManus Docker Commands
|
| 2 |
+
# Build and run the OpenManus platform locally
|
| 3 |
+
|
| 4 |
+
# 1. Build the Docker image locally
|
| 5 |
+
docker build -t openmanus-local .
|
| 6 |
+
|
| 7 |
+
# 2. Run the container locally (recommended)
|
| 8 |
+
docker run -it -p 7860:7860 --platform=linux/amd64 openmanus-local
|
| 9 |
+
|
| 10 |
+
# 3. Run with environment variables (for Cloudflare integration)
|
| 11 |
+
docker run -it -p 7860:7860 --platform=linux/amd64 \
|
| 12 |
+
-e CLOUDFLARE_API_TOKEN="your-token" \
|
| 13 |
+
-e CLOUDFLARE_ACCOUNT_ID="your-account-id" \
|
| 14 |
+
-e CLOUDFLARE_D1_DATABASE_ID="your-d1-id" \
|
| 15 |
+
-e CLOUDFLARE_R2_BUCKET_NAME="your-r2-bucket" \
|
| 16 |
+
-e CLOUDFLARE_KV_NAMESPACE_ID="your-kv-id" \
|
| 17 |
+
-e CLOUDFLARE_DURABLE_OBJECTS_ID="your-durable-objects-id" \
|
| 18 |
+
openmanus-local
|
| 19 |
+
|
| 20 |
+
# 4. Run with volume mounts (for persistent data)
|
| 21 |
+
docker run -it -p 7860:7860 --platform=linux/amd64 \
|
| 22 |
+
-v "${PWD}/data:/home/user/app/data" \
|
| 23 |
+
-v "${PWD}/logs:/home/user/app/logs" \
|
| 24 |
+
openmanus-local
|
| 25 |
+
|
| 26 |
+
# 5. Run in background (daemon mode)
|
| 27 |
+
docker run -d -p 7860:7860 --platform=linux/amd64 --name openmanus openmanus-local
|
| 28 |
+
|
| 29 |
+
# 6. Run from HuggingFace registry - NEW HHH SPACE
|
| 30 |
+
docker run -it -p 7860:7860 --platform=linux/amd64 \
|
| 31 |
+
registry.hf.space/speedofmastery-hhh:latest
|
| 32 |
+
|
| 33 |
+
# 6b. Run from old agnt space (backup)
|
| 34 |
+
docker run -it -p 7860:7860 --platform=linux/amd64 \
|
| 35 |
+
registry.hf.space/speedofmastery-agnt:latest
|
| 36 |
+
|
| 37 |
+
# 7. Debug mode with shell access
|
| 38 |
+
docker run -it --platform=linux/amd64 openmanus-local /bin/bash
|
| 39 |
+
|
| 40 |
+
# 8. Check running containers
|
| 41 |
+
docker ps
|
| 42 |
+
|
| 43 |
+
# 9. Stop the container
|
| 44 |
+
docker stop openmanus
|
| 45 |
+
|
| 46 |
+
# 10. Remove the container
|
| 47 |
+
docker rm openmanus
|
| 48 |
+
|
| 49 |
+
# Access the platform at: http://localhost:7860
|
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
gradio>=4.0
|
requirements_backup.txt
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pydantic~=2.10.6
|
| 2 |
+
openai~=1.66.3
|
| 3 |
+
tenacity~=9.0.0
|
| 4 |
+
pyyaml~=6.0.2
|
| 5 |
+
loguru~=0.7.3
|
| 6 |
+
numpy
|
| 7 |
+
datasets~=3.4.1
|
| 8 |
+
fastapi~=0.115.11
|
| 9 |
+
tiktoken~=0.9.0
|
| 10 |
+
|
| 11 |
+
html2text~=2024.2.26
|
| 12 |
+
gymnasium~=1.1.1
|
| 13 |
+
pillow~=11.1.0
|
| 14 |
+
browsergym~=0.13.3
|
| 15 |
+
uvicorn~=0.34.0
|
| 16 |
+
unidiff~=0.7.5
|
| 17 |
+
browser-use~=0.1.40
|
| 18 |
+
googlesearch-python~=1.3.0
|
| 19 |
+
baidusearch~=1.0.3
|
| 20 |
+
duckduckgo_search~=7.5.3
|
| 21 |
+
|
| 22 |
+
aiofiles~=24.1.0
|
| 23 |
+
pydantic_core~=2.27.2
|
| 24 |
+
colorama~=0.4.6
|
| 25 |
+
playwright~=1.51.0
|
| 26 |
+
|
| 27 |
+
docker~=7.1.0
|
| 28 |
+
pytest~=8.3.5
|
| 29 |
+
pytest-asyncio~=0.25.3
|
| 30 |
+
|
| 31 |
+
mcp~=1.5.0
|
| 32 |
+
httpx>=0.27.0
|
| 33 |
+
tomli>=2.0.0
|
| 34 |
+
|
| 35 |
+
boto3~=1.37.18
|
| 36 |
+
|
| 37 |
+
requests~=2.32.3
|
| 38 |
+
beautifulsoup4~=4.13.3
|
| 39 |
+
crawl4ai~=0.6.3
|
| 40 |
+
|
| 41 |
+
huggingface-hub~=0.29.2
|
| 42 |
+
transformers~=4.46.0
|
| 43 |
+
torch>=2.0.0
|
| 44 |
+
gradio>=4.0,<5.0
|
| 45 |
+
setuptools~=75.8.0
|
| 46 |
+
|
| 47 |
+
# Authentication dependencies
|
| 48 |
+
bcrypt~=4.0.1
|
| 49 |
+
|
| 50 |
+
# Cloudflare integrations - Complete stack
|
| 51 |
+
aiohttp~=3.9.0
|
| 52 |
+
websockets~=12.0
|
| 53 |
+
httpx~=0.25.0
|
| 54 |
+
cloudflare~=2.20.1
|
| 55 |
+
cffi~=1.16.0
|
| 56 |
+
cryptography~=42.0.0
|
| 57 |
+
|
| 58 |
+
# Additional backend dependencies
|
| 59 |
+
asyncio-mqtt~=0.16.2
|
| 60 |
+
aiodns~=3.2.0
|
| 61 |
+
cchardet~=2.1.7
|
| 62 |
+
charset-normalizer~=3.4.0
|
| 63 |
+
python-dotenv~=1.0.0
|
| 64 |
+
|
| 65 |
+
# Essential dependencies for production deployment
|
| 66 |
+
pandas>=1.5.0
|
| 67 |
+
numpy>=1.21.0
|
| 68 |
+
Pillow>=8.0.0
|
| 69 |
+
python-multipart>=0.0.5
|
| 70 |
+
email-validator>=1.1.0
|
| 71 |
+
passlib>=1.7.4
|
| 72 |
+
python-jose>=3.3.0
|
| 73 |
+
|
| 74 |
+
# Additional dependencies for Hugging Face Spaces and models integration
|
| 75 |
+
gradio~=4.44.0
|
| 76 |
+
spaces~=0.19.4
|
requirements_fixed.txt
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Core dependencies
|
| 2 |
+
pydantic>=2.0,<3.0
|
| 3 |
+
fastapi>=0.100.0
|
| 4 |
+
uvicorn>=0.20.0
|
| 5 |
+
gradio>=4.0,<5.0
|
| 6 |
+
|
| 7 |
+
# AI and ML
|
| 8 |
+
huggingface-hub>=0.20.0
|
| 9 |
+
transformers>=4.30.0
|
| 10 |
+
torch>=2.0.0
|
| 11 |
+
datasets>=2.0.0
|
| 12 |
+
numpy>=1.21.0
|
| 13 |
+
pillow>=8.0.0
|
| 14 |
+
|
| 15 |
+
# Authentication and security
|
| 16 |
+
bcrypt>=4.0.0
|
| 17 |
+
python-multipart>=0.0.5
|
| 18 |
+
python-jose>=3.3.0
|
| 19 |
+
passlib>=1.7.4
|
| 20 |
+
|
| 21 |
+
# Async and HTTP
|
| 22 |
+
aiohttp>=3.8.0
|
| 23 |
+
aiofiles>=22.0.0
|
| 24 |
+
httpx>=0.24.0
|
| 25 |
+
websockets>=10.0
|
| 26 |
+
|
| 27 |
+
# Data processing
|
| 28 |
+
pandas>=1.5.0
|
| 29 |
+
pyyaml>=6.0.0
|
| 30 |
+
requests>=2.28.0
|
| 31 |
+
beautifulsoup4>=4.11.0
|
| 32 |
+
|
| 33 |
+
# Logging and utilities
|
| 34 |
+
loguru>=0.7.0
|
| 35 |
+
python-dotenv>=1.0.0
|
| 36 |
+
tenacity>=8.0.0
|
| 37 |
+
colorama>=0.4.0
|
| 38 |
+
|
| 39 |
+
# Cloudflare (optional)
|
| 40 |
+
cloudflare>=2.0.0
|
| 41 |
+
cryptography>=40.0.0
|
| 42 |
+
|
| 43 |
+
# Additional utilities
|
| 44 |
+
setuptools>=60.0.0
|
requirements_new.txt
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Core framework - compatible versions
|
| 2 |
+
fastapi>=0.100.0,<0.116.0
|
| 3 |
+
uvicorn>=0.20.0,<0.35.0
|
| 4 |
+
pydantic>=2.0,<3.0
|
| 5 |
+
starlette>=0.35.0,<0.42.0
|
| 6 |
+
|
| 7 |
+
# Gradio and UI - stable version
|
| 8 |
+
gradio>=4.0,<5.0
|
| 9 |
+
|
| 10 |
+
# HTTP and networking - core only
|
| 11 |
+
httpx>=0.25.0,<0.29.0
|
| 12 |
+
requests>=2.28.0,<2.33.0
|
| 13 |
+
|
| 14 |
+
# Database - minimal setup
|
| 15 |
+
bcrypt>=4.0.0,<5.0.0
|
| 16 |
+
|
| 17 |
+
# AI essentials - lightweight
|
| 18 |
+
openai>=1.0.0,<2.0.0
|
| 19 |
+
huggingface-hub>=0.20.0,<1.0.0
|
| 20 |
+
|
| 21 |
+
# Basic utilities
|
| 22 |
+
python-dotenv>=1.0.0,<2.0.0
|
| 23 |
+
pyyaml>=6.0,<7.0
|
| 24 |
+
python-multipart>=0.0.6
|
| 25 |
+
|
| 26 |
+
# System utilities
|
| 27 |
+
pillow>=10.0.0
|
| 28 |
+
numpy>=1.20.0
|
| 29 |
+
|
| 30 |
+
# Additional basics
|
| 31 |
+
typing-extensions>=4.0.0
|
| 32 |
+
loguru>=0.7.0
|
| 33 |
+
tenacity>=8.0.0
|
schema.sql
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-- OpenManus Database Schema for Cloudflare D1
|
| 2 |
+
|
| 3 |
+
-- Users table to store user information
|
| 4 |
+
CREATE TABLE IF NOT EXISTS users (
|
| 5 |
+
id TEXT PRIMARY KEY,
|
| 6 |
+
mobile_number TEXT UNIQUE NOT NULL,
|
| 7 |
+
full_name TEXT NOT NULL,
|
| 8 |
+
password_hash TEXT NOT NULL,
|
| 9 |
+
avatar_url TEXT,
|
| 10 |
+
preferences TEXT, -- JSON string for user preferences
|
| 11 |
+
is_active BOOLEAN DEFAULT TRUE,
|
| 12 |
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
| 13 |
+
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
| 14 |
+
);
|
| 15 |
+
|
| 16 |
+
-- Sessions table to store user sessions
|
| 17 |
+
CREATE TABLE IF NOT EXISTS sessions (
|
| 18 |
+
id TEXT PRIMARY KEY,
|
| 19 |
+
user_id TEXT NOT NULL,
|
| 20 |
+
title TEXT,
|
| 21 |
+
metadata TEXT, -- JSON string for session metadata
|
| 22 |
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
| 23 |
+
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
| 24 |
+
expires_at DATETIME,
|
| 25 |
+
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
| 26 |
+
);
|
| 27 |
+
|
| 28 |
+
-- Conversations table to store chat messages
|
| 29 |
+
CREATE TABLE IF NOT EXISTS conversations (
|
| 30 |
+
id TEXT PRIMARY KEY,
|
| 31 |
+
session_id TEXT NOT NULL,
|
| 32 |
+
role TEXT NOT NULL, -- 'user', 'assistant', 'system'
|
| 33 |
+
content TEXT NOT NULL,
|
| 34 |
+
metadata TEXT, -- JSON string for message metadata (files, tools used, etc.)
|
| 35 |
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
| 36 |
+
FOREIGN KEY (session_id) REFERENCES sessions(id) ON DELETE CASCADE
|
| 37 |
+
);
|
| 38 |
+
|
| 39 |
+
-- Files table to store uploaded file information
|
| 40 |
+
CREATE TABLE IF NOT EXISTS files (
|
| 41 |
+
id TEXT PRIMARY KEY,
|
| 42 |
+
user_id TEXT NOT NULL,
|
| 43 |
+
session_id TEXT,
|
| 44 |
+
filename TEXT NOT NULL,
|
| 45 |
+
content_type TEXT,
|
| 46 |
+
size INTEGER,
|
| 47 |
+
r2_key TEXT NOT NULL, -- Key in R2 storage
|
| 48 |
+
bucket TEXT NOT NULL, -- Which R2 bucket
|
| 49 |
+
metadata TEXT, -- JSON string for file metadata
|
| 50 |
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
| 51 |
+
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
| 52 |
+
FOREIGN KEY (session_id) REFERENCES sessions(id) ON DELETE SET NULL
|
| 53 |
+
);
|
| 54 |
+
|
| 55 |
+
-- Agents table to store agent configurations
|
| 56 |
+
CREATE TABLE IF NOT EXISTS agents (
|
| 57 |
+
id TEXT PRIMARY KEY,
|
| 58 |
+
user_id TEXT NOT NULL,
|
| 59 |
+
name TEXT NOT NULL,
|
| 60 |
+
description TEXT,
|
| 61 |
+
system_prompt TEXT,
|
| 62 |
+
model TEXT,
|
| 63 |
+
tools TEXT, -- JSON array of enabled tools
|
| 64 |
+
config TEXT, -- JSON configuration object
|
| 65 |
+
is_active BOOLEAN DEFAULT TRUE,
|
| 66 |
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
| 67 |
+
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
| 68 |
+
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
| 69 |
+
);
|
| 70 |
+
|
| 71 |
+
-- Agent sessions table for durable object session tracking
|
| 72 |
+
CREATE TABLE IF NOT EXISTS agent_sessions (
|
| 73 |
+
id TEXT PRIMARY KEY,
|
| 74 |
+
agent_id TEXT NOT NULL,
|
| 75 |
+
user_id TEXT NOT NULL,
|
| 76 |
+
session_id TEXT NOT NULL,
|
| 77 |
+
durable_object_id TEXT, -- ID of the corresponding durable object
|
| 78 |
+
status TEXT DEFAULT 'active', -- 'active', 'paused', 'completed', 'error'
|
| 79 |
+
metadata TEXT, -- JSON string for session state
|
| 80 |
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
| 81 |
+
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
| 82 |
+
FOREIGN KEY (agent_id) REFERENCES agents(id) ON DELETE CASCADE,
|
| 83 |
+
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
| 84 |
+
FOREIGN KEY (session_id) REFERENCES sessions(id) ON DELETE CASCADE
|
| 85 |
+
);
|
| 86 |
+
|
| 87 |
+
-- Usage tracking table for monitoring and analytics
|
| 88 |
+
CREATE TABLE IF NOT EXISTS usage_logs (
|
| 89 |
+
id TEXT PRIMARY KEY,
|
| 90 |
+
user_id TEXT NOT NULL,
|
| 91 |
+
session_id TEXT,
|
| 92 |
+
agent_id TEXT,
|
| 93 |
+
action TEXT NOT NULL, -- 'chat', 'upload', 'tool_use', etc.
|
| 94 |
+
resource_type TEXT, -- 'd1', 'r2', 'kv', 'durable_object'
|
| 95 |
+
resource_id TEXT,
|
| 96 |
+
tokens_used INTEGER DEFAULT 0,
|
| 97 |
+
duration_ms INTEGER DEFAULT 0,
|
| 98 |
+
cost_cents INTEGER DEFAULT 0,
|
| 99 |
+
metadata TEXT, -- JSON string for additional details
|
| 100 |
+
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
| 101 |
+
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
| 102 |
+
FOREIGN KEY (session_id) REFERENCES sessions(id) ON DELETE SET NULL,
|
| 103 |
+
FOREIGN KEY (agent_id) REFERENCES agents(id) ON DELETE SET NULL
|
| 104 |
+
);
|
| 105 |
+
|
| 106 |
+
-- Create indexes for better performance
|
| 107 |
+
CREATE INDEX IF NOT EXISTS idx_users_mobile_number ON users(mobile_number);
|
| 108 |
+
CREATE INDEX IF NOT EXISTS idx_sessions_user_id ON sessions(user_id);
|
| 109 |
+
CREATE INDEX IF NOT EXISTS idx_sessions_created_at ON sessions(created_at);
|
| 110 |
+
CREATE INDEX IF NOT EXISTS idx_conversations_session_id ON conversations(session_id);
|
| 111 |
+
CREATE INDEX IF NOT EXISTS idx_conversations_created_at ON conversations(created_at);
|
| 112 |
+
CREATE INDEX IF NOT EXISTS idx_files_user_id ON files(user_id);
|
| 113 |
+
CREATE INDEX IF NOT EXISTS idx_files_session_id ON files(session_id);
|
| 114 |
+
CREATE INDEX IF NOT EXISTS idx_files_created_at ON files(created_at);
|
| 115 |
+
CREATE INDEX IF NOT EXISTS idx_agents_user_id ON agents(user_id);
|
| 116 |
+
CREATE INDEX IF NOT EXISTS idx_agent_sessions_user_id ON agent_sessions(user_id);
|
| 117 |
+
CREATE INDEX IF NOT EXISTS idx_agent_sessions_session_id ON agent_sessions(session_id);
|
| 118 |
+
CREATE INDEX IF NOT EXISTS idx_usage_logs_user_id ON usage_logs(user_id);
|
| 119 |
+
CREATE INDEX IF NOT EXISTS idx_usage_logs_created_at ON usage_logs(created_at);
|
| 120 |
+
|
| 121 |
+
-- Insert a default system user for system-level operations
|
| 122 |
+
INSERT OR IGNORE INTO users (id, mobile_number, full_name, password_hash)
|
| 123 |
+
VALUES ('system', '0000000000', 'OpenManus System', 'system_hash');
|
| 124 |
+
|
| 125 |
+
-- Insert a default agent configuration
|
| 126 |
+
INSERT OR IGNORE INTO agents (id, user_id, name, description, system_prompt, model, tools)
|
| 127 |
+
VALUES (
|
| 128 |
+
'default-agent',
|
| 129 |
+
'system',
|
| 130 |
+
'OpenManus Assistant',
|
| 131 |
+
'Default OpenManus AI assistant with full capabilities',
|
| 132 |
+
'You are OpenManus, an intelligent AI assistant with access to various tools and services. You help users with a wide range of tasks including file management, data analysis, web browsing, and more. Always be helpful, accurate, and concise in your responses.',
|
| 133 |
+
'gpt-4-turbo-preview',
|
| 134 |
+
'["file_operations", "web_search", "data_analysis", "browser_use", "python_execute"]'
|
| 135 |
+
);
|
start.sh
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# OpenManus Platform - Linux Startup Script
|
| 4 |
+
|
| 5 |
+
echo "🐧 Starting OpenManus Platform on Linux..."
|
| 6 |
+
|
| 7 |
+
# Create necessary directories
|
| 8 |
+
mkdir -p logs data cache
|
| 9 |
+
|
| 10 |
+
# Set proper permissions
|
| 11 |
+
chmod +x app.py
|
| 12 |
+
|
| 13 |
+
# Check Python and show system info
|
| 14 |
+
echo "� System Information:"
|
| 15 |
+
echo "Python version: $(python3 --version)"
|
| 16 |
+
echo "Working directory: $(pwd)"
|
| 17 |
+
echo "User: $(whoami)"
|
| 18 |
+
|
| 19 |
+
# List files to verify everything is in place
|
| 20 |
+
echo "� Files in directory:"
|
| 21 |
+
ls -la
|
| 22 |
+
|
| 23 |
+
# Start the application
|
| 24 |
+
echo "🚀 Launching OpenManus Platform..."
|
| 25 |
+
exec python3 app.py
|