Overview
The Smart Scheduler Assistant is an advanced multi-agent system that automates email management and calendar scheduling. Built with the Agno framework, it leverages multiple specialized AI agents to streamline your productivity workflow by reading Gmail, filtering important messages, and automatically updating Google Calendar.Features
Smart Email Reading
Automatically fetches and reads latest Gmail messages with detailed content extraction
Intelligent Filtering
AI-powered analysis to distinguish important emails from noise and spam
Automated Calendar
Seamlessly creates, updates, and deletes Google Calendar events from email content
Multi-Agent System
Coordinated team of specialized agents working together for optimal results
Conversational Interface
Interactive CLI for natural language interactions
Persistent Memory
Built-in SQLite database maintains conversation context and history
Tech Stack
Python
Core programming language
Agno Framework
Multi-agent AI orchestration
Nebius AI
Fast LLM inference (Qwen 3 32B model)
Gmail API
Email reading and management
Google Calendar API
Calendar event management
SQLite
Conversation history and agent memory
How It Works
The Smart Scheduler Assistant operates through a coordinated multi-agent system:Email Agent
Retrieves and reads the latest emails from Gmail, summarizes content, and filters unnecessary emails
Prerequisites
Python 3.9+
Python 3.9 or higher required
Nebius API Key
Google Cloud Project
Gmail and Calendar APIs enabled
OAuth Credentials
OAuth 2.0 credentials file (credentials.json)
Google Cloud Setup
Create a Google Cloud Project
- Go to Google Cloud Console
- Click on the project dropdown and select βNew Projectβ
- Name your project (e.g., βSmart Scheduler Assistantβ)
- Click βCreateβ and select your newly created project
Enable Required APIs
- Navigate to βAPIs & Servicesβ > βLibraryβ
- Search for βGmail APIβ and click βEnableβ
- Search for βGoogle Calendar APIβ and click βEnableβ
Create OAuth 2.0 Credentials
- Go to βAPIs & Servicesβ > βCredentialsβ
- Click βCreate Credentialsβ > βOAuth client IDβ
- Configure OAuth consent screen if prompted:
- Select βExternalβ user type
- Fill in app name, support email, and developer email
- Click through scopes and test users sections
- Select βDesktop appβ as application type
- Give it a name (e.g., βSmart Scheduler Desktop Clientβ)
- Click βCreateβ
Download Credentials
- Click βDownload JSONβ for your OAuth client
- Rename the file to
credentials.json - Move it to your project root directory
Installation
Implementation
Email Agent
The email agent specializes in Gmail operations:Calendar Agent
The calendar agent manages Google Calendar operations:Team Orchestration
The team coordinator manages agent collaboration:Usage
Example Interactions
Reading and Scheduling from Emails
Reading and Scheduling from Emails
User: Read my latest 5 emails and schedule any meetingsAssistant:
- Reads the 5 most recent emails
- Identifies emails with meeting information
- Extracts dates, times, and details
- Creates calendar events automatically
- Reports: βCreated 2 new calendar events from your emailsβ
Checking Calendar Availability
Checking Calendar Availability
User: Check my calendar for tomorrowAssistant:
- Lists all events scheduled for tomorrow
- Shows times and event details
- Identifies free time slots
Creating New Events
Creating New Events
User: Create an event for team meeting on Friday at 3 PMAssistant:
- Creates a calendar event
- Sets the date to next Friday
- Sets time to 3:00 PM in your timezone
- Confirms: βTeam meeting scheduled for Friday, 3:00 PMβ
Project Structure
Configuration
Customize the assistantβs behavior inmain.py:
Timezone Settings
Set your timezone in the.env file using IANA timezone format:
Agent Memory
Control conversation history:Email Processing
Adjust the number of emails to process:Security Best Practices
Protect Credentials
Never commit
credentials.json or token.json to version controlEnvironment Variables
Store API keys in
.env file, not in codeOAuth Scopes
Only grant necessary permissions during authentication
Token Security
Keep
token.json secure; it provides access to your accountsTroubleshooting
Missing Environment Variables
Missing Environment Variables
Error:
NEBIUS_API_KEY not found in environmentSolution: Ensure your .env file exists and contains the required API key:credentials.json Not Found
credentials.json Not Found
Error:
credentials.json not foundSolution: Download OAuth credentials from Google Cloud Console and place in project root.token.json Not Found
token.json Not Found
Error:
token.json not foundSolution: Run the authentication script:Authentication Errors
Authentication Errors
If you encounter authentication issues:
- Delete
token.json - Run
python authenticate.pyagain - Complete the OAuth flow in your browser
Database Errors
Database Errors
If you encounter database errors:
- Ensure
tmp/directory exists - Check write permissions
- Delete
tmp/data.dbto reset (loses conversation history)
Advanced Features
Persistent Memory
SQLite database maintains conversation context across sessions
Multi-Agent Collaboration
Specialized agents work together for complex tasks
Intelligent Filtering
AI distinguishes important emails from spam and noise
Smart Assumptions
Makes reasonable assumptions for missing event details
Next Steps
Agno Framework
Explore Agnoβs multi-agent capabilities
Nebius AI
Learn about Nebius AI models
Gmail API
Google Gmail API documentation
Calendar API
Google Calendar API documentation