🚀 Complete AI session management solution with multi-version architecture evolution
Samay is a comprehensive multi-agent AI assistant platform that has evolved through multiple architectural approaches to solve the persistent problem of maintaining authenticated sessions across multiple AI services. From browser automation to native applications to browser extensions, each version has pushed the boundaries of AI service integration.
Samay/
├── samay-v3/ # Core session manager (Python + SeleniumBase)
│ ├── orchestrator/ # Main driver and validation logic
│ ├── otp_service/ # Automated OTP handling
│ ├── profiles/ # Persistent browser profiles
│ └── frontend/ # React-based UI dashboard
├── samay-v4/ # Desktop automation approach (PyAutoGUI)
│ ├── desktop_automation/ # Platform-specific automation
│ ├── orchestrator/ # Desktop service management
│ └── frontend/ # Enhanced React UI
├── samay-v5/ # Hybrid API + Browser automation
│ ├── ai_automation/ # Advanced automation strategies
│ ├── backend/ # FastAPI with authentication
│ ├── core/ # API managers and response synthesis
│ └── frontend/ # Modern React dashboard
├── samay-v6/ # Browser extension architecture (Current)
│ ├── extension/ # Chrome Manifest V3 extension
│ ├── web-app/ # React frontend + FastAPI backend
│ └── automation/ # Service-specific automation scripts
├── Samay_MacOS/ # Native macOS application experiment
│ ├── Samay_MacOS/ # SwiftUI native application
│ ├── Swift automation/ # Accessibility API integration
│ └── System integrations/ # Calendar, Mail, Weather services
├── INFORMATION/ # Project documentation & research
├── test-results/ # Testing artifacts
└── README.md # This file
- Anti-bot protection with SeleniumBase UC Mode
- Persistent sessions across computer restarts
- Automated OTP fetching via Gmail API
- Multi-service support (Claude, Gemini, Perplexity)
- Status: Production ready, stable session management
- PyAutoGUI-based screen automation
- Desktop application targeting (Claude Desktop, etc.)
- Cross-platform automation with macOS focus
- Enhanced response processing and aggregation
- Status: Prototype phase, platform-specific challenges
- Dual-mode operation: API integration + browser fallback
- Advanced authentication management with credential storage
- Rate limiting and API quota management
- Weather & News APIs integration for context
- Modern FastAPI backend with React dashboard
- Status: Feature-complete, API cost considerations
- Chrome Manifest V3 extension with zero API costs
- Bridge communication between web app and extension
- Service-specific automation scripts for each AI platform
- Real-time response extraction and synthesis
- Cross-origin communication with security compliance
- Status: Active development, query submission phase complete
- SwiftUI native interface with system integration
- Accessibility API automation for precise control
- System services integration (Calendar, Mail, Weather)
- Menu bar application with background operation
- Apple Events and AppleScript automation
- Status: Research prototype, TCC permission challenges
- Multi-architecture analysis and performance comparisons
- Anti-bot detection research across all approaches
- Platform-specific implementation strategies
- Security and privacy considerations for each architecture
- Python 3.8+ with conda environment (v3, v4, v5)
- Node.js 16+ for React UI (all versions)
- Chrome browser for automation and extension
- Xcode for macOS native development (Samay MacOS)
# Clone the repository
git clone https://github.com/akshitharsola/Samay.git
cd Samay/samay-v6
# Backend setup
cd web-app/backend
python -m venv venv
source venv/bin/activate # Linux/Mac
pip install -r requirements.txt
python main_simple.py
# Frontend setup (new terminal)
cd web-app/frontend
npm install
npm start
# Extension setup
# 1. Open chrome://extensions/
# 2. Enable Developer mode
# 3. Load unpacked: samay-v6/extension/cd Samay/samay-v5
# Backend setup
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python main.py
# Frontend setup
cd frontend
npm install
npm startcd Samay/samay-v3
source /opt/anaconda3/bin/activate samay
pip install -r requirements.txt
# Set up the React UI
cd frontend
npm installcd Samay/Samay_MacOS
# Open Samay_MacOS.xcodeproj in Xcode
# Build and run (requires macOS development setup)-
Environment Setup
# Copy and edit .env file cp samay-v3/.env.example samay-v3/.env # Add your email and proxy settings
-
Gmail API Setup
- Create Google Cloud project
- Enable Gmail API
- Download credentials.json
- Place in
samay-v3/otp_service/secrets/
-
First Run
# Start the session manager cd samay-v3 python orchestrator/manager.py # In another terminal, start the UI cd frontend npm start
- UC Mode generated profiles survive restarts
- Automatic session validation and recovery
- Cross-platform compatibility (macOS focus)
- Advanced fingerprint spoofing
- Human-like interaction patterns
- Residential proxy support
- Zero-touch OTP retrieval
- Intelligent session monitoring
- Automatic re-authentication flows
- Claude (Anthropic)
- Gemini (Google)
- Perplexity AI
- Extensible architecture for new services
This project uses Ollama for local AI processing and model management.
Note: Ollama model files are not included in this repository due to size constraints (typically 4-7GB per model). You need to install Ollama separately and pull the required models:
# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh
# Pull recommended models for this project
ollama pull llama2 # General purpose
ollama pull codellama # Code assistance
ollama pull mistral # Lightweight alternativeRecommended Models for MacBook Air M2 8GB:
- llama2:7b - Best balance of performance and memory usage
- mistral:7b - Fast inference, good for quick responses
- codellama:7b - Specialized for code-related tasks
- RAM: 8GB minimum (16GB recommended for larger models)
- Storage: 20GB+ free space for models and profiles
- CPU: Apple Silicon M1/M2 (Intel compatible but slower)
- Network: Stable internet for API calls and model downloads
-
Profile Issues
# Reset corrupted profiles cd samay-v3 python orchestrator/manager.py # → Option 5: Reset service
-
OTP Not Working
# Test Gmail API connection python otp_service/gmail_fetcher.py # → Option 1: Test connection
-
UI Connection Issues
# Check backend API status cd samay-v3 python web_api.py # Should start on http://localhost:5000
| Feature | v3 | v4 | v5 | v6 | MacOS |
|---|---|---|---|---|---|
| Session Management | ✅ Production | ✅ Working | ✅ Advanced | ✅ Bridge-based | 🔄 Research |
| Query Submission | ✅ Stable | ✅ Working | ✅ Dual-mode | ✅ Complete | 🔄 Prototype |
| Response Extraction | ✅ Working | ✅ Enhanced | ✅ Advanced | 🔄 In Progress | 🔄 Basic |
| Anti-Bot Protection | ✅ Advanced | ✅ Improved | ✅ Extension-based | ✅ Native | |
| API Integration | ❌ None | ❌ None | ✅ Full | ❌ Zero-cost | 🔄 System APIs |
| Cross-Platform | ✅ Yes | ✅ Yes | ✅ Chrome-based | ❌ macOS only | |
| Cost | 🆓 Free | 🆓 Free | 💰 API costs | 🆓 Zero cost | 🆓 Free |
- ✅ Query Submission Phase - Complete (All 4 services)
- 🔄 Response Extraction - Next milestone
- 🔄 Data Synthesis - Planned
- 🔄 Follow-up Automation - Future
- 🔄 Export Features - Future
- v3: Proven session persistence, but maintenance intensive
- v4: Desktop automation limitations, platform dependencies
- v5: Feature-rich but API costs prohibitive
- v6: Zero-cost solution with extension architecture
- MacOS: Native integration potential, permission complexity
When properly configured:
- Browser opens with persistent profiles (not guest mode)
- Sessions survive computer restarts (no re-login required)
- Health check shows all services active
- OTP codes retrieved automatically
- UI dashboard shows real-time status
INFORMATION/- Multi-version research and implementation plansPROJECT_STATUS_REPORT_03082025.md- Latest v6 development status- Version-specific READMEs - Individual setup and usage guides
- Research Findings - Anti-bot detection and automation solutions
- Architecture Analysis - Multi-version comparison and lessons learned
See PROJECT_STATUS_REPORT_03082025.md for:
- Complete v6 implementation status
- Query submission milestone achievement
- Next phase roadmap (response extraction)
- Technical architecture details
- User's modularization insights
This is a research project exploring multiple AI automation architectures. Each version represents different approaches to the same challenge. Feel free to explore, learn from, and adapt any approach for your needs.
MIT License - see individual component directories for specific licensing.
- Production Stability:
cd samay-v3 && python orchestrator/manager.py - Feature Rich:
cd samay-v5 && python backend/main.py - Current Development:
cd samay-v6 && npm start(see setup above) - Native macOS: Open
Samay_MacOS/Samay_MacOS.xcodeprojin Xcode
Latest Achievement: ✅ Samay v6 successfully submits queries to all 4 AI services (Aug 2025)
Built with ❤️ through continuous architectural evolution and experimentation