viraj.kothari
fix: rename agent folders to remove spaces
58b74a0
|
Raw
History Blame Contribute Delete
3.65 kB

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

pip install -r requirements.txt

2. Configure environment

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

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:

# 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.