A local-first Personal AI Employee built with Qwen Code and Obsidian
This Silver Tier implementation provides autonomous email and social media automation with human-in-the-loop approval workflow.
| Tier | Status | Description |
|---|---|---|
| ๐ฅ Bronze | โ Complete | Foundation, file watcher, task processing |
| ๐ฅ Silver | โ Complete | Gmail automation, LinkedIn posting, approval workflow |
| ๐ฅ Gold | โณ Pending | Odoo integration, multi-domain automation |
| ๐ Platinum | โณ Pending | Cloud deployment, always-on operation |
- โ Gmail Watcher detects new emails (2-min intervals)
- โ Filters promotional/security emails automatically
- โ
Creates tasks in
Needs_Action/folder - โ Qwen Code processes and creates approval requests
- โ Human-in-the-loop approval workflow
- โ Sends emails via Gmail API (OAuth2 authenticated)
- โ Auto-posts to LinkedIn about business topics
- โ Professional content generation
- โ Approval workflow before posting
- โ Continuous Processor runs every 2 minutes
- โ Qwen Code as the reasoning engine
- โ Company Handbook rules for decision-making
- โ Dashboard updates automatically
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ EXTERNAL SOURCES โ
โ Gmail LinkedIn File Drops โ
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PERCEPTION LAYER (Watchers) โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Gmail Watcherโ โLinkedIn Posterโ โFile Watcher โ โ
โ โ (2 min) โ โ (on demand) โ โ (on event) โ โ
โ โโโโโโโโฌโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโฌโโโโโโโโ โ
โโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ OBSIDIAN VAULT (Local Memory) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ /Needs_Action/ โ /Pending_Approval/ โ /Approved/ โ โ
โ โ /Done/ โ /Plans/ โ /Logs/ โ Dashboard.md โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ REASONING LAYER (Qwen Code) โ
โ Continuous Processor (every 2 min) invokes Qwen Code โ
โ Read โ Think โ Plan โ Create Approvals โ Update Dashboard โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ACTION LAYER โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โGmail API โ โLinkedIn API โ โFile System โ โ
โ โ(send email) โ โ(post update) โ โ(move files) โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Agentic-Autonomous-Employee/
โโโ AI_Employee_Vault/ # Obsidian vault (memory)
โ โโโ Inbox/ # File drop zone
โ โโโ Needs_Action/ # Tasks waiting for processing
โ โโโ Pending_Approval/ # Awaiting human approval
โ โโโ Approved/ # Ready to execute
โ โโโ Done/ # Completed tasks
โ โโโ Dashboard.md # Real-time status
โ โโโ Company_Handbook.md # AI behavior rules
โโโ watchers/ # Perception layer
โ โโโ gmail_watcher.py # Gmail monitoring
โ โโโ filesystem_watcher.py # File drop monitoring
โ โโโ base_watcher.py # Base class
โโโ scripts/ # Core logic
โ โโโ continuous_processor.py # Invokes Qwen every 2 min
โ โโโ create_email_approval.py # Creates approval requests
โ โโโ send_approved_email.py # Sends emails via Gmail API
โ โโโ linkedin_poster.py # LinkedIn posting
โ โโโ gmail_auth.py # OAuth authentication
โโโ mcp-servers/ # Future: MCP integration
โโโ credentials/ # OAuth tokens (gitignored)
โโโ docs/ # Documentation archive
โโโ .qwen/ # Qwen skills & config
โโโ README.md # This file
โโโ requirements.txt # Python dependencies
- Python: 3.13 or higher
- Qwen Code: Installed and configured
- Obsidian: Optional (for GUI viewing)
- Gmail API: OAuth credentials in
credentials/
cd E:\Farhan-work\Hackathon\Agentic-Autonomous-Employee
pip install -r requirements.txtTerminal 1 - Gmail Watcher:
python watchers/gmail_watcher.pyTerminal 2 - Continuous Processor:
python scripts/continuous_processor.py- Send a test email to your Gmail address
- Wait 2 minutes - Gmail Watcher detects it
- Wait 2 more minutes - Continuous Processor invokes Qwen
- Check
Pending_Approval/- Approval request created - Move to
Approved/- You approve the action - Wait 2 minutes - Email sent via Gmail API
- Check
Done/- Task completed
1. Email arrives โ Gmail Watcher (2 min)
โ
2. Task created โ Needs_Action/EMAIL_*.md
โ
3. Continuous Processor (2 min) โ Invokes Qwen Code
โ
4. Qwen reads Company_Handbook.md โ Creates approval request
โ
5. Approval in Pending_Approval/ โ Waits for human
โ
6. You move to Approved/ โ Human approval
โ
7. Next cycle โ Qwen executes send_approved_email.py
โ
8. Email sent via Gmail API โ Moved to Done/
Default: 120 seconds (2 minutes)
# Custom interval (in seconds)
python scripts/continuous_processor.py <vault_path> <interval_seconds>
# Example: 5 minute intervals
python scripts/continuous_processor.py AI_Employee_Vault 300Edit watchers/gmail_watcher.py to customize:
# Emails to ignore
ignore_senders = ['noreply', 'security', 'linkedin', 'amazon']
ignore_subjects = ['PIN', 'verification', 'promo', 'newsletter']Edit AI_Employee_Vault/Company_Handbook.md:
- Add new decision rules
- Change approval thresholds
- Modify priority levels
- Define working hours
# Check pending tasks
dir AI_Employee_Vault\Needs_Action\*.md
# Check approvals waiting
dir AI_Employee_Vault\Pending_Approval\*.md
# Check ready to execute
dir AI_Employee_Vault\Approved\*.md# Gmail Watcher logs
type AI_Employee_Vault\Logs\gmail_watcher.log
# Continuous Processor logs
type AI_Employee_Vault\Logs\continuous_processor.log
# Email actions log
type AI_Employee_Vault\Logs\email_actions.json# View current status
type AI_Employee_Vault\Dashboard.mdFull documentation is in the docs/ folder:
| Document | Description |
|---|---|
docs/SILVER_TIER_COMPLETE.md |
Silver tier implementation details |
docs/GMAIL_TESTING_GUIDE.md |
Gmail setup and testing guide |
docs/EMAIL_WORKFLOW_COMPLETE.md |
Email workflow documentation |
docs/QUICKSTART.md |
Quick start guide |
docs/PROJECT_SUMMARY.md |
Project overview |
- โ All data stays local in Obsidian vault
- โ OAuth2 authentication for Gmail API
- โ
Credentials stored in
credentials/(gitignored) - โ Human approval required for all external actions
- โ
Audit logs in
Logs/folder - โ
.gitignoreprevents sensitive data commits
From the hackathon requirements:
| Requirement | Status | Implementation |
|---|---|---|
| All Bronze requirements | โ | Complete foundation |
| 2+ Watcher scripts | โ | Gmail + File System |
| LinkedIn auto-posting | โ | linkedin_poster.py |
| Qwen reasoning loop | โ | continuous_processor.py |
| MCP server for actions | Using direct API (MCP reserved for Gold) | |
| Human-in-the-loop | โ | Pending_Approval/ workflow |
| Scheduling | โ | 2-minute intervals |
| Agent Skills | โ | Qwen skills in .qwen/skills/ |
- Odoo ERP integration via MCP
- WhatsApp watcher for message monitoring
- Weekly business audit with CEO briefing
- Multiple MCP servers for different actions
- Error recovery and graceful degradation
- Cloud VM deployment (24/7 operation)
- Local/Cloud separation (Cloud drafts, Local approves)
- Vault sync via Git
- A2A agent communication
- Facebook/Instagram/Twitter integration
Built with Qwen Code | Silver Tier Complete | Local-First AI Employee