Skip to content

EnggTalha/agentic-productivity-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง‘โ€๐Ÿ’ผ Personal AI Chief of Staff

Connects to your Gmail and Google Calendar. Every morning it reads your emails, schedules your day, prioritizes tasks, drafts replies, and delivers a briefing to Slack โ€” all autonomously.

Python Claude Gmail Google Calendar License


๐Ÿ“ธ Demo

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  Personal AI Chief of Staff                                  โ”‚
โ”‚  Agent for: Talha (Software Engineer)                        โ”‚
โ”‚  Mode: DRY RUN | TZ: Asia/Karachi                           โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

๐Ÿ“ฌ Fetching emails...
โœ“ Fetched 5 emails.

๐Ÿ“… Fetching calendar...
โœ“ Fetched 4 calendar events.

๐Ÿง  Triaging emails...
  โœ“ Triaged 5 emails.

โœ… Extracting tasks...
  โœ“ Extracted 7 tasks.

๐Ÿ“‹ Generating morning brief...

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚  Good morning, Talha! Big day ahead โ€” 4 meetings, 2 urgent  โ”‚
โ”‚  items, and an interview to wrap up. Let's get after it.    โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

๐Ÿ“… Schedule
  10:00 AM  Daily Standup          ali, zara, hamza...
  11:00 AM  Sprint Planning        team@company.com
  02:00 PM  1:1 with Sarah         sarah@company.com
  04:00 PM  Interview โ€” Farhan K.  hr, farhan.k

โœ… Priority Tasks
  ๐Ÿ”ด  Submit interview feedback for Farhan K.         due: 3:00 PM
  ๐Ÿ”ด  Complete Q2 self-assessment form                due: Friday EOD
  ๐ŸŸ   Process Invoice #4521 payment ($450)            due: Apr 19
  ๐ŸŸก  Prepare talking points for 1:1 with Sarah       today
  ๐ŸŸข  Review standup notes โ€” Ali blocked on DB creds  this week

๐Ÿ“ฌ Email Actions
  โœ‰๏ธ reply   Sarah Manager      Q2 Performance Review โ€” Action Required   U
  ๐Ÿšฉ flag    HR Team             Interview feedback needed โ€” Farhan K.     U
  ๐Ÿ“ฆ archive Slack Bot           Team standup notes โ€” April 16             N
  ๐Ÿ“ฆ archive TechBrief           Weekly newsletter: AI tools roundup       L

โฐ Focus Block: 12:00โ€“1:30 PM between sprint planning and your 1:1

๐Ÿ‘€ Watch Out For
  โ€ข Interview feedback deadline is 3 PM โ€” don't miss it
  โ€ข Ali is blocked on DB creds โ€” may need your help

โšก Quick Wins
  โ€ข Mark standup notes as read
  โ€ข Forward invoice #4521 to accounts
  โ€ข Check if DB creds issue is in your scope

โœ“ Chief of Staff run complete!

๐Ÿง  How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  1. FETCH    โ”‚โ”€โ”€โ–ถโ”‚  2. FETCH    โ”‚โ”€โ”€โ–ถโ”‚  3. TRIAGE (Claude)     โ”‚
โ”‚              โ”‚   โ”‚              โ”‚   โ”‚                         โ”‚
โ”‚  Gmail API   โ”‚   โ”‚  Google Cal  โ”‚   โ”‚  Reads all emails       โ”‚
โ”‚  Last 24h    โ”‚   โ”‚  Today's     โ”‚   โ”‚  Decides: reply/flag/   โ”‚
โ”‚  Unread +    โ”‚   โ”‚  events      โ”‚   โ”‚  archive/ignore         โ”‚
โ”‚  Important   โ”‚   โ”‚              โ”‚   โ”‚  Drafts replies         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                  โ”‚
                                                  โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  6. DELIVER  โ”‚โ—€โ”€โ”€โ”‚  5. APPLY    โ”‚โ—€โ”€โ”€โ”‚  4. SYNTHESIZE (Claude) โ”‚
โ”‚              โ”‚   โ”‚              โ”‚   โ”‚                         โ”‚
โ”‚  Slack brief โ”‚   โ”‚  Create      โ”‚   โ”‚  Extract tasks          โ”‚
โ”‚  Markdown    โ”‚   โ”‚  Gmail draftsโ”‚   โ”‚  Prioritize day         โ”‚
โ”‚  file saved  โ”‚   โ”‚  Archive     โ”‚   โ”‚  Generate brief         โ”‚
โ”‚  Terminal    โ”‚   โ”‚  emails      โ”‚   โ”‚  Find focus block       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœจ Features

Feature Details
๐Ÿ“ฌ Email triage Claude reads every email and decides: reply, flag, archive, or ignore
โœ‰๏ธ Draft replies Auto-drafts professional replies saved to Gmail Drafts
๐Ÿ“… Calendar sync Pulls today's full schedule with attendees
โœ… Task extraction Infers action items from emails and meetings
๐Ÿ“‹ Morning brief Personalized daily briefing with schedule, tasks, and email actions
๐Ÿ’ฌ Slack delivery Posts formatted brief to any Slack channel
โฐ Focus block Recommends best deep-work window based on your calendar
โšก Quick wins Surfaces tasks completable in under 5 minutes
๐Ÿ’พ Local archive Every brief saved as Markdown + JSON
โฑ๏ธ Schedulable Run via cron, Task Scheduler, or GitHub Actions

๐Ÿ—‚๏ธ Project Structure

chief-of-staff/
โ”œโ”€โ”€ main.py                      # CLI entry point
โ”œโ”€โ”€ config.py                    # Config, env vars, Pydantic models
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ SETUP.md                     # Google OAuth setup guide
โ”‚
โ”œโ”€โ”€ agent/
โ”‚   โ”œโ”€โ”€ brain.py                 # Claude: email triage, tasks, brief
โ”‚   โ””โ”€โ”€ orchestrator.py          # Main agentic loop
โ”‚
โ”œโ”€โ”€ tools/
โ”‚   โ”œโ”€โ”€ gmail_tool.py            # Gmail API: read, draft, archive
โ”‚   โ”œโ”€โ”€ calendar_tool.py         # Google Calendar API: read, create
โ”‚   โ”œโ”€โ”€ slack_tool.py            # Slack: deliver brief
โ”‚   โ””โ”€โ”€ reporter.py              # Terminal + Markdown brief printer
โ”‚
โ””โ”€โ”€ data/
    โ”œโ”€โ”€ briefs/                  # Saved daily briefs (auto-generated)
    โ”œโ”€โ”€ emails/                  # Email cache
    โ””โ”€โ”€ google_token.json        # OAuth token (auto-generated on first run)

๐Ÿš€ Quickstart

1. Clone & install

git clone https://github.com/yourusername/personal-ai-chief-of-staff.git
cd personal-ai-chief-of-staff

python -m venv venv
source venv/bin/activate       # Windows: venv\Scripts\activate

pip install -r requirements.txt

2. Configure

cp .env.example .env

Fill in .env:

  • ANTHROPIC_API_KEY โ€” console.anthropic.com
  • YOUR_NAME, YOUR_EMAIL, YOUR_ROLE
  • Google credentials (see SETUP.md โ€” takes 5 minutes)

3. Set up Google API

Follow SETUP.md to get your Gmail + Calendar credentials. Takes about 5 minutes.

4. Run dry run first (safe โ€” no emails sent)

python main.py --dry-run

5. Go live

python main.py --live

โš™๏ธ CLI Reference

python main.py [OPTIONS]

Options:
  --dry-run        Simulate โ€” no emails sent, no Slack messages (default)
  --live           Actually create drafts and post to Slack
  --schedule       Daemon mode โ€” runs daily at BRIEF_HOUR in .env
  --emails-only    Only triage emails, skip brief generation
  --brief-only     Generate brief without applying email actions

Examples:
  python main.py --dry-run           # safe test
  python main.py --live              # full live run
  python main.py --schedule --live   # run every morning automatically

๐Ÿ”‘ API Keys & Cost

Service Used For Cost
Anthropic Claude Email triage, task extraction, brief ~$0.05โ€“0.15 per run
Gmail API Read emails, create drafts Free (Google)
Google Calendar API Read events, create events Free (Google)
Slack API Deliver morning brief Free (Slack)

Estimated cost per day: ~$0.10


๐Ÿ› ๏ธ Customization

Change what Claude focuses on

Edit the triage prompt in agent/brain.py to add your rules:

# Add to the triage prompt:
"Always flag emails from my CEO (ceo@company.com) as urgent.
Never draft replies to newsletters.
If an email contains an invoice, always flag it as high priority."

Add more integrations

The modular tools/ folder makes it easy to add:

  • Notion โ€” sync tasks to a Notion database
  • WhatsApp โ€” deliver brief via WhatsApp (Twilio)
  • Telegram โ€” deliver via Telegram Bot API
  • Linear / Jira โ€” pull in ticket updates

๐Ÿค Contributing

Ideas welcome:

  • WhatsApp delivery via Twilio
  • Notion task sync
  • Follow-up tracker (did you get a reply?)
  • Weekly summary mode
  • Meeting prep notes (research attendees before 1:1s)
  • Voice brief via text-to-speech

๐Ÿ“„ License

MIT โ€” see LICENSE


๐Ÿ™‹ Author

Built by EnggTalha

โญ Star this repo if it made your mornings smoother!

About

An agentic AI productivity assistant that triages emails, schedules events, extracts tasks, and delivers daily briefs via Slack.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages