Repository navigation
Add the calendar tools and calendarEventId on messages - #84
Merged
Merged
Conversation
Calendar left AgentMail Labs on Oct 19 2026 (agentmail-api#1706) and works for every organization in US production, but agents had no way to reach it. Eight tools map onto the agentmail SDK's inboxes.calendar client (0.5.46): get_agenda, get_event, create_event, update_event, delete_event, respond_to_invitation, get_calendar and update_calendar. The stored event list and /instances stay out: the agenda answers "what is on the calendar", and get_event reads any date by its dated ID. Each description says Calendar works for every US production organization and that EU production returns 403 "Calendar isn't available in this region yet". sendInvites applies to its own request only, so a reschedule needs it again; ifMatch is optional. Time zones are described as the deployed API takes them since agentmail-api#1704: any case and IANA aliases, stored under the canonical name; abbreviations and offsets refused. Messages now keep calendarEventId (MessageItemSchema is a strip-mode allowlist, so the API's calendar_event_id was dropped), so an agent reading an invitation email can find and answer its event. get_labs and join_labs no longer say Labs turns on calendar; Agent Armor is the example. Bumps to 0.16.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 2026
… times - update_event: attendees keep comment and respondedAt, recurrence keeps rdates, and metadata takes any JSON object, so sending back what get_event returned no longer erases RSVP notes, extra dates or nested metadata. get_event now returns rdates and truncateBefore. - update_event takes allDay, and start says it is refused with mode future. - get_agenda's after/before refuse a time without an offset or Z instead of reading it in the server's timezone. - get_calendar takes consistency. - calendarEventId sends replies and cancellations to get_event only. - Calendar enums come from the SDK (z.enum(AgentMail.X)). - Tests: get_event -> update_event round trip, and the offset refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sidharth0612
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Gives agents AgentMail Calendar, which left Labs on Oct 19 2026 (agentmail-api#1706) and works for every organization in US production.
agentmailSDK'sinboxes.calendarclient (0.5.46, already the floor):get_agenda,get_event,create_event,update_event,delete_event,respond_to_invitation,get_calendar,update_calendar. The stored event list and/instancesare left out: the agenda answers "what is on the calendar", andget_eventreads any date by its dated ID.calendarEventIdon messages.MessageItemSchemais a strip-mode allowlist, so the API'scalendar_event_idwas dropped from every message result. An agent reading an invitation email can now go from it toget_event/respond_to_invitation.get_labs/join_labsno longer say Labs turns on "calendar first"; Agent Armor is the example, and they say Calendar needs no join.What the descriptions promise, and where it comes from (agentmail-api
origin/main2e2aa0e83)Calendar isn't available in this region yet(calendarNotAvailableError,middleware/calendar.ts; the gate is region only, no Labs check remains).sendInvitesapplies to its own request only, so a reschedule needs it again; it counts one send per attendee. Only the organizer inbox can send (requireCalendarOrganizer).ifMatchis optional on every write; with an etag a stale change gets 412.IanaTimezoneInputSchema): any case and IANA aliases, stored under the canonical name (which can differ from what was sent); abbreviations like PST and offsets refused. The SDK's own docstring still says non-canonical spellings are rejected, which is out of date.statusresets toneeds_action, so the field description says to keep each status fromget_eventand passifMatch. The input keeps each attendee'scommentandrespondedAt, the recurrence keepsrdates, and metadata takes any JSON object, so sending back whatget_eventreturned loses nothing.get_agendaafter/beforeneed an offset orZ; a time without one is refused rather than read in the server's time zone.uid,sequence,resourceRevision, the duration fields andoperationId.Checks
pnpm lint,pnpm build,pnpm test: 784 tests pass (10 new intests/calendar.test.ts, including aget_event→update_eventround trip, plus the per-tool contract and docs checks for the eight tools).tsc --noEmit: no new errors. The ones it reports (examples/*,tests/contract.test.ts,tests/package.test.ts) are the same onmain.fetch: paths,If-Matchheader,mode/send_invitesquery on delete and update, and snake_case bodies all match the API.Release order
agentmail-toolkit@0.16.0to npm (needs an OK; not done here).The Python toolkit has no Drive or Labs tools yet either; calendar there is a separate follow-up.
🤖 Generated with Claude Code