A powerful dual-AI system with an intelligent routing engine and beautiful dark-themed interface
A sophisticated AI assistant that intelligently routes requests between Google Gemini (fast Q&A) and OpenClaw (your own self-hosted AI automation agent) to provide the best possible response for every query.
- Smart Detection: Automatically routes to the best AI for each task
- π΅ Gemini Integration: Handles Q&A, explanations, calculations, and general knowledge
- π OpenClaw Integration: Your self-hosted AI agent for automation, emails, and complex workflows
- Sidebar Mode Tabs: Manually switch between Gemini and OpenClaw with one click
- Confidence Scoring: Score-based routing system (95%+ accuracy)
- Graceful Fallbacks: If OpenClaw is unreachable, automatically falls back to Gemini
- π¨ Beautiful Dark Theme: Professional UI with purple accents
- πΎ Chat History: Persistent conversations with localStorage
- π Markdown Support: Full markdown rendering with syntax highlighting
- π One-Click Copy: Copy messages and code blocks instantly
- ποΈ Chat Management: Delete conversations with confirmation
- β‘ Real-time Updates: Streaming responses from both AIs
- WCAG 2.1 AA Compliant: Semantic HTML5 and ARIA labels
- β¨οΈ Full Keyboard Navigation: Tab through all elements
- π± Mobile Responsive: Optimized for all screen sizes
- π Screen Reader Support: Comprehensive accessibility features
- ποΈ High Contrast: Easy-to-read color combinations
Ctrl/Cmd + K- Start new chatEscape- Clear input fieldCtrl/Cmd + /- Focus message inputEnter- Send message
- Sidebar with searchable chat history
- Message timestamps
- AI badge indicators (Gemini π΅ / OpenClaw π )
- AI mode tabs in sidebar (switch between Gemini and OpenClaw)
- OpenClaw connection status indicator (green/red dot)
- OpenClaw settings panel (enter your VPS URL and token)
- Loading states with animations
- Example queries for quick start
- Auto-scroll to latest messages
- Code syntax highlighting (Atom One Dark theme)
# Clone the repository
git clone https://github.com/GetwaveS201/manus-proxy.git
cd manus-proxy
# Install dependencies
npm install
# Copy environment template
cp .env.example .env
# Edit .env and add your API keys
nano .env # or use your preferred editorCopy .env.example to .env and fill in:
GEMINI_API_KEY=your_gemini_key
OPENCLAW_URL=http://your-vps-ip:18789 # Your OpenClaw server URL
OPENCLAW_TOKEN=your_openclaw_token # Optional bearer token
PORT=3000Note: OpenClaw URL and token can also be set directly in the app's sidebar β Settings panel (saved in your browser).
npm startServer runs at http://localhost:3000
Send a message to the AI assistant (public endpoint, no authentication required).
Request:
curl -X POST https://manus-proxy-1.onrender.com/chat \
-H "Content-Type: application/json" \
-d '{
"prompt": "What is machine learning?",
"ai": "gemini",
"openclawUrl": "http://your-vps:18789",
"openclawToken": "optional-token"
}'Success Response:
{
"response": "Machine learning is a subset of artificial intelligence...",
"ai": "gemini",
"routing": {
"ai": "gemini",
"confidence": 95,
"scores": {
"gemini": 95,
"openclaw": 5
}
}
}Check if your OpenClaw instance is reachable.
curl -X POST https://manus-proxy-1.onrender.com/ping-openclaw \
-H "Content-Type: application/json" \
-d '{"openclawUrl": "http://your-vps:18789", "openclawToken": ""}'Response: {"reachable": true} or {"reachable": false, "reason": "Connection refused"}
Serves the frontend chat interface.
Health check endpoint (requires API key header).
- Push to GitHub
- Connect repository in Render Dashboard
- Add environment variables in Render settings
- Deploy!
Auto-deploy: Enabled on main branch
Live URL: https://manus-proxy-1.onrender.com
User Request
β
Smart Router (analyzes prompt)
β
ββ Gemini API (fast, free)
β - Q&A questions
β - Explanations
β - Simple greetings
β
ββ Manus API (powerful, paid)
- Data processing
- Research tasks
- Content creation
- Calculations
Routes to Gemini:
- Q&A: "What is...", "How does...", "Explain..."
- Greetings: "hi", "hello", "thanks"
- Short messages (β€3 words)
Routes to Manus:
- Execution: "Calculate", "Find", "Create", "Build"
- Research: "Compare", "Analyze", "Summarize"
- Data tasks: CSV processing, calculations
- Default: Any unclear requests
All API endpoints require X-API-Key header (except in development).
X-API-Key: your_app_api_key- 100 requests per 15 minutes per IP
- Prevents credit drain attacks
NEVER commit:
.envfiles- API keys
- Secrets
Always use environment variables for sensitive data.
The system provides user-friendly error messages:
Gemini Quota Exceeded:
{
"error": "β οΈ Gemini API quota exceeded...",
"technical_error": "GEMINI_QUOTA_EXCEEDED"
}Manus Credits Exhausted:
{
"error": "β οΈ Manus AI credits exhausted...",
"technical_error": "MANUS_CREDITS_EXCEEDED"
}manus-proxy/
βββ server.js # Main application
βββ package.json # Dependencies
βββ .env.example # Environment template
βββ .gitignore # Git ignore rules
βββ README.md # This file
βββ docs/
βββ DEPLOYMENT_SUCCESS.md
βββ PERFORMANCE_REPORT_RESPONSE.md
βββ COMPLETE_SESSION_SUMMARY.md
- Create feature branch
- Make changes
- Test locally
- Commit and push
- Auto-deploys to Render
npm test # Coming soonCurrent Performance:
- ~90% queries use Gemini (free)
- ~10% queries use OpenClaw (your own self-hosted VPS β no per-query cost!)
- Massive savings vs paid AI APIs β OpenClaw runs on your own infrastructure
OpenClaw Cost:
- One-time VPS cost (e.g. $5-20/month for a server)
- No per-query API fees
- Full control over your data and privacy
Gemini Pricing:
- Free tier: sufficient for most Q&A usage
- Paid tier: ~$0.075 per 1M tokens if you exceed the free tier
Gemini: Quotas reset daily at midnight PT. Upgrade to paid tier for higher limits.
Manus: Add credits at https://manus.ai/pricing
- Check Render logs in dashboard
- Verify environment variables are set
- Check API key validity
Adjust triggers in server.js chooseAI() function.
- 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
MIT
- GitHub Issues: https://github.com/GetwaveS201/manus-proxy/issues
- Render Dashboard: https://dashboard.render.com
- OpenClaw Docs: https://docs.openclaw.ai
- Gemini Docs: https://ai.google.dev/docs
Built with:
- Gemini AI - Fast conversational AI
- OpenClaw - Self-hosted AI automation agent
- Express.js - Web framework
- Render - Hosting platform