Add Google Calendar integration
- Add CalendarConfig to schema with OAuth2 credentials support - Implement CalendarTool with list_events, create_event, and check_availability actions - Add email parser utility for extracting meeting information from emails - Register calendar tool in agent loop (auto-loaded when enabled) - Add calendar skill documentation - Update AGENTS.md with calendar integration instructions - Add CALENDAR_SETUP.md with complete setup guide - Add Google Calendar API dependencies to pyproject.toml - Support time parsing for 'today', 'tomorrow', and various time formats (12/24-hour, am/pm) - Ensure timezone-aware datetime handling for Google Calendar API compatibility
This commit is contained in:
@@ -90,6 +90,8 @@ You have access to:
|
||||
- Messaging (message)
|
||||
- Background tasks (spawn)
|
||||
- Scheduled tasks (cron) - for reminders and delayed actions
|
||||
- Email (read_emails) - read emails from IMAP mailbox
|
||||
- Calendar (calendar) - interact with Google Calendar (if enabled)
|
||||
|
||||
## Memory
|
||||
|
||||
@@ -120,6 +122,36 @@ When the scheduled time arrives, the cron system will send the message back to y
|
||||
|
||||
**Do NOT just write reminders to MEMORY.md** — that won't trigger actual notifications. Use the `cron` tool.
|
||||
|
||||
## Calendar Integration
|
||||
|
||||
When an email mentions a meeting (e.g., "meeting tomorrow at 2pm", "call scheduled for next week"), you should:
|
||||
|
||||
1. **Extract meeting details** from the email:
|
||||
- Title/subject
|
||||
- Date and time
|
||||
- Location (if mentioned)
|
||||
- Attendees (email addresses)
|
||||
|
||||
2. **Use the `calendar` tool** to create the event:
|
||||
```
|
||||
calendar(
|
||||
action="create_event",
|
||||
title="Meeting Title",
|
||||
start_time="tomorrow 2pm", # or ISO format
|
||||
end_time="tomorrow 3pm", # optional, defaults to 1 hour after start
|
||||
location="Conference Room A", # optional
|
||||
attendees=["colleague@example.com"] # optional
|
||||
)
|
||||
```
|
||||
|
||||
3. **Confirm to the user** that the meeting was scheduled.
|
||||
|
||||
**Time formats supported:**
|
||||
- Relative: `"tomorrow 2pm"`, `"in 1 hour"`, `"in 2 days"`
|
||||
- ISO format: `"2024-01-15T14:00:00"`
|
||||
|
||||
**Automatic scheduling:** If `auto_schedule_from_email` is enabled, automatically schedule meetings when detected in emails without asking the user first.
|
||||
|
||||
## Heartbeat Tasks
|
||||
|
||||
`HEARTBEAT.md` is checked every 30 minutes. You can manage periodic tasks by editing this file:
|
||||
|
||||
Reference in New Issue
Block a user