# Task Manager Agent — Personal AI OS Automatically turns emails and meeting notes into prioritized, synced tasks. ## What it does | Capability | Detail | |---|---| | **Email → Tasks** | Scans inbox every 15 min, extracts actionable items via Groq | | **Meeting → Tasks** | Parses Google Calendar descriptions for action items and follow-ups | | **Prioritization** | LLM scores each task 1–10 using urgency + impact + effort | | **Deduplication** | Never creates the same task twice | | **Sync** | Pushes to Notion DB and/or Todoist | | **Digest** | Sends a formatted email + optional WhatsApp summary | | **Triggers** | New email detection (polling) + daily 9 AM scheduled sync | --- ## File structure ``` task_manager_agent/ ├── main_agent.py # Orchestrator, scheduler, email watcher ├── data_fetcher.py # Gmail + Calendar + existing task fetch ├── llm.py # Groq extraction + prioritization prompts ├── task_store.py # Local JSON persistence + dedup ├── delivery.py # Email SMTP, WhatsApp, Notion, Todoist ├── .env.example # All env vars with explanations ├── requirements.txt └── README.md ``` --- ## Setup ### 1. Install dependencies ```bash pip install -r requirements.txt ``` ### 2. Configure environment ```bash cp .env.example .env # Edit .env with your credentials ``` ### 3. Google credentials Share the same `credentials.json` and `token.json` from your earlier agents. The agent needs scopes: - `gmail.readonly` - `calendar.readonly` ### 4. Notion Database setup Create a Notion database with these properties: | Property | Type | |---|---| | Name | Title | | Status | Select: `To Do`, `In Progress`, `Done` | | Priority | Select: `Critical`, `High`, `Medium`, `Low` | | Due Date | Date | | Category | Select: `Work`, `Personal`, `Admin`, `Communication`, `Research`, `Finance`, `Health`, `Other` | | Source | Rich Text | | Priority Score | Number | | Notes | Rich Text | Copy the DB ID from the Notion URL: `https://notion.so/your-workspace/`**`THIS-IS-YOUR-DB-ID`**`?v=...` ### 5. Run ```bash python main_agent.py ``` On startup the agent runs immediately, then enters the continuous loop: - Email watcher polls every `EMAIL_POLL_INTERVAL_MINUTES` minutes - Full sync fires daily at **09:00** --- ## How prioritization works The LLM scores each task using four axes: ``` Priority Score (1-10) = f(urgency, impact, effort, dependencies) ``` | Score | Label | Example | |---|---|---| | 9–10 | Critical | "Contract due tomorrow, client blocked" | | 7–8 | High | "Respond to investor by Friday" | | 5–6 | Medium | "Update project docs" | | 1–4 | Low | "Read that article someone forwarded" | --- ## Cron alternative To run via system cron instead of the built-in scheduler: ```cron # Daily 9 AM sync 0 9 * * * cd /path/to/task_manager_agent && python -c "from main_agent import run_task_extraction_pipeline; run_task_extraction_pipeline('cron_9am')" # Email polling every 15 min */15 * * * * cd /path/to/task_manager_agent && python -c "from main_agent import run_task_extraction_pipeline; run_task_extraction_pipeline('email_poll')" ``` --- ## Agent position in Personal AI OS ``` 01 ✅ Daily Planner Agent 02 ✅ Email Agent 03 ✅ Meeting Prep Agent 04 ✅ End-of-Day Review Agent 05 ✅ Task Manager Agent ← YOU ARE HERE 06 Research Agent 07 Finance Agent 08 LinkedIn Agent 09 Knowledge Agent 10 Master Orchestrator (Mem0 + LangGraph) ``` The Master Orchestrator will call `run_task_extraction_pipeline()` directly and read from `TaskStore` to feed task context into other agents.