An AI personal assistant designed to make all your productivity and personal apps easier to manage. Currently developed for Google Workspace (Calendar, Gmail, Tasks) but architected to be platform-agnostic.
- Performs CRUD operations over Calendar, Gmail, Tasks, and other productivity services
- Natural Language Interface: Describe requests in plain English
- Multi-turn Conversations: Context-aware interactions with clarifying questions
- Confirmation Flows: Safety prompts for destructive operations
- Intelligent Date/Time Parsing: Understands relative dates like "next Tuesday" or "in 2 hours"
- Persistent conversation history
- User preferences configuration
- Batch operations
- Semantic email search with embeddings
- Web UI
- Email label management
- Calendar invitation handling
Three-layer design for clean separation of concerns:
- Agent Layer: High-level orchestration using LLM for intent parsing and routing
- Tool Registry Layer: Pydantic-based validation and standardized execution
- Services Layer: Direct Google API integration for Calendar, Gmail, and Tasks
Tool execution flows from user input through the agent, validated by the registry, wrapped by tool handlers, and executed by service classes.
(classify_intent)
|
v
(plan_actions)
|
v
(route_execution)
|
|
confirm_actions execute_sequential execute_parallel
| | |
|<----(depends_on)----| |
| |
+------------> synthesize_response <------+
|
END
- Python 3.12 or higher
- Google Cloud Platform account
- OAuth credentials for Calendar, Gmail, and Tasks APIs
- Clone the repository and navigate to the project directory
- Install dependencies:
uv sync - Enable required APIs in Google Cloud Console
- Create OAuth Client ID (Desktop application)
- Download credentials as
credentials.jsonin the project root - Add your email as a test user on the OAuth consent screen
- Run:
python main.py
First run will open a browser for OAuth authentication. The token is cached for future sessions.
Calendar: "Add a meeting with John next Tuesday at 2pm" Email: "Summarize my emails from this week" Tasks: "Create a task: buy groceries" Multi-turn: Agent can ask clarifying questions to complete ambiguous requests
To add new tools:
- Implement wrapper in appropriate
tools_*.pyfile - Define Pydantic schema in
schemas.py - Register tool in
registry.py - Update system prompt documentation
- Add tests
- google-api-python-client: Google API access
- google-auth-oauthlib: OAuth 2.0 authentication
- langchain-qwq: LLM integration
- pydantic: Schema validation
- python-dateutil: Date parsing
This project draws inspiration from the official Google Workspace Python quickstart examples. The quickstart files are not committed to this repository; please refer to the canonical sources below:
- Google Calendar Quickstart: https://developers.google.com/calendar/api/quickstart/python
- Gmail Quickstart: https://developers.google.com/gmail/api/quickstart/python
- Google Tasks Quickstart: https://developers.google.com/tasks/quickstart/python