Fully Autonomous Cross-Domain AI Assistant
The AI Employee Vault is a fully autonomous, cross-domain AI assistant that manages personal and business tasks with minimal human intervention. It processes emails, WhatsApp messages, generates CEO briefings, manages social media, and maintains complete audit trailsβall while requiring approval only for sensitive actions.
Key Achievement: True autonomous operation across 3 domains (Personal, Business, Social) with error recovery, comprehensive audit logging, and production-ready reliability.
- 90% automation - Most tasks completed without human intervention
- Ralph Wiggum Loop - Self-correcting multi-step execution
- State persistence - Resume interrupted tasks
- Smart routing - Automatic skill selection based on file type
- Auto-restart - Watchers restart automatically on crash (3 retries, 60s delay)
- Graceful degradation - System continues if one component fails
- Alert generation - Human notified after max retries
- Health monitoring - Checks every 1 minute
- Structured JSON logs - Every action tracked with metadata
- Performance metrics - Duration tracking for all operations
- Approval status - Complete approval workflow history
- Error tracking - Full context for failures
- Stuck task detection - Alerts for tasks pending > 30 minutes
- β Email - Gmail monitoring, auto-draft replies, send via API
- β WhatsApp - Message detection, auto-draft responses, browser automation
- β File Drops - Real-time Inbox monitoring, instant processing
- β CEO Briefing - Weekly executive summary with revenue, tasks, bottlenecks
- β LinkedIn - Professional content generation and posting
- β Cost Optimization - Automatic detection of duplicate subscriptions
- β Facebook - Post generation and browser automation
- β Instagram - Visual content with 30 hashtags
- β Twitter/X - 280-character posts with validation
- β Weekly Analytics - Engagement metrics and recommendations
- Human-in-the-loop - All sensitive actions require approval
- Folder-based workflow - Simple move files to approve/reject
- DRY_RUN mode - Test without executing
- Complete audit trail - Every action logged
- Credentials secured - Environment variables, never hardcoded
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ORCHESTRATOR β
β Central Coordination Hub β
β β’ Watcher Management β’ Health Monitoring β
β β’ Skill Dispatch β’ Scheduling β
βββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββΌββββββββββββββ
βΌ βΌ βΌ
βββββββββββ βββββββββββ βββββββββββ
βWATCHERS β β QUEUE β βSCHEDULERβ
β β β β β β
β Gmail βββΆβ Needs_ ββββ CEO β
βWhatsApp β β Action/ β β Brief β
βFiles β β β β Social β
βββββββββββ ββββββ¬βββββ βββββββββββ
β
βΌ
ββββββββββββββββ
β RALPH LOOP β
β Autonomous β
β Execution β
ββββββββ¬ββββββββ
β
βββββββββββββββΌββββββββββββββ
βΌ βΌ βΌ
βββββββββββ βββββββββββ βββββββββββ
βPERSONAL β βBUSINESS β β SOCIAL β
βEmail β βLinkedIn β βFacebook β
βWhatsApp β βBriefing β βInstagramβ
βFiles β βInvoices β βTwitter β
βββββββββββ βββββββββββ βββββββββββ
β
βΌ
ββββββββββββββββ
β APPROVAL β
β (HITL) β
ββββββββ¬ββββββββ
β
βΌ
ββββββββββββββββ
β DONE β
β (Archive) β
ββββββββββββββββ
See ARCHITECTURE.md for detailed system design.
- Python 3.12+
- Node.js 18+
- Chrome/Chromium
- 2GB RAM, 10GB disk
# 1. Clone repository
git clone [your-repo-url]
cd AI_Employee_Vault
# 2. Install Python dependencies
pip install -r requirements.txt
# 3. Install Node dependencies for MCPs
cd mcp/email && npm install && cd ../..
cd mcp/browser-linkedin && npm install && cd ../..
cd mcp/browser-fb-ig && npm install && cd ../..
cd mcp/browser-twitter && npm install && cd ../..
cd mcp/whatsapp-mcp && npm install && cd ../..
# 4. Install Playwright browsers
npx playwright install chromium
# 5. Configure environment
cp .env.example .env
# Edit .env with your credentials
# 6. Test system
python check_status.py
# 7. Start orchestrator
python orchestrator.py# Test file processing (instant)
echo "Test file" > Inbox/test.txt
# Check Dashboard
cat Dashboard.md
# Check audit logs
cat Logs/$(date +%Y-%m-%d)_audit.json
# Test CEO briefing
python ralph_loop.py "Use generate-ceo-briefing skill" \
--completion-promise "CEO_BRIEFING_COMPLETE" \
--max-iterations 5| Document | Purpose | Size |
|---|---|---|
| README.md | This file - Overview and quick start | 5KB |
| ARCHITECTURE.md | Complete system architecture | 25KB |
| LESSONS_LEARNED.md | 20 real implementation challenges | 15KB |
| DEMO_FLOW.md | Step-by-step demo script | 12KB |
| SUBMISSION.md | Hackathon submission guide | 10KB |
| QUICKSTART_GOLD.md | 5-minute setup guide | 5KB |
[00:00] Email arrives with "URGENT" in subject
[00:30] Gmail watcher creates EMAIL_*.md β Needs_Action/
[00:31] Orchestrator detects and triggers triage-email skill
[01:00] Ralph loop drafts reply β Pending_Approval/
[Manual] Human reviews and moves to Approved/
[02:00] Email sent via Gmail API
[02:01] Complete audit trail logged
[00:00] Trigger generate-ceo-briefing skill
[00:30] Scans Done/ folder, reads accounting data
[01:00] Generates executive summary with revenue, tasks, bottlenecks
[01:10] Flags duplicate subscriptions for cost optimization
[01:15] Briefing saved to Briefings/ folder
[00:00] Generate posts for LinkedIn, Facebook, Instagram, Twitter
[01:00] Platform-specific content optimization
[02:00] Approve LinkedIn post β Approved/
[02:30] Browser opens, navigates to LinkedIn, fills content
[03:00] Human clicks "Post", result logged
See DEMO_FLOW.md for complete demo script.
- Email detection: ~2 minutes (Gmail API polling)
- WhatsApp detection: ~30 seconds (WhatsApp polling)
- File drop detection: <1 second (real-time)
- Skill execution: 10-60 seconds
- End-to-end: 2-5 minutes
- Uptime target: 99.5%
- Auto-restart: 3 retries with 60s delay
- Health checks: Every 1 minute
- Stuck task detection: Every 15 minutes
- Total RAM: ~300 MB
- Total CPU: <10%
- Disk: ~100 MB/day (logs + archives)
- 3 domains: Personal, Business, Social
- 5 MCP servers: Email, LinkedIn, WhatsApp, FB/IG, Twitter
- 15+ skills: Processing, generation, execution
- 4 social platforms: LinkedIn, Facebook, Instagram, Twitter/X
- Python 3.12+ - Main language
- Claude 3.5 Sonnet - AI model via Claude CLI
- MCP Protocol - Tool integration
- Playwright - Browser automation
- Watchdog - Filesystem monitoring
- Schedule - Task scheduling
- Gmail API - Email integration
- WhatsApp Web - Messaging (browser automation)
- Meta Graph API - Facebook/Instagram (fallback to browser)
- Twitter API v2 - Twitter/X (fallback to browser)
- JSON - Audit logs
- Markdown - Queue files, archives
- Filesystem - No database required
AI_Employee_Vault/
βββ orchestrator.py # Central orchestrator
βββ audit_log.py # Audit logging system
βββ ralph_loop.py # Autonomous execution loop
β
βββ gmail_watcher.py # Email monitoring
βββ whatsapp_watcher.py # WhatsApp monitoring
βββ filesystem_watcher.py # File drop monitoring
βββ generate_briefing.py # CEO briefing generator
β
βββ .claude/skills/ # Agent Skills (15+)
β βββ process-needs-action/
β βββ triage-email/
β βββ process-whatsapp-message/
β βββ post-linkedin/
β βββ post-facebook/
β βββ post-instagram/
β βββ post-twitter/
β βββ generate-ceo-briefing/
β βββ send-approved-*/
β
βββ mcp/ # MCP Servers (5)
β βββ email/ # Gmail MCP (Node.js)
β βββ browser-linkedin/ # LinkedIn browser automation
β βββ whatsapp-mcp/ # WhatsApp Web automation
β βββ browser-fb-ig/ # Facebook/Instagram automation
β βββ browser-twitter/ # Twitter/X automation
β
βββ Needs_Action/ # Processing queue
βββ Pending_Approval/ # Awaiting approval
βββ Approved/ # Ready for execution
βββ Done/ # Completed archive
βββ Logs/ # Audit logs
βββ Briefings/ # CEO briefings
β
βββ Documentation/
βββ README.md
βββ ARCHITECTURE.md
βββ LESSONS_LEARNED.md
βββ DEMO_FLOW.md
βββ SUBMISSION.md
# Gmail
GMAIL_CLIENT_ID=your_client_id
GMAIL_CLIENT_SECRET=your_client_secret
# Social Media (optional - uses browser automation)
DRY_RUN=true # Set to false for live posting{
"mcpServers": {
"email-mcp": {
"command": "node",
"args": ["mcp/email/index.js"],
"env": {
"GMAIL_CREDENTIALS_PATH": "secure/gmail_credentials.json",
"GMAIL_TOKEN_PATH": "secure/gmail_token.json",
"DRY_RUN": "true"
}
},
"browser-linkedin": { "command": "node", "args": ["mcp/browser-linkedin/index.js"] },
"whatsapp-mcp": { "command": "node", "args": ["mcp/whatsapp-mcp/index.js"] },
"browser-fb-ig": { "command": "node", "args": ["mcp/browser-fb-ig/index.js"] },
"browser-twitter": { "command": "node", "args": ["mcp/browser-twitter/index.js"] }
}
}python check_status.pypython test_integration.py# Test file processing
echo "Test" > Inbox/test.txt
# Test email (send yourself an email with "URGENT")
# Test WhatsApp (send yourself a message with "urgent")
# Test CEO briefing
python ralph_loop.py "Use generate-ceo-briefing skill" \
--completion-promise "CEO_BRIEFING_COMPLETE" \
--max-iterations 5
# Test social media (DRY_RUN mode)
python ralph_loop.py "Use post-linkedin skill" \
--completion-promise "LINKEDIN_POST_COMPLETE" \
--max-iterations 3# Check Python version
python --version # Should be 3.12+
# Check dependencies
pip install -r requirements.txt
# Check logs
cat Logs/$(date +%Y-%m-%d)_orchestrator.log# Check watcher logs
cat Logs/$(date +%Y-%m-%d)_gmail_watcher.log
cat Logs/$(date +%Y-%m-%d)_whatsapp_watcher.log
# Verify credentials
cat .env
# Test watcher independently
python gmail_watcher.py# Check Ralph loop
python ralph_loop.py --help
# Verify Claude CLI
claude --version
# Check skill definitions
ls -la .claude/skills/# Check watchers are running
ps aux | grep watcher
# Test manually
echo "Test" > Inbox/test.txt
# Check orchestrator logs
tail -f Logs/$(date +%Y-%m-%d)_orchestrator.log# View current status
cat Dashboard.md
# Watch in real-time
watch -n 5 cat Dashboard.md# Orchestrator logs
tail -f Logs/$(date +%Y-%m-%d)_orchestrator.log
# Audit logs (JSON)
cat Logs/$(date +%Y-%m-%d)_audit.json | jq '.'
# Today's summary
python -c "from audit_log import get_today_summary; import json; print(json.dumps(get_today_summary(), indent=2))"
# Stuck tasks
python -c "from audit_log import get_stuck_tasks; import json; print(json.dumps(get_stuck_tasks(), indent=2))"- Single MCP server integration
- Personal integrations (Gmail, WhatsApp, files)
- Basic business integrations (LinkedIn, accounting)
- Core Agent Skills
- Basic error handling
- Weekly summary generation
- Cross-domain integration (Personal + Business + Social)
- Multiple MCP servers (5 servers)
- Error recovery & graceful degradation
- Comprehensive audit logging (JSON-based)
- Social media integration (4 platforms)
- CEO briefing automation
- Ralph Wiggum Loop (autonomous execution)
- Complete documentation (Architecture, lessons, demo)
- Web dashboard UI (React)
- Mobile notifications (Telegram bot)
- Voice message transcription
- Multi-language support (Urdu)
- Slack integration
- Calendar integration (Google Calendar)
- Email sentiment analysis
- Automated testing suite
- Multi-user support
- Role-based access control
- API for external integrations
- Cloud deployment (Docker/K8s)
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Update documentation
- Submit a pull request
MIT License - See LICENSE file for details
- Anthropic - Claude 3.5 Sonnet and MCP protocol
- Playwright - Browser automation framework
- Python Community - Excellent libraries and tools
- Hackathon Organizers - For this amazing opportunity
- GitHub Issues: [https://github.com/syedaareebashah/hackathon_0_FTE/issues]
- Documentation: See docs/ folder
- Email: [shahsyedaareeba8@gmail.com]
β Production Ready
- All features implemented
- Comprehensive testing completed
- Full documentation available
- Error recovery tested
- Audit logging verified
- Demo flow prepared
- Ready for hackathon submission
Built with β€οΈ for the Personal AI Employee Hackathon
Version: Gold Tier 1.0 Last Updated: 2026-03-16 Status: Production Ready β