A Claude-based scheduling assistant that automates email responses and calendar management using Anthropic's API.
claudette-scheduling-agent acts as a personal scheduling assistant. It integrates with your inbox and calendar to automatically handle meeting requests, propose suitable meeting times, and create calendar invites.
Key features:
- Just add your bot to an email thread to begin (you'll need to create a new Gmail account)
- Reads and processes emails related to scheduling
- Checks calendar availability
- Proposes meeting times based on context
- Creates calendar invites
- Handles email responses professionally
- Python 3.7+
- Two Google accounts:
- Your personal Google account with Calendar access
- A new Google account for the assistant bot with Gmail access
- Anthropic API key for Claude AI model
-
Clone the repository:
git clone https://github.com/maraoz/claudette-scheduling-agent.git cd claudette-scheduling-agent
-
Install required packages:
pip install -r requirements.txt
-
Set up Google API credentials: a. For your personal Google account (Calendar API):
- Go to the Google Cloud Console
- Create a new project
- Enable the Google Calendar API
- Create credentials (OAuth 2.0 Client ID) and save as
credentials.json
in project folder - Add your personal gmail as a test user.
- First time you run
main.py
you'll be prompted to connect your go
b. For the assistant's Google account (Gmail API):
- Create a new Gmail account for the assistant bot
- Go to the Google Cloud Console
- Enable the Gmail API
- Add your assistant's gmail as a test user.
-
Create a
secrets.json
file in the project directory with the following structure:{ "email": "your_bot_gmail_address@gmail.com", "name": "Assistant Name", "user_email": "your_personal_gmail@gmail.com", "user_name": "Your Name", "user_timezone": "America/New_York", "ANTHROPIC_API_KEY": "your_anthropic_api_key", }
You can either run it once:
python main.py
Or leave it running every 10 minutes:
./run.sh
On first run, you'll need to authorize the application:
- For Gmail access: You'll be prompted to log in with the assistant bot's Google account
- For Calendar access: You'll be prompted to log in with your personal Google account
- Remember you need to add both gmail addresses as test users in your Google Console project (I'm repeating myself here because you probably skipped the instructions above)
The agent will then:
- Check for unread emails in the assistant's inbox
- Process scheduling-related emails
- Check your personal calendar availability
- Propose meeting times or create calendar invites as appropriate
- Mark processed emails as read
Adjust the main_prompt
in the script and secrets.json
to customize the behavior of the scheduling agent.
You can modify timezone settings, scheduling preferences, and email response styles.
If you're running in a headless environment, first run this on another host with a web browser:
python3 refresh.py
This will open an authentication page for each token (Gmail, Calendar). Check the console messages to know which account you need to authorize each time. (ie: Gmail -> your bot's new gmail account, Calendar -> your personal gmail account)
Then copy the newly generated tokens to your headless server, eg:
scp token_*.json your_user@your_server:/home/your_user/claudette-scheduling-agent
Then run the scheduling agent on your headless environment.
Contributions are welcome! Please feel free to submit a Pull Request. If this README has any mistakes, please contribute a fix! I relied heavily on Claiude to write it, so it will probably contain errors. Sorry for that! I thought it'd be better to publish something rough than not publish it :)
This tool accesses and modifies your email and calendar. Use it at your own risk and make sure you understand the implications before running it on your personal or work accounts. Always review the actions taken by the bot to ensure they align with your intentions.