Architecture – AutoTasker AI
High-Level Components
User Prompt
↓
LLM-based Planner Agent
↓
Tool Selector + LangGraph Runner
↓
Selected Agent Nodes:
- Gmail Agent
- GitHub Agent
- DSA Generator Agent
- Summarizer Agent
- Email Agent
- Logger Agent (Sheets, Drive, S3)
- Retry Agent (if any step fails)
↓
Execution Result (Email sent, task logged, etc.)
Core Modules
Module Role
Planner Agent Converts user prompt into structured task plan
LangGraph Runner Executes multi-agent flow as a graph
Gmail Agent Fetches emails using Gmail API
GitHub Agent Fetches recent commits or issues
DSA Agent Uses LLM to generate new coding questions
Summarizer Agent Summarizes email/commit content via LLM
Email Agent Sends final content via Gmail API or AWS SES
Logger Agent Stores logs in Google Sheets, AWS S3
Retry Agent Detects failure and retries broken nodes
Memory Agent Checks past logs to avoid duplicates
Workflow of the Entire Project
1. User enters a natural language prompt via Streamlit or terminal, like:
"Every day at 9AM, send me 2 LeetCode questions and summarize yesterday’s
emails."
2. Planner Agent (LLM):
o Interprets the intent, breaks into task steps
o Output: structured JSON plan with task names and their order
3. LangGraph builds execution graph:
o Adds appropriate agent nodes for each task
o Includes retry edges and logging flow
4. Agents are executed in flow:
o DSA Agent → prompts LLM → generates questions
o Gmail Agent → fetches email → Summarizer Agent → summarizes content
o Both results go to Email Agent → sends via Gmail or SES
o All steps logged via Logger Agent to Google Sheets or S3
5. If any API fails or data is empty:
o Retry Agent loops back that node to try again or take alternate action
6. Final result:
o Email is sent
o Logs saved
o Task auto-scheduled via AWS EventBridge or APScheduler
Folder Purpose
frontend/ Streamlit UI for entering prompts and viewing logs
backend/ Main task logic + agents + LangGraph
agents/ Reusable logic for each task (email, GitHub, summarizer, etc.)
langgraph_runner.py Graph-based task orchestration
google_auth/ Login + API connections to Gmail, Drive, Sheets
scheduler/ Runs task daily (AWS EventBridge or local APScheduler)
memory/ Stores what tasks ran earlier (no duplicates)
data/ Sample prompts and log files
docs/ Diagrams and documentation for setup/paper/report
tests/ Automated testing for agents, graph, and APIs
autotasker-ai/
├── frontend/ # UI layer
│ ├── streamlit_app.py # Prompt input + logs viewer
│ └── templates/ # Optional HTML layouts
│ └── style.css # Styling for frontend
├── backend/
│ ├── lambda/ # Serverless tasks (optional if hosted via AWS Lambda)
│ │ ├── github_fetch.py
│ │ ├── gmail_fetch.py
│ │ ├── dsa_generate.py
│ │ └── email_report.py
│
│ ├── agents/ # All agent scripts (LLM + API logic)
│ │ ├── planner_agent.py # Converts natural prompt → task plan
│ │ ├── gmail_agent.py # Gmail fetch & filtering
│ │ ├── github_agent.py # GitHub summary agent
│ │ ├── dsa_agent.py # LeetCode/Daily Coding Qs via LLM
│ │ ├── summarizer_agent.py # Summarizes content using LLM
│ │ ├── email_agent.py # Sends output via Gmail API / AWS SES
│ │ ├── logger_agent.py # Logs to Google Sheets, Drive, S3
│ │ ├── memory_agent.py # Tracks previous Qs/emails
│ │ ├── retry_agent.py # Retry logic if any node fails
│ │ └── tool_selector.py # Matches tasks → agent nodes
│ ├── langgraph_runner.py # LangGraph orchestrator (main logic)
│ ├── utils.py # Helper functions
│ └── constants.py # API keys, labels, etc.
├── google_auth/ # Google OAuth config
│ ├── gmail_oauth.py
│ ├── drive_oauth.py
│ ├── sheets_oauth.py
│ └── credentials.json # Your OAuth2 credentials
├── scheduler/ # Scheduling logic
│ ├── eventbridge_trigger.py # AWS EventBridge schedule setup
│ └── apscheduler_runner.py # Local fallback scheduler (optional)
├── config/ # App configuration
│ ├── aws_policy.json # IAM policy file for AWS
│ ├── config.yaml # Project-wide settings
│ └── .env # API keys / secrets (excluded in Git)
├── data/ # Sample/test data and prompt logs
│ ├── sample_prompts.json
│ ├── prompt_logs.csv
│ └── history.json
├── memory/ # Memory DBs or vector stores
│ ├── memory_sheet.csv # Used by memory agent
│ └── vector_store.pkl # (optional) for long-term recall
├── tests/ # Unit tests
│ ├── test_agents.py
│ ├── test_langgraph_flow.py
│ └── test_api_connections.py
├── docs/ # Documentation
│ ├── architecture_diagram.png
│ ├── api_docs.md
│ └── setup_guide.md
├── README.md # Project summary
├── requirements.txt # Python dependencies
└── architecture_v4.png # High-level design (Mermaid / PNG)
❖ AutoTasker AI: Scalable Agent Execution Engine
❖ AutoTasker AI: A LangGraph-Orchestrated Multi-Agent System for Natural
Language Task Automation
❖ Prompt-to-Execution: A Multi-Agent Framework for Automating Digital Routines
via LangGraph and Cloud APIs
❖ Smart Task Orchestration with LangGraph: A Modular Agentic AI System for
Gmail, GitHub, and Beyond
❖ LangGraph-Based AI Automation System with Dynamic Tool Selection and Task
Scheduling
❖ AutoTasker: A Self-Healing LLM Agent Framework for Personal Cloud
Automation